-
1. Re: rich:inplaceInput: how to call a DB update action on bean? (need suggestions)
kwutzke May 25, 2012 12:32 AM (in response to kwutzke)I was able to find the respective entity in a rich:tree via the <rich:tree selectionChangeListener="..."> which stores the entity and then uses the <rich:inplaceInput valueChangeListener="..."> to do the update. That was easier than expected.
However, how do I find the selected row/entity when an rich:inplaceInput or a rich:calendar field is displayed in a regular rich:dataTable? This should be a pattern as I believe many have planned to update fields in data tables. (???)
I can't use an extended data table because I'm using rich:collapsibleSubTable's, which can't be used in combination.
How do you determine the selected row in a regular <rich:dataTable>?
Karsten
-
2. Re: rich:inplaceInput: how to call a DB update action on bean? (need suggestions)
ma.aqcon May 25, 2012 2:05 AM (in response to kwutzke)Hi Karsten,
I have no idea if this is a common pattern, but I get the selected row with getRowData()-method of UIDataTable.
My listener method looks like
public void changeAction(ValueChangeEvent event) {
... ((UIDataTable) event.getComponent().getParent().getParent()).getRowData());
}
Regards,
Michael
-
3. Re: rich:inplaceInput: how to call a DB update action on bean? (need suggestions)
kwutzke May 26, 2012 8:19 PM (in response to ma.aqcon)Hero of the day I'd say! getRowData returns the entity in the list - perfect. This is the pattern I was looking for.
Thanks a LOT for this easy solution.
Karsten