Actually, it's preserveRowStates=true (with an 's')
On 7/10/06, Mike Kienenberger <[EMAIL PROTECTED]> wrote:
Well, I was just looking at a different UIData issue, and I may have
come across something relevent. Try using t:dataTable with
preserveRowState=true and see if it fixes this problem. It may cause
other problems however. I noticed that the JSF RI 1.2 UIData has
undocumented behavior where it always preserves the row state when
UIDatas are nested.
On 7/10/06, Michael Litherland <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm using MyFaces to display some heirarchical data and to do so I'm
> nesting dataTables within each other. Displaying the data works fine,
> but I place commandButtons in the tables so the user can get detailed
> information of several different types about the data I'm displaying.
> Within the bean it doesn't seem like it differentiates between the
> interior tables at all so I always end up with a view of the first
> item displayed, not whatever it is I clicked on.
>
> This is a simplified version of what I'm trying to do:
>
> <h:form>
> <h:dataTable value="#{user.grandparentModel}" var="gp">
> <h:column>
> <h:dataTable value="#{gp.parentModel}" var="p">
> <h:column>
> <h:dataTable value="#{p.childModel}" var="c">
> <h:column>
> <h:commandButton value="#{msg.seeChildDetails}"
> action="#{user.childDetails}"/>
> <h:outputText value="#{c.someDetails}"/>
> </h:column>
> </h:dataTable>
> </h:column>
> </h:dataTable>
> </h:column>
> </h:dataTable>
> </h:form>
>
> And in the bean:
> public String childDetails() {
> GrandParent gp = (Grandparent) grandparentModel.getRowData();
> Parent p = (Parent) gp.getParentModel().getRowData();
> Child c = (Child) p.getChildModel().getRowData();
> // Do something with c
> return "childDetails";
> }
>
> Any clue why this wouldn't work? I swear I've done something like
> this in the RI and I might try it there to see if that works.
>
> Thanks for the help.
> Mike
>