-
1. Re: PropertyNotFoundException exception with JSF binding
trouby Oct 18, 2006 5:46 PM (in response to trouby)Hey,
As I understand, this is not a SEAM issue, iterated objects in datatable in JSF cannot be binded to UI components :-/
Is there anything I can do? does seam has any pattern that can help me with rendering UI components based on the iterated objects in a list?
I see it very useful as sometimes only the objects themselfs knows how they should look like.
As alwyas - thanks a lot guys.
Asaf. -
2. Re: PropertyNotFoundException exception with JSF binding
gavin.king Oct 19, 2006 11:43 AM (in response to trouby)Whats an "iterated object". I have no idea what you are talking about here.
-
3. Re: PropertyNotFoundException exception with JSF binding
trouby Oct 20, 2006 8:34 AM (in response to trouby)My fault Gavin,
I shortcut my explainations, i'm sorry, here:
I have a LIST of my own 'Attribute' class objects, where each of the 'Attribute' typed object has a collection of 'Value'(my own class) objects.
I outject to the view a LIST of Attribute objects and display some of their properties by the standard 'dataTable' tag.
Now I want to have another dataTable (within the 'Attributes' datatable) which will display each 'Value' object.
The problem is that I don't know how and what type of Validators/Converters or even UI Component to render for each 'Value' object since the way the 'Value' objects looks and their types dependen on many conditions.
So I have a in 'Value' class a method that returns the correct 'UIComponent' type with its needed converters/validators....
When I tried something like:<h:dataTable id="attributeList" var="attribute" value="#{attributeList}"> <h:column> <h:dataTable id="valueList" var="value" value="#{attribute.values}"> <h:column> <h:panelGrid binding="#{value.renderJsfGridComponent}"/> </h:column> </h:column>
I recieved a "PropertyNotFoundException" over the 'value' iterated object. ( I guess this is because 'value' is iterated it is not allowed to be used for binding)
The question is if there's any way of adding a UI Component dynamically somehow and if Seam may help (somehow) here...
Hope this time it's a little bit more understandable.. :)
Thanks... -
4. Re: PropertyNotFoundException exception with JSF binding
trouby Oct 21, 2006 7:11 AM (in response to trouby)Hey,
Solved this by creating special tags instead of using 'binding' per iterated objects.
Thanks anyway.