Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

h:datatable, how multiply row cell A with row cell B and set value in row cell C

 
Milutin Markovic
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I know how to multiply that in backing bean and show in third cell. Bat what is interesting me how can multiply two cell on client side in jsf page. Thanks for any halp.
 
Greg Charles
Sheriff
Posts: 2993
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe EL (expression language) supports basic arithmetic, so what you'd do is: #{item.price * item.quantity}

Otherwise, you can always add another getter to item's class that returns the extended value.
 
Milutin Markovic
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic