ContextMenu - Target ContextMenu can be attached to any component, right-click on ImageSwitch component for options.
<p:imageSwitch id="images" effect="fade" widgetVar="gallery" slideshowAuto="false">
    <p:graphicImage name="/demo/images/nature/nature1.jpg" />
    <p:graphicImage name="/demo/images/nature/nature2.jpg" />
    <p:graphicImage name="/demo/images/nature/nature3.jpg" />
    <p:graphicImage name="/demo/images/nature/nature4.jpg" />
</p:imageSwitch>

<p:contextMenu for="images">
    <p:menuitem value="Prev" url="javascript:void(0)" onclick="PF('gallery').previous()" icon="ui-icon-triangle-1-w" />
    <p:menuitem value="Next" url="javascript:void(0)" onclick="PF('gallery').next()" icon="ui-icon-triangle-1-e" />
    <p:menuitem value="Remove" url="javascript:void(0)" onclick="PF('gallery').getJQ().fadeOut()" icon="ui-icon-close"/>
</p:contextMenu>
                
PrimeTek, Copyright © 2017
All rights reserved.
Running PrimeFaces-6.2-SNAPSHOT on Mojarra-2.3.2.