h:graphicImage and rich:componentControl
philippe.savoie Apr 8, 2010 10:37 AMHello,
I have 2 images that I would like to toggle using <rich:componentControl>. With the following code, nothing happens to the images when I click on one or the other. The only examples I've found that use componentControl want to show/hide modal panels, so maybe it wasn't meant to work on images.
<h:graphicImage id="showSummary"
value="${icons}/positive.gif"
alt="#{bundle['searchResults.showSummary']}"
rendered="#{monitoringSearchFilters.suppressSummaries}"
onclick="showSummary(#{row.rowID})"
styleClass="pointer" >
<rich:componentControl attachTo="showSummary" for="hideSummary" event="onclick" operation="show"/>
<rich:componentControl attachTo="showSummary" for="showSummary" event="onclick" operation="hide"/>
</h:graphicImage>
<h:graphicImage id="hideSummary"
value="${icons}/negative.gif"
alt="#{bundle['searchResults.hideSummary']}"
rendered="#{monitoringSearchFilters.suppressSummaries}"
onclick="hideSummary(#{row.rowID})"
styleClass="pointer">
<rich:componentControl attachTo="hideSummary" for="hideSummary" event="onclick" operation="hide"/>
<rich:componentControl attachTo="hideSummary" for="showSummary" event="onclick" operation="show"/>
</h:graphicImage>
Philippe