4 Replies Latest reply on Apr 4, 2011 11:31 AM by satyakatti

    How to access passed parameter in modalPanel

    satyakatti

      Hi All,

       

      I have a requirement in which on click of the image I need to display the bigger size of the same image on the modal panel.

       

      For this what I did was to pass the image location as a f:param to the modal panel and then use the passed parameter in image tag.

       

      But somehow I am not able to get the value of parameter I pass.

       

      Here is the code :

       

      This is how I activate the modalPanel and how I pass the parameter usingf:param

       

          <h:graphicImage value="../images/DSCN0965.JPG" height="50" width="50" styleClass="iconClass">

               <rich:componentControl for="imagePanel" operation="show" event="onclick">

                   <f:param value="../images/DSCN0965.JPG" name="imagePath"/>

               </rich:componentControl>

           </h:graphicImage>

       

      This is modal panel code and how I try to get the f:param value here...

       

          <rich:modalPanel id="imagePanel" width="600" height="600">

                <f:facet name="header">

                    <h:panelGroup>

                        <h:outputText value="Image"></h:outputText>

                    </h:panelGroup>

                </f:facet>

                <f:facet name="controls">

                    <h:panelGroup>

                        <h:graphicImage value="../images/closeIcon.GIF" styleClass="iconClass" id="closeImageLink"/>

                        <rich:componentControl for="imagePanel" attachTo="closeImageLink" operation="hide" event="onclick"/>

                    </h:panelGroup>

                </f:facet>

                <h:outputLabel value="#{imagePath}"/>

                <h:graphicImage value="{imagePath}" height="400" width="500" styleClass="iconClass"/>

            </rich:modalPanel>

       

      Can you give me idea as to how to access the passed parameter value?

       

      Regards,

      Satya