0

我正在使用以下代码在丰富的 DataTable 中显示动态图像。Onclick 缩略图我需要显示从不同位置获取的完整图像。

但是第二个 a4j:mediaOutput 标记正在获取所有完整图像并保存在内存中。(当然 modalPanel 仅在点击时显示)

我希望第二个 a4j:mediaOutput 标记仅在单击后调用 daImageRetrievalBean.retrieveFullImage 。

请帮忙。


4

1 回答 1

0
                            <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>
于 2009-07-17T09:05:50.873 回答