You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by navnath kumbhar <ku...@gmail.com> on 2010/03/17 08:52:34 UTC

How to fill child table records on the row selection of parent table (Nested Tables) in Trinidad.

Hi All,

I am using Trinidad 2.0.0 and myfaces 2.0.0
I am trying to implement nested tables using tr:table tag of Trinidad.
It's showing child table on each row of parent table.
But the problem is different child records in child table on the selection
from parent table's row?

Is there any action or event should I call in child table.

Here is my code snippets:
jspx file

<tr:table var="row" rowSelection="multiple"
                        value="#{saveData.nameList}"
binding="#{tableActions.table}">
                        <tr:column>
                            <f:facet name="header">
                                <tr:outputText value="Name" />
                            </f:facet>
                            <tr:inputText value="#{row.name}" />
                        </tr:column>
                        <tr:column>
                            <f:facet name="header">
                                <tr:outputText value="Gender" />
                            </f:facet>
                            <tr:selectOneChoice value="#{row.selectGender}">
                                <f:selectItems value="#{row.gendar}" />

                            </tr:selectOneChoice>


                        </tr:column>

                        <tr:column>
                            <f:facet name="header">
                                <tr:outputText value="Address" />
                            </f:facet>
                            <tr:inputText value="#{row.add}" />

                        </tr:column>

                        <f:facet name="detailStamp">
                            <tr:table var="row" rowSelection="multiple"
                                binding="#{tableActions.tableContact}"
                                value="#{saveData.nestedNameList}">
                                <tr:column>
                                    <f:facet name="header">
                                        <tr:outputText value="Second Name"
/>
                                    </f:facet>
                                    <tr:inputText value="#{row.name}" />
                                </tr:column>
                                <tr:column>
                                    <f:facet name="header">
                                        <tr:outputText value="Gender" />
                                    </f:facet>
                                    <tr:selectOneChoice
value="#{row.selectGender}">
                                        <f:selectItems value="#{row.gendar}"
/>

                                    </tr:selectOneChoice>


                                </tr:column>

                                <tr:column>
                                    <f:facet name="header">
                                        <tr:outputText value="Address" />
                                    </f:facet>
                                    <tr:inputText value="#{row.add}" />
                                </tr:column>
                                <tr:column>
                                    <f:facet name="header">
                                        <tr:outputText value="Subtable" />
                                    </f:facet>
                                </tr:column>


                            </tr:table>
                        </f:facet>


                    </tr:table>


Can any one suggest me, how do I fill child table on the bases of row
selection in parent table?

Thank You,
Navnath Kumbhar.