a4j:ajaxListener 实现ajax更新功能

<h:dataTable value="#{pictures.al}" var="pics">

<f:facet name="header">

<f:verbatim>Data table with Pictures and Zoom Elements</f:verbatim>

</f:facet>

<h:column>

<h:panelGroup id="rerenderpic">

            <h:graphicImage value="#{pics.flag}" width="#{pics.width}" height="#{pics.height}"

                style="display:block;"/>
<a4j:commandLink value="Zoom In" action="#{pictures.zoomIn}" reRender="rerenderpic"

                style="display:#{pics.zoomed ? 'none': 'block'}">

<a4j:actionparam value="#{pics.flag}" name="picture"/>

<a4j:ajaxListener type="org.ajax4jsf.ajax.ForceRender"/>

</a4j:commandLink>

            <a4j:commandLink value="Zoom Out" action="#{pictures.zoomOut}" reRender="rerenderpic" 

                style="display:#{pics.zoomed ? 'block': 'none'}">

<a4j:actionparam value="#{pics.flag}" name="picture"/>

<a4j:ajaxListener type="org.ajax4jsf.ajax.ForceRender"/>

</a4j:commandLink>

</h:panelGroup>

</h:column>

</h:dataTable>

 

你可能感兴趣的:(Hibernate,Ajax,Richfaces,F#)