0 Replies Latest reply on Sep 6, 2007 6:33 AM by Matthias Graehn

    Call modal panel from included page

    Matthias Graehn Newbie

      Hi ,

      is it possible to call a modal panel from a rich:menu component. The
      actionListener includes the page with the dialog dynamically and in the
      same step calls the dialog from the included page.

      Background: I have many dialogs which should be used but do not want to inlude all together in one page.

      The following code does not work as expected:

      <rich:menuItem submitMode="none"
       onclick="javascript:Richfaces.showModalPanel('newMessage',{width: 620, top:60, height:500})">
       <a4j:commandLink
       value="#{msg['menu_communication_messages_newMessage']}"
       actionListener="#{navigationHandler.doNewMessages}"
       oncomplete="javascript:Richfaces.showModalPanel('newMessage',{width: 620, top:60, height:500})"
       reRender="dynamicDialogs" />
      </rich:menuItem>
      


      page:
      <ui:define name="dialogs">
       <rich:panel id="dynamicDialogs">
       <a4j:include viewId="#{navigationHandler.currentDialog}" />
       </rich:panel>
      </ui:define>
      


      It works only after the second click. Any idea how I could improve this working right with the first mouse click?

      Greets

      Matt