-
1. Re: How to update a specific row or cell in an extendedDataTable using the render property
healeyb Jul 4, 2012 4:37 AM (in response to sansaric)I use a syntax like this render="tableId:@rows(bean.rowToUpdate):cellId" and it works ok for me.
Regards,
Brendan.
-
2. Re: How to update a specific row or cell in an extendedDataTable using the render property
iabughosh Jul 4, 2012 3:58 AM (in response to sansaric)Hello Marc,
unfortunately, that documentation contains some errors, anyway you correct syntax is like this :
render="JobStatusTable:@rows(jobStatusManagementBean.tableRowsToUpdate):componentId"
where conponentId is an id for component under a specific column.
regards.
-
3. Re: How to update a specific row or cell in an extendedDataTable using the render property
sansaric Jul 5, 2012 10:10 AM (in response to iabughosh)Thank you Brendan and Ibrahim for your responses. I will try the syntax that you suggested and hopefully will get good results. The documentation says that the @rows function acceptts a collection of row keys to be updated. What exactly are you passing to the rows function ? Possibly a set containing one or more Integers indicating which row(s) to update.
Thanks,
Marc
-
4. Re: How to update a specific row or cell in an extendedDataTable using the render property
healeyb Jul 5, 2012 11:49 AM (in response to sansaric)Yes, just a List<Integer> will do the job.
Regards,
Brendan.
-
5. Re: How to update a specific row or cell in an extendedDataTable using the render property
sansaric Jul 5, 2012 12:01 PM (in response to healeyb)Thanks Brendan. I tried it and it works. I was hoping that I could also update an entire table row in case an action is affecting multiple cells by ommiting the :cellid in render="tableId:@rows(bean.rowToUpdate):cellId". However, it does not work. I suppose I am limited to specifying each affected cells in the render statement.
Regards,
Marc
-
6. Re: How to update a specific row or cell in an extendedDataTable using the render property
healeyb Jul 5, 2012 1:43 PM (in response to sansaric)Ok, well if it doesn't work it's a shame, but a good candidate for an enhancement request.Presumably you will have to use a syntax
like this to update multiple cells:
render="tableId:@rows(bean.rowToUpdate):cellId1 tableId:@rows(bean.rowToUpdate):cellId2 ..." - not good, so it would be nice to
have a few options:
1. render="tableId:@rows(bean.rowToUpdate)" - the whole row. The problem is what is a whole row in terms of component ids? given
that the JSF table structure is column based and not row based. Not sure that this will fly.
2. render="tableId:@rows(bean.rowToUpdate):(cellid1 cellid2)" - or something along those lines, certainly saves some typing.
Given that you can normally supply an EL expression with a string of component ids, presumably you can still do it in this scenario,
but I wonder how it would work. Perhaps like this: render="tableId:@rows(bean.rowToUpdate):bean.idsToUpdate", but I suspect
not, or maybe render="tableId:@rows(bean.rowToUpdate):#{bean.idsToUpdate}", or maybe you'd just have to have
render="#{bean.rowsAndIdsUpdateMatrix} which evaluates to the full length
"tableId:@rows(bean.rowToUpdate):cellId1 tableId:@rows(bean.rowToUpdate):cellId2
If you do any more work on this I'd be interested to know which (if any) of these work.
Regards,
Brendan.
-
7. Re: How to update a specific row or cell in an extendedDataTable using the render property
sansaric Jul 5, 2012 2:27 PM (in response to healeyb)Thanks again Brendan for all your help and suggestions.
render="tableId:@rows(bean.rowToUpdate):cellId1 tableId:@rows(bean.rowToUpdate):cellId2" definitely works, however as you said, it gets too cumbersome as the number of columns to update increases.
Suggestion # 1. render="tableId:@rows(bean.rowToUpdate)" doesn't work but would be my favorite way of handling it as an enhancement, but maybe impossible due to the JSF table structure based on columns
I will try some of the other possibilities and reply if any of them yields positive results. In the mean time, I probably will keep updating the entire table when many columns required updating.
Regards,
Marc