This content has been marked as final.
Show 7 replies
-
1. Re: rich:dataTable accessing data from backing bean
fdegrigny Jan 21, 2010 7:55 AM (in response to zelenka)Why you don't use the dataModel (or data List) to perform the sum ? -
2. Re: rich:dataTable accessing data from backing bean
zelenka Jan 21, 2010 7:58 AM (in response to fdegrigny)Beacuse I want to sum UI data before saving to data model -
3. Re: rich:dataTable accessing data from backing bean
fdegrigny Jan 21, 2010 8:06 AM (in response to zelenka)But I think that (in almost every case) UI data are only visible data -
4. Re: rich:dataTable accessing data from backing bean
zelenka Jan 21, 2010 8:14 AM (in response to fdegrigny)But my table contains inputBox so user can change values. -
5. Re: rich:dataTable accessing data from backing bean
fdegrigny Jan 21, 2010 8:34 AM (in response to zelenka)Ok, so modified values are updated to the DataModel during the UpdateValues phase.
Are you trying to compute the sum on the client side, with javascript before you send the request ?
-
6. Re: rich:dataTable accessing data from backing bean
zelenka Jan 21, 2010 8:39 AM (in response to fdegrigny)My problem is that I want to compute the sum of all rows not only visible (filtered) rows. -
7. Re: rich:dataTable accessing data from backing bean
nbelaevski Jan 21, 2010 12:58 PM (in response to zelenka)Pavel,
You can try this:
1) Let components update the model
2) Walk over the model in action method and sum values from there