4 Replies Latest reply on Mar 15, 2013 4:12 AM by semubiz

    problem with extendedDataTable in TabPanel

    perdure

      Problem with extendedDataTable in tabPanel, it shows no table in the page, but html code was generated,

       

       

      <h:form prependId="false">
                              <rich:tabPanel switchType="client">
                                  <rich:tab header="Tab1">
                                      <rich:extendedDataTable value="#{myRichBean.mydata}" var="data">
                                          <rich:column>
                                              <f:facet name="header">
                                                  column
                                              </f:facet>
                                          </rich:column>
                                          <rich:column>
                                              <f:facet name="header">
                                                  column2
                                              </f:facet>
                                              <a4j:commandLink value="#{data.id}"/>
                                          </rich:column>
                                          <rich:column>
                                              <f:facet name="header">
                                                  column2
                                              </f:facet>
                                              <h:outputText value="#{data.name}"/>
                                          </rich:column>
                                          <rich:column>
                                              <f:facet name="header">
                                                  column2
                                              </f:facet>
                                              <h:outputText value="#{data.value}"/>
                                          </rich:column>
                                      </rich:extendedDataTable>
                                  </rich:tab>
                                  <rich:tab header="Tab2">
                                      <rich:extendedDataTable id="bills" value="#{myRichBean.anotherMydata}" var="bill">
                                          <rich:column>
                                              <f:facet name="header">
                                                  column3
                                              </f:facet>
                                              <h:outputText value="#{bill.id}"/>
                                          </rich:column>
                                          <rich:column>
                                              <f:facet name="header">
                                                  column3
                                              </f:facet>
                                              <h:outputText value="#{bill.name}"/>
                                          </rich:column>
                                          <rich:column>
                                              <f:facet name="header">
                                                  column3
                                              </f:facet>
                                              <h:outputText value="#{bill.value}"/>
                                          </rich:column>
                                      </rich:extendedDataTable>
                                  </rich:tab>
                              </rich:tabPanel>
                          </h:form>
      

       

      richfaces version: richfaces-4.1.0 M2

       

      here is the screensnap:

        • 1. Re: problem with extendedDataTable in TabPanel
          mcmurdosound

          have you tried: switchType="ajax"? Do your extdts work outside of the rich:tabPanel?

          • 2. Re: problem with extendedDataTable in TabPanel
            perdure

            hi, thanks, it works fine with attribute "switchType="ajax". but i dont't want it loaded everytime with ajax, when i click the Tab. Do you have any idea?

            • 3. Re: problem with extendedDataTable in TabPanel
              mcmurdosound

              you could surround each extendeddatatable with an a4j:region without any addition parameter.

              • 4. Re: problem with extendedDataTable in TabPanel
                semubiz

                Another workaround (keeps switchType="client")

                 

                {code:xml}

                <rich:tabPanel switchType="client">

                <rich:tab header="Information">

                    <h:outputText value="hello"/>

                </rich:tab>

                <rich:tab header="Tab with Table" onenter="renderTable()">

                    <h:form>

                    <a4j:jsFunction name="renderTable" render="myTable" />

                    <rich:extendedDataTable id="myTable" value="#{myRichBean.mydata}" var="data">

                        <rich:column>

                            <f:facet name="header">

                                column

                            </f:facet>

                        </rich:column>

                        <rich:column>

                            <f:facet name="header">

                                column2

                            </f:facet>

                            <a4j:commandLink value="#{data.id}"/>

                        </rich:column>

                    </rich:extendedDataTable>

                    </h:form>

                </rich:tab>

                </rich:tabPanel>

                {code}