1 Reply Latest reply on Apr 8, 2010 2:33 PM by Nick Belaevski

    h:graphicImage and rich:componentControl

    Philippe Savoie Newbie

      Hello,

       

      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