Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here is a sample popup panel with tab feature enabled in Richfaces 4:</p> <pre><code>&lt;script type="text/javascript"&gt; jQuery('input').live("keypress", function(e) { var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0; /* ENTER PRESSED*/ if (key == 9) { // 9 for TAB /* FOCUS ELEMENT */ var inputs = jQuery(this).parents("form").eq(0).find(":input"); var idx = inputs.index(this); var move = (e.shiftKey) ? (-1) : (1); // for Shift+TAB if (idx == inputs.length - 1) { inputs[0].select() } else { inputs[idx + move].focus(); // handles submit buttons inputs[idx + move].select(); } return false; } }); &lt;/script&gt; &lt;rich:jQuery query="focus().select()" selector="#thegrid :input:visible:enabled:first" name="focusInput"/&gt; &lt;rich:popupPanel id="samplepopup" modal="true" resizeable="true" height="220" width="400" onmaskclick="#{rich:component('samplepopup')}.hide()" onshow="focusInput();"&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="sample"/&gt; &lt;/f:facet&gt; &lt;h:form&gt; &lt;h:panelGrid id="thegrid" columns="2" style="direction: rtl;"&gt; &lt;h:outputText value="Current Pass"/&gt; &lt;h:inputSecret id="pass1" value="#{userBean.pass}"/&gt; &lt;h:outputText value="New Pass"/&gt; &lt;h:inputSecret id="pass2" value="#{userBean.newPass}"/&gt; &lt;h:outputText value="New Pass Confirm"/&gt; &lt;h:inputSecret id="pass3"/&gt; &lt;/h:panelGrid&gt; &lt;/h:form&gt; &lt;/rich:popupPanel&gt; &lt;a4j:commandButton value="show sample" onclick="#{rich:component('samplepopup')}.show()"/&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload