0 Replies Latest reply on Oct 15, 2008 11:10 AM by anders.norgaard

    Show modal panel from rich:fileupload's onuploadcomplete ?

    anders.norgaard

      Hi,

      I have

       <rich:modalPanel id="fwnamepanel" width="350" height="100">
       <f:facet name="header">
       <h:panelGroup>
       <h:outputText value="Modal Panel"></h:outputText>
       </h:panelGroup>
       </f:facet>
       <f:facet name="controls">
       <h:panelGroup>
       <h:graphicImage value="/img/close.png" style="cursor:pointer" id="hidelink"/>
       <rich:componentControl for="fwnamepanel" attachTo="hidelink" operation="hide" event="onclick"/>
       </h:panelGroup>
       </f:facet>
       <h:outputText value="This panel is called using Component Control Component"></h:outputText>
       <br/>
       <h:outputText value="Closure link (X) works also through Component Control"></h:outputText>
       </rich:modalPanel>
      
       <h:outputLink value="#" id="link">
       Show Modal Panel
       <rich:componentControl for="fwnamepanel" attachTo="link" operation="show" event="onclick"/>
       </h:outputLink>
      


      almost directly from the example (only changed name and icon location). Now I would like to activate it from

      <rich:fileUpload fileUploadListener="#{firmwaremanager.uploadEventListener}"
       id="upload"
       immediateUpload="true"
       acceptedTypes="bin"
       listWidth="100%"
       onuploadcomplete="Richfaces.showModalPanel('fwnamepanel')"
       >
       </rich:fileUpload>
      


      but it does not work. Any ideas?

       onuploadcomplete="alert('fwnamepanel')"
      


      works.

      Best,
      Anders