ContextMenu - Target

ContextMenu can be attached to any component, right-click on ImageSwitch component for options.

Documentation
<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="pi pi-caret-left" />
    <p:menuitem value="Next" url="javascript:void(0)" onclick="PF('gallery').next()" icon="pi pi-caret-right" />
    <p:menuitem value="Remove" url="javascript:void(0)" onclick="PF('gallery').getJQ().fadeOut()" icon="pi pi-times"/>
</p:contextMenu>

FREE THEMES

Built-in component themes created by the PrimeFaces Theme Designer.

nova-light Nova-Light
nova-dark Nova-Dark
nova-colored Nova-Colored
luna-blue Luna-Blue
luna-amber Luna-Amber
luna-green Luna-Green
luna-pink Luna-Pink
omega Omega

PREMIUM TEMPLATES

Create awesome applications in no time using the premium templates and impress your users.