2 Replies Latest reply on Mar 27, 2012 6:05 AM by schmu

    seam page action and rich:modalPanel

    knice147

      Is there a way to get a page action to fire when a rich:modalPanel opens up?  Can it be done from the pages.xml?

        • 1. Re: seam page action and rich:modalPanel
          damianharvey.damianharvey.gmail.com

          You'd be better to call it using the modals onbeforeshow (or onshow) event.


          I can think of a couple of approaches:


          1. Add an a4j:support tag to the modal (haven't tried this but should work). eg:



          <rich:modalPanel id="modal">
            <a4j:support event="onbeforeshow" action="#{myBean.myPageAction}" ajaxSingle="true" reRender="modalDiv"/>
            <s:div id="modalDiv">
            ...
            </s:div>
          </rich:modalPanel>
          




          2. Use an a4j:jsFunction



          <rich:modalPanel id="modal" onbeforeshow="doAction">
            <s:div id="modalDiv">
            ...
            </s:div>
          </rich:modalPanel>
          
          <a4j:jsFunction name="doAction" action="#{myBean.myPageAction}" reRender="modalDiv"/>
          



          Cheers,


          Damian.

          • 2. Re: seam page action and rich:modalPanel
            schmu

            Hello together

             

            The first solution is not working. But I have no idea why ... Maybe it's because we are now already on the Richfaces Version V3.3.3.FINAL...