调用Rich Modal Panel Onclick [英] Invoke Rich Modal Panel Onclick
本文介绍了调用Rich Modal Panel Onclick的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用以下代码在丰富的DataTable中显示动态图像.单击缩略图的onclick时,我需要显示从不同位置获取的完整图像.
I am using the following code for displaying dynamic image in rich DataTable. Onclick of the thumbnail I need to display Full Image fetched from different location.
但是第二个a4j:mediaOutput标签正在获取所有完整图像并保存在内存中.(当然,"modalPanel"仅在单击时显示)
But the second a4j:mediaOutput tag is fetching all the Full images and keeping in memory. (Ofcourse modalPanel is displayed on click only )
我希望第二个a4j:mediaOutput标签仅在单击后才调用daImageRetrievalBean.retrieveFullImage.
I want the second a4j:mediaOutput tag to call daImageRetrievalBean.retrieveFullImage only after click.
请帮助.
推荐答案
<h:outputLink value="#" id="link">
<a4j:mediaOutput element="img" cacheable="false" session="true" style="height:75px; width:75px;"
createContent="#{daImageRetrievalBean.retrieveThumbnail}" value="#{digAsset.digitalAssetId}" mimeType="image/jpeg" />
<rich:componentControl for="panel" attachTo="link" operation="show" event="onclick">
</rich:componentControl>
</h:outputLink>
<rich:modalPanel id="panel" resizeable="false" autosized="true" minHeight="650" minWidth="700">
<f:facet name="header">
<h:outputText value="#{digAsset.fileName} Click on the image to hide" />
</f:facet>
<f:facet name="controls">
<h:panelGroup>
<a4j:mediaOutput element="img" cacheable="false" session="true" id="hidelink" style="height:600px; width:700px;margin-top: 30px"
createContent="#{daImageRetrievalBean.retrieveFullImage}" value="#{digAsset.fileName}" mimeType="image/jpeg" />
<rich:componentControl for="panel" attachTo="hidelink" operation="hide" event="onclick"/>
</h:panelGroup>
</f:facet>
</rich:modalPanel>
这篇关于调用Rich Modal Panel Onclick的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文