2 Replies Latest reply on Nov 1, 2008 4:12 PM by goompas goompas

    rich:extendedDataTable not rerendered when sorting or groupi

    Ralf Newbie

      We have recently chnaged to tomcat 6 and myfaces 1.2 and now I wanted to try the new extendedDataTable.

      The problem is that, when clicking the sort function, the table disappears and stays grey. Also if I click on group by or disable a column, nothing happens.

      Another question is..how can I translate the labels in the popup?

      Heres my jsp:

      <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
       pageEncoding="ISO-8859-1"%>
      
      <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
      <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
      <%@ taglib prefix="t" uri="http://myfaces.apache.org/tomahawk"%>
      <%@ taglib prefix="a4j" uri="http://richfaces.org/a4j"%>
      <%@ taglib prefix="rich" uri="http://richfaces.org/rich"%>
      
      <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
      
       <f:view locale="#{user.locale}">
       <t:document>
       <t:documentHead>
       <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
       <LINK rel="stylesheet" type="text/css" href="/sdps2/app/theme/master.css">
       <script src="/sdps2/app/theme/sdps.js" type="text/javascript"></script>
       <title><h:outputText value=" #{msg.title_rentalGlobal}" /></title>
       </t:documentHead>
       <t:documentBody>
      
       <f:loadBundle var="msg" basename="de.scania.sdps.resources.resources" />
       <f:loadBundle var="style" basename="de.scania.sdps.resources.style" />
      
       <t:div styleClass="pageContainer">
      
       <h:form id="form">
       <%@ include file="../../jspf/globalHeaderJsf.jspf"%>
      
       <t:div styleClass="standardContainer">
      
       <rich:panel id="contractDetails" styleClass="standardContainer">
       <f:facet name="header">
       <h:outputText value="#{msg.contracts_search_header}" />
       </f:facet>
       <h:panelGroup>
      
       <h:panelGrid columns="16" style="font-weight:10" cellpadding="1">
      
       <h:outputText value="#{msg.contracts_contractNo}"
       styleClass="standardOutputText" />
       <h:inputText value="#{rentalContracts.searchContractNo}" style="width:50px"
       styleClass="standardInputText" id="i1"/>
      
       <h:outputText value="#{msg.chassis_no}" />
       <h:inputText value="#{rentalContracts.searchChassisNo}" id="i2" style="width:55px" styleClass="standardInputText"/>
      
       <h:outputText value="#{msg.chassis_registration}/#{msg.chassis_ident}"
       styleClass="standardOutputText" />
       <h:inputText value="#{rentalContracts.searchRegistration}"
       style="width:70px" styleClass="standardInputText" id="i3" />
       <h:outputText value="#{msg.global_customer}"
       styleClass="standardOutputText" />
       <h:inputText value="#{rentalContracts.searchCustomer}"
       style="width:70px" styleClass="standardInputText" id="i4" />
       <h:outputText value="#{msg.contracts_contractSubsidary}"
       styleClass="standardOutputText" />
       <h:selectOneMenu value="#{rentalContracts.searchLocation}"
       style=" width : 150px;" styleClass="standardInputText">
       <f:selectItems value="#{defaultValues.searchLocationArray}" />
       </h:selectOneMenu>
      
       <t:selectBooleanCheckbox id="searchActiveContracts" value="#{rentalContracts.searchActiveContracts}" >
       <a4j:support event="onclick" actionListener="#{rentalContracts.search}" reRender="contractsTable"></a4j:support>
       </t:selectBooleanCheckbox>
       <h:outputText value="#{msg.contracts_search_onlyActive}"
       styleClass="standardOutputText" />
      
       <h:commandButton value="#{msg.global_button_search}"
       action="#{rentalContracts.search}" style="width:55px"
       styleClass="standardButton"/>
       <h:commandButton image="/app/images/clear.gif" style="width:25px"
       action="#{rentalContracts.searchClear}" immediate="true"/>
      
       </h:panelGrid>
       </h:panelGroup>
       </rich:panel>
      
       <%-- Advanced Search --%>
       <rich:togglePanel id="toggleAdvancedSearchID" switchType="ajax" stateOrder="closed, display" initialState="#{rentalContracts.searchAdvancedState}">
      
       <f:facet name="closed">
       <rich:spacer></rich:spacer>
       </f:facet>
      
       <f:facet name="display">
       <rich:panel styleClass="standardContainer">
      
       <h:panelGrid columns="6">
      
       <h:outputText value="#{msg.global_maxRows}" />
       <rich:inputNumberSpinner value="#{user.maxRows}" required="true" inputSize="3" step="10" minValue="1" maxValue="999"/>
      
       <h:outputText value="#{msg.contracts_contractStatus}"/>
       <h:selectOneMenu value="#{rentalContracts.searchStatus}" styleClass="standardInputText" style="width:150px">
       <f:selectItems value="#{defaultValues.searchStatusArray}" />
       </h:selectOneMenu>
      
       <rich:spacer width="100"/>
       <rich:spacer width="110"/>
      
       <h:outputText value="#{msg.chassis_search_chooseDate}" />
       <h:selectOneMenu value="#{rentalContracts.searchContractDateSb}" styleClass="standardInputText" style="width:150px">
       <f:selectItems value="#{defaultValues.chooseDateArray}" />
       <rich:toolTip value="#{msg.toolTip_searchContractDateSb}"
       followMouse="true" styleClass="toolTip" direction="top-right" />
       </h:selectOneMenu>
      
       <h:outputText value="#{msg.global_dateStart}" />
       <a4j:outputPanel layout="inline" >
       <t:inputCalendar id="rentalContractChooseStartDateID"
       renderAsPopup="true"
       renderPopupButtonAsImage="true"
       value="#{rentalContracts.searchContractDateStart}"
       popupTodayString="#{msg.global_todayIs}"
       popupTodayDateFormat="#{msg.global_datePattern}"
       styleClass="standardInputDateComponent">
       <f:convertDateTime pattern="dd.MM.yyyy" timeZone="CET" />
       </t:inputCalendar>
       </a4j:outputPanel>
      
       <h:outputText value="#{msg.global_dateEnd}" />
       <a4j:outputPanel>
       <t:inputCalendar id="rentalContractChooseEndDateID"
       renderAsPopup="true"
       renderPopupButtonAsImage="true"
       value="#{rentalContracts.searchContractDateEnd}"
       popupTodayString="#{msg.global_todayIs}"
       popupTodayDateFormat="#{msg.global_datePattern}"
       styleClass="standardInputDate">
       <f:convertDateTime pattern="dd.MM.yyyy" timeZone="CET" />
       </t:inputCalendar>
       </a4j:outputPanel>
       <rich:spacer width="100"/>
       <rich:spacer width="110"/>
       <rich:spacer width="100"/>
       <rich:spacer width="110"/>
       <rich:spacer width="100"/>
       <rich:spacer width="110"/>
       </h:panelGrid>
       </rich:panel>
       </f:facet>
       </rich:togglePanel>
      
       <rich:toggleControl value="#{msg.global_advancedSearch}" for="form:toggleAdvancedSearchID" switchToState="#{rentalContracts.changeAdvancedState}">
       </rich:toggleControl>
      
       </t:div>
      
       <t:div styleClass="standardContainer">
       <rich:extendedDataTable var="data" value="#{rentalContracts.contractsSearchResult}"
       binding="#{rentalContracts.table}"
       cellpadding="0" cellspacing="0" width="100%"
       rendered="#{not empty rentalContracts.contractsSearchResult}" rowKeyVar="rowIndex"
       onmouseover="this.bgColor='#d8d8d8';"
       onmouseout="this.bgColor='white';"
       id="contractsTable" sortMode="single"
       >
      
       <rich:column width="25px" style="text-align: center;">
       <h:commandButton id="chassisColumnEdit" action="contractDetails"
       actionListener="#{rentalContracts.loadContractDetails}"
       image="/app/images/edit.gif" alt="#{msg.global_button_alt_contractDetails}" >
       <f:param id="contractDealerCodeId" name="contractDealerCode" value=" #{data.contractDealerCode}" />
       <f:param id="contractNoId" name="contractNo" value=" #{data.contractNo}" />
       <f:param id="rowIndexId" name="rowIndex" value="#{rowIndex}" />
       </h:commandButton>
       </rich:column>
      
       <rich:column width="25px" style="text-align: center;" width="18px">
       <h:commandButton action="#{rentalContracts.printAction}"
       actionListener="#{rentalContracts.loadContractDetails}" image="/app/images/print.gif"
       value="#{msg.global_button_print}" alt="#{msg.global_button_alt_print}" >
       <f:param id="contractDealerCodePrintId" name="contractDealerCode" value=" #{data.contractDealerCode}" />
       <f:param id="contractNoPrintId" name="contractNo" value=" #{data.contractNo}" />
       <f:param id="rowIndexPrintId" name="rowIndex" value="#{rowIndex}" />
       </h:commandButton>
       </rich:column>
      
       <rich:column width="25px" style="text-align: center;" >
       <h:commandButton action="chassisDetails"
       actionListener="#{chassis.loadChassisDetails}"
       image="/app/images/truck.gif" alt="#{msg.global_button_alt_chassisDetails}"
       rendered="#{data.contractChassisNo != ''}">
       <f:param id="parmDealerCodeId" name="dealerCode" value="#{data.contractExternalDealerCode}" />
       <f:param id="parmChassisNoId" name="chassisNo" value="#{data.contractChassisNo}" />
       <f:param id="rowIndexLoadId" name="rowIndex" value="#{rowIndex}" />
       </h:commandButton>
       <rich:spacer/>
       </rich:column>
      
       <rich:column width="25px" rendered="#{user.rentalInvoicePermission}" style="text-align: center;">
       <h:commandButton action="#{rentalContracts.showInvoices}"
       actionListener="#{rentalContracts.loadContractDetails}"
       image="/app/images/euro.gif"
       alt="#{msg.global_button_alt_showInvoices}"
       rendered="#{data.contractStatus == 'V' && data.contractCustomerNo != ''}">
       <f:param id="contractDealerCodeInvoiceId" name="contractDealerCode" value=" #{data.contractDealerCode}" />
       <f:param id="contractNoInvoiceId" name="contractNo" value=" #{data.contractNo}" />
       <f:param id="rowIndexInvoiceId" name="rowIndex" value="#{rowIndex}" />
       </h:commandButton>
       <rich:spacer/>
       </rich:column>
      
       <rich:column width="50px" style="text-align: center;" >
       <h:outputText id="contractDealerCodeColumn" value="#{data.contractDealerCode}" />
       </rich:column>
      
       <rich:column width="50px" style="text-align: center;" label="#{msg.contracts_contractSubsidaryShort}">
       <f:facet name="header">
       <h:outputText value="#{msg.contracts_contractSubsidaryShort}"/>
       </f:facet>
       <h:outputText value=" #{data.contractLocation}" id="contractLocationTextID"
       styleClass="standardOutputText" rendered="#{data.contractLocation != ''}" >
       </h:outputText>
       <rich:spacer/>
       </rich:column>
      
       <rich:column width="50px" style="text-align: center;" label="#{msg.contracts_contractNo}">
       <f:facet name="header">
       <h:outputText value="#{msg.contracts_contractNo}"/>
       </f:facet>
       <h:outputText id="contractNoColumn" value="#{data.contractNo}" />
       </rich:column>
      
       <rich:column style="text-align: center;" label="#{msg.contracts_contractStartDate}">
       <f:facet name="header">
       <h:outputText value="#{msg.contracts_contractStartDate}"/>
       </f:facet>
       <h:outputText value="#{data.contractStartDate}"
       styleClass="standardOutputText">
       <f:convertDateTime pattern="dd.MM.yyyy" timeZone="CET"/>
       </h:outputText>
       </rich:column>
      
       <rich:column style="text-align: center;" label="#{msg.contracts_contractEndDate}">
       <f:facet name="header">
       <h:outputText value="#{msg.contracts_contractEndDate}"/>
       </f:facet>
       <h:outputText value="#{data.contractEndDate}"
       styleClass="standardOutputText">
       <f:convertDateTime pattern="dd.MM.yyyy" timeZone="CET"/>
       </h:outputText>
       </rich:column>
      
       <rich:column style="text-align: center;" label="#{msg.contracts_contractChassisNo}">
       <f:facet name="header">
       <h:outputText value="#{msg.contracts_contractChassisNo}"/>
       </f:facet>
       <h:outputText value="#{data.contractChassisNo}"
       styleClass="standardOutputText" />
       <rich:spacer/>
       </rich:column>
      
       <rich:column label="#{msg.chassis_location}">
       <f:facet name="header">
       <h:outputText value="#{msg.chassis_location}"/>
       </f:facet>
       <h:outputText value=" #{data.contractChassisLocation}" id="contractChassisLocationID"
       styleClass="standardOutputText" >
       </h:outputText>
       <rich:spacer/>
       </rich:column>
      
       <rich:column label="#{msg.contracts_contractRegistration}">
       <f:facet name="header">
       <h:outputText value="#{msg.contracts_contractRegistration}"/>
       </f:facet>
       <h:outputText value="#{data.contractRegistration}" />
       <rich:spacer/>
       </rich:column>
      
       <rich:column style="text-align: center;" label="#{msg.chassis_usage}">
       <f:facet name="header">
       <h:outputText value="#{msg.chassis_usage}"/>
       </f:facet>
       <h:outputText value=" #{data.contractUsageShort}"
       styleClass="standardOutputText" />
       <rich:spacer/>
       </rich:column>
      
       <rich:column style="text-align: center;" label="#{msg.customer_customerNo}">
       <f:facet name="header">
       <h:outputText value="#{msg.customer_customerNo}"/>
       </f:facet>
       <h:outputText value="#{data.contractCustomerNo}" />
       <rich:spacer/>
       </rich:column>
      
       <rich:column label="#{msg.customer_name}">
       <f:facet name="header">
       <h:outputText value="#{msg.customer_name}" />
       </f:facet>
       <h:outputText value="#{data.contractCustomerName}" />
       <rich:spacer/>
       </rich:column>
      
       <rich:column style="text-align: center;" label="#{msg.contracts_contractStatus}" sortBy="#{data.contractStatus}" selfSorted="true" sortable="true">
       <f:facet name="header">
       <h:outputText value="#{msg.contracts_contractStatus}" />
       </f:facet>
       <h:outputText value="#{data.contractStatus}" />
       <rich:spacer/>
       </rich:column>
      
       <f:facet name="footer">
       <h:outputFormat value="#{msg.contracts_table_searchResult_footer}">
       <f:param value="#{user.maxRows}" />
       </h:outputFormat>
       </f:facet>
      
       </rich:extendedDataTable>
       </t:div>
       </h:form>
       <%@ include file="../../jspf/globalFooter.jspf"%>
       </t:div>
       </t:documentBody>
       </t:document>
      </f:view>
      


        • 1. Re: rich:extendedDataTable not rerendered when sorting or gr
          Ralf Newbie

          Maybe this message from Firefox gives a hint?


          this.splashScreen is null
          toggleImageSource()()extended....js.faces (Linie 9)
          initialize()()extended....js.faces (Linie 14)
          initialize()(true)extended....js.faces (Linie 15)
          destroy()()extended....js.faces (Linie 4)
          unbreakableEach()(function(), function(), 100)common-s....js.faces (Linie 32)
          initialize()("form:contractsTable", Object minColumnWidth=20 selectionMode=single)extended....js.faces (Linie 4)
          klass()3_2_2.GA...ipt.faces (Linie 5)
          drop()index.faces (Linie 187)
          [Break on this error] Event.stop(event);},preSendAjaxRequest:f...his.onGroupToggleFct(event,groupIndex);}


          splshscr is null
          toggleImageSource()()extended....js.faces (Linie 9)
          preSendAjaxRequest()(click clientX=964, clientY=150)extended....js.faces (Linie 8)
          clone()(click clientX=964, clientY=150)3_2_2.GA...ipt.faces (Linie 18)
          wrapper()()3_2_2.GA...ipt.faces (Linie 242)
          [Break on this error] Event.stop(event);},preSendAjaxRequest:f...his.onGroupToggleFct(event,groupIndex);}

          • 2. Re: rich:extendedDataTable not rerendered when sorting or gr
            goompas goompas Newbie

            I have too this problem, do you have resolve it?