0 Replies Latest reply on Dec 29, 2008 9:11 AM by Gregor Jarisch

    extendedDataTable loses js-listener after submitting a form

    Gregor Jarisch Newbie

      hi,

      i'm facing a problem with extendedDataTable.
      I have a table with some entries. onRowClick a panel on the right side opens, showing details of the table entry. In this panel there is a edit-button to change values of the entry. Therefore a modalpanel opens. After submitting the new values via modalpanel, the table loses the onRowClick event. In other words, doesn't matter on which row i click, nothing gets rerendered anymore.

      It hasn't anything to do with rerendering itself out of a different form, more likely it seems to come up as some as a actionListener is fired in the modalpanel form.

      any suggestions?

      <rich:modalPanel id="editPanel" width="600" height="500">
       <a4j:keepAlive beanName="Order" />
       <f:facet name="header">
       <h:panelGroup>
       <h:outputText id="modalTitle" value="#{Panel.title}" escape="false" />
       </h:panelGroup>
       </f:facet>
       <h:form>
       <a4j:include ajaxRendered="false" viewId="#{Panel.path}" />
      
       <h:panelGrid columns="3">
       <a4j:commandButton id="save"
       value="Speichern"
      
      
       actionListener="#{Order.submitOrder}"
       oncomplete="Richfaces.hideModalPanel('editPanel')"
      reRender="showOrders" />
       <a4j:commandButton id="cancel"
       value="Abbrechen"
       onclick="Richfaces.hideModalPanel('editPanel')" />
       </h:panelGrid>
       </h:form>
      </rich:modalPanel>
      
      <a4j:jsFunction name="refreshViewPanel" actionListener="#{Order.loadSelectedOrder}" reRender="viewPanel" />
      <h:panelGrid id="showOrders" columns="2">
       <a4j:keepAlive beanName="Panel" ajaxOnly="true" />
       <rich:extendedDataTable id="chosenItems"
       value="#{Order.orders}" var="item"
       width="500px" height="250px"
       selectionMode="single"
       sortMode="multi"
       selection="#{Order.selectedRows}"
       binding="#{Order.openOrderTable}"
       onRowClick="refreshViewPanel()">
       <rich:column sortable="true" width="150px" filterBy="#{item.company.company}" filterEvent="onblur">
       <f:facet name="header">
       <h:outputText value="Firma"/>
       </f:facet>
       <h:outputText value="#{item.company.company}"/>
       </rich:column>
       <rich:column sortable="true" width="150px" filterBy="#{item.person.fullname}" filterEvent="onblur">
       <f:facet name="header">
       <h:outputText value="Kontaktperson"/>
       </f:facet>
       <h:outputText value="#{item.person.fullname}"/>
       </rich:column>
       <rich:column sortable="true" width="100px" filterBy="#{item.order.startdate}" filterEvent="onblur">
       <f:facet name="header">
       <h:outputText value="Auftragsstart"/>
       </f:facet>
       <h:outputText value="#{item.order.startdate}"/>
       </rich:column>
       <rich:column sortable="true" width="100px" filterBy="#{item.order.enddate}" filterEvent="onblur">
       <f:facet name="header">
       <h:outputText value="Auftragsende"/>
       </f:facet>
       <h:outputText value="#{item.order.enddate}"/>
       </rich:column>
       </rich:extendedDataTable>
      ...
      <h:panelGrid id="showOrders" columns="2">