JARCH SHOWCASE
JARCH SHOWCASE
Hotkey Hotkey is used to bind a key or a key combination to an client side or server side event via ajax. In first example use "left" and "right" keys to switch images and in second example you can do an ajax request with the (ctrl+shift+s) combination.

ImageSwitch Integration (Left-Right)

Ajax Hotkey (ctrl + shift + s)

<h3 style="margin-top:0">ImageSwitch Integration (Left-Right)</h3>
<a:imageSwitch effect="fade" widgetVar="switcher" slideshowAuto="false">
    <a:graphicImage name="demo/images/nature/nature1.jpg" />
    <a:graphicImage name="demo/images/nature/nature2.jpg" />
    <a:graphicImage name="demo/images/nature/nature3.jpg" />
    <a:graphicImage name="demo/images/nature/nature4.jpg" />
</a:imageSwitch>

<a:hotkey bind="left" handler="PF('switcher').previous();" />
<a:hotkey bind="right" handler="PF('switcher').next();" />

<h3>Ajax Hotkey (ctrl + shift + s)</h3>
<a:form>
    <a:growl id="msgs" showDetail="true" />

    <a:hotkey bind="ctrl+shift+s" update="msgs" actionListener="#{hotkeyView.save}"/>

    <h:panelGrid columns="2" cellpadding="5">
        <a:outputLabel for="text" value="Text" />
        <a:inputText id="text" value="#{hotkeyView.text}" />
    </h:panelGrid>
</a:form>
                
JARCH, Copyright © 2022 All rights reserved. Running JARCH 24.3.0-SNAPSHOT on PrimeFaces-12.0.0 on Mojarra-2.3.13.