1 Reply Latest reply on Nov 7, 2011 11:16 AM by Flavio Palumbo

    ExtendedDataTable doesn't show table grid

    Flavio Palumbo Newbie

      Hi all,

      probably is a silly post ... but I'm getting crazy for it.

      I have an ExtendedDataTable I'm trying to migrate from rf 3.3.3 to rf 4.0, but I'm not able to display neither table grid nor columns header.

      It seems so simple  but it doesn't work.

      Any hint would be appreciated.

      Flavio

       

      Here is my code:

      {code}

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                      xmlns:ui="http://java.sun.com/jsf/facelets"
                      xmlns:h="http://java.sun.com/jsf/html"
                      xmlns:f="http://java.sun.com/jsf/core"
                      xmlns:a4j="http://richfaces.org/a4j"
                      xmlns:rich="http://richfaces.org/rich"
                      xmlns:richext="http://java.sun.com/jsf/composite/richext">

          <h:form id="ESBankform">
              <rich:panel header="#{mess.bankTitleList}" headerClass="panel-header-class">
                  <rich:extendedDataTable
                      value="#{eSBank.dataModel}" var="item" id="ESBankTable"
                      sortMode="#{eSBank.sortMode}"
                      selectionMode="single"
                      frozenColumns="2"
                      style="height:400px; width:730px;"
                      selection="#{eSBank.selection}">
                      <a4j:ajax execute="@form"
                                event="selectionchange"
                                listener="#{eSBank.selectionListener}" />
                      <rich:column id="a1id_col" width="40px" styleClass="text-to-right">
                          <f:facet name="header">
                              <h:outputText value="#{mess.labelBankId}"/>
                          </f:facet>
                          <h:outputText value="#{item.a1id}" id="a1id_fld"/>
                      </rich:column>
                      <rich:column id="a1deba_col" width="250px">
                          <f:facet name="header">
                              <h:outputText value="#{mess.labelBankDes}" />
                          </f:facet>
                          <h:outputText value="#{item.a1deba}" id="a1deba_fld"/>
                      </rich:column>
                      <rich:column id="a1idso_col" width="100px">
                          <f:facet name="header">
                              <h:outputText value="#{mess.labelBankSoc}" id="a1idso_hea"/>
                          </f:facet>
                          <h:outputText value="#{item.descSoc}" id="a1idso_fld"/>
                      </rich:column>
                      <rich:column id="a1user_col" width="100px">
                          <f:facet name="header">
                              <h:outputText value="#{mess.labelUser}" id="a1user_hea"/>
                          </f:facet>
                          <h:outputText value="#{item.a1user}" id="a1user_fld"/>
                      </rich:column>
                      <rich:column id="a1usva_col" width="100px">
                          <f:facet name="header">
                              <h:outputText value="#{mess.labelUserVar}" id="a1usva_hea"/>
                          </f:facet>
                          <h:outputText value="#{item.a1usva}" id="a1usva_fld"/>
                      </rich:column>
                      <rich:column id="a1dtva_col" width="140px">
                          <f:facet name="header">
                              <h:outputText value="#{mess.labelDataVar}" id="a1dtva_hea"/>
                          </f:facet>
                          <h:outputText value="#{item.a1dtva}" id="a1dtva_fld">
                              <f:convertDateTime pattern="dd-MM-yyyy HH:mm:ss" />
                          </h:outputText>
                      </rich:column>
                  </rich:extendedDataTable>
                  <rich:panel>
                      <a4j:commandLink render="ESBankEditPanel" 
                                       action="#{eSBank.editSetup}"
                                       oncomplete="#{rich:component('ESBankEditPanel')}.show()" >
                          <h:graphicImage url="/resources/images/nuovo.png" title="#{mess.tipInsert}"/>
                          <f:setPropertyActionListener value="I" target="#{eSBank.curFunc}" />
                      </a4j:commandLink>
                      <a4j:commandLink render="ESBankEditPanel" 
                                       action="#{eSBank.editSetup}"
                                       oncomplete="if (!ajaxRequestContainsErrors()) #{rich:component('ESBankEditPanel')}.show();" >
                          <h:graphicImage url="/resources/images/edit.png" title="#{mess.tipEdit}"/>
                          <f:setPropertyActionListener value="M" target="#{eSBank.curFunc}" />
                      </a4j:commandLink>
                      <a4j:commandLink render="ESBankTableDel" 
                                       action="#{eSBank.editSetup}"
                                       oncomplete="if (!ajaxRequestContainsErrors()) #{rich:component('ESBankDeletePanel')}.show();" >
                          <h:graphicImage url="/resources/images/delete.png" title="#{mess.tipDelete}"/>
                          <f:setPropertyActionListener value="D" target="#{eSBank.curFunc}" />
                      </a4j:commandLink>
                  </rich:panel>
                  <richext:spacer height="10" width="100" style="display: block"/>
                  <rich:messages id="ESBankTableErr"/>
              </rich:panel>
          </h:form>
          <ui:include src="/tables/eSBank/ESBankDelete.xhtml"/>
          <ui:include src="/tables/eSBank/ESBankEdit.xhtml"/>
      </ui:composition>

      {code}

        • 1. Re: ExtendedDataTable doesn't show table grid
          Flavio Palumbo Newbie

          Hi,

          I tried to follow on my problem putting in my project the ExtendedDataTable  with selection example from live demo ; the behavior is the same no table grid, no table column.

          I've seen a mismatch beetwen listener="#{extTableSelectionBean.selectionListener}" in the page and the method on the bean which needs like parameter an object of type AjaxBehaviorEvent ; maybe the problem is due to this mismatch.

           

          Any hint would be appreciated.

          Flavio