4 Replies Latest reply on Feb 10, 2009 11:00 PM by Thomas Marcon

    "Error evaluate oncomplete function undefined"

    Thomas Marcon Newbie


      I've got a page with a tabPanel. Each tab shows a dataTable, and for each row of the dataTable, several action buttons are available.

      It is the SAME CODE for both tabs, only a small property (archived) value is changed between the two tabs.

      Here is my dataTable code (shared for both tabs):

      <rich:dataTable id="#{tableId}" value="#{eventConsult.eventsDataTable.rowsDataModel}" var="event">
      <rich:column id="richcolumn_6">
      <a4j:commandButton image="..." title="..." actionListener="#{eventConsult.showInfos}" reRender="eventDrawingLotDetailPanel_10" oncomplete="#{rich:component('eventDrawingLotDetailPanel_10')}.show()" />
      <a4j:commandButton image="..." title="..." action="#{eventConsult.showExport}" reRender="eventExportPanel" oncomplete="#{rich:component('eventExportPanel')}.show()" />

      each commandButton first re-render a hidden modal panel content (with current row data) and then show it.

      The tricky thing is it is working on the first tab, but for the second tab, the exact same code does nothing.

      Well in fact it call the action method, and in a4j log I see that the request is done, but at the end of a4j log I get : "Error evaluate oncomplete function undefined"...

      Could someone explain this ?

        • 1. Re:
          Nick Belaevski Master


          Please check whether id='eventExportPanel' component exists in view and is rendered to the client.

          • 2. Re:
            Thomas Marcon Newbie

            Yes it is, I see it in the HTML output. And I see the panel being refreshed as I put breakpoints in the panel getters... Only the oncomplete part with the panel being shown is not working.

            • 3. Re:
              Thomas Marcon Newbie

              I did a quick test and replaced oncomplete="#{rich:component('eventExportPanel')}.show() with oncomplete="alert('toto'); and it works...

              Maybe it's the rich:component part that does not work well ?

              • 4. Re:
                Thomas Marcon Newbie

                I found the solution to this problem.
                For those who are interested I replaced this code :




                by this one




                on dataTable buttons and it works. I still don't know why the previous implementation did not work, since it worked on one of the two tabs...

                Maybe this should be investigated.