0
我有一個要求,在點擊圖像時我需要在模態面板上顯示相同圖像的較大尺寸。如何訪問在模態面板中傳遞的參數
爲此,我所做的就是將圖像位置作爲f:param傳遞給模態面板,然後在圖像標記中使用傳遞的參數。
但不知何故,我無法獲得我傳遞參數的值。
下面是代碼:
這是我如何激活modalPanel我如何傳遞參數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>
這是模式面板代碼,我如何試圖讓F:參數值在這裏...
<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>
你能告訴我如何訪問傳遞的參數值嗎?
問候,
薩蒂亞
那是對的,我已經完成了它使用JavaScript。我不必爲此使用f:param – Satya 2011-04-04 15:29:15