[jboss-user] [JBoss Seam] - Re: Problem using Expression language enhancements

sjmenden do-not-reply at jboss.com
Fri Dec 1 12:40:12 EST 2006


Actually, the way I'm getting around this is to define a Transient field with the name of the action method.

so:


  | ...
  | @Transient private Double totalUnitCost;
  | ...
  | @Transient
  | 	public Double getTotalUnitCost() {
  | 		double total = 0;
  | 		for(Item item : items) {
  | 			total += item.getUnitCost();
  | 		}
  | 		return total;
  | 	}
  | ...
  | 

and in the EL:

  | <!-- Total Unit Cost-->
  | 				<h:column>
  | 					<f:facet name="header">
  | 						<h:outputText value="Total Unit Cost" />
  | 					</f:facet>
  | 					<h:outputText value="#{purchase.totalUnitCost}" />
  | 				</h:column>
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990516#3990516

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990516



More information about the jboss-user mailing list