Not sure. It seems like it should work. I have dataTables nested
inside of dataLists.
One thing I do differently is bind my UIData components to the backing
bean and ask for the data directly, ie,
<h:dataTable binding="#{bean.childUIData}" value="#{p.childModel}" var="c">
transient private UIData childUIData;
// getters & setters for the above
Child c = (Child) childUIData.getRowData();
On 7/12/06, Michael Litherland <[EMAIL PROTECTED]> wrote:
I really appreciate the suggestions I've received, but I'm wondering
if anybody has any other suggestions as to how I can overcome my
difficulties. There's definitely an issue when nesting dataTables
like this, whether it's MyFaces or Tomahawk dataTable. How do other
people try to show heirarchical data? Assuming JSF isn't going to do
what I want it to what's a work around?
Thanks much, sorry that I'm so frustratred with this,
Mike
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
>