I'm trying to create a photobook using a rich:datagrid. I have some pictures and I want to show them in rows and columns. When the user clicks on an item, the site should show its details. Actually, I display all the items, but unfortunately I am not able to execute the action "showDetails" in the backing bean:
myBean is my baking bean and elem is a model element. I want the commandLink sets the property itemIdDetails of the backing bean with the value of itemId.
When I debug, the setter receives a null value, and the action "showDetails" is never executed:
And my faces-config:
Please let me know if you need more information. Your ideas and comments will be much appreciated. Thank you in advance.
Yes, it is. It was a good idea, but the problem is when we use the richd:datagrid and the commandLink together. Just to test I have replaced the commandLink for another much simple, with fixed values and the result is the same.
After that, just to test if the commandLink was good, I wrote it outside the datagrid, like this one, with a fixed id, and it works perfectly! So for an unknown reason we cannot use a commandLink in a datagrid.
Thank you anyway, please let me know if you have any others ideas.
commandLinks and commandButtons work just fine in a RichFaces dataGrid. Or, for that matter, the core JSF dataGrid. I do it all the time.
On the other hand, in probably 7-8 years of working with JSF, I've never had to use a propertyActionListener, and I'm too lazy to RTFM. But I wouldn't be surprised to learn that it was overriding the "action=" attribute on the commandLink.
An IDE is no substitute for an Intelligent Developer.