Sorry, I think I didn't get it.
Lets make an example here:

<t:grid source="products" row="product />

class Product {
   int price, quantity;
}

class ProductPage {
   @Inject
   PropertyConduitSource pcSource;

   @Property
   List<Product> products;

   @Property
   @Persist
   Product product;

  setupRender() {
    model.add("result", pcSource.create("Product.class", "price"));
    model.add("result", pcSource.create("Product.class", quantity));
    model.add("result", pcSource.create("Product.class", getMultiply()));
    //or
    model.add("result", pcSource.create("Product.class",
productService.getMultiply(product)));
  }

  int getMultiply(Product product) {
     return product.getPrice() * product.getQuantity();
  }
}


I do NOT want to introduce a getMultiply() method within my product entity
(which would solve the problem as I could just add a "multiply" conduit). I
want it to be computed either in the productService or directly in the
product backing page class.




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/BeanModel-how-to-add-results-from-a-method-tp5717499p5717512.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to