2 Replies Latest reply on Mar 19, 2008 6:23 PM by dev.pma

    regain focus

    dev.pma

      I'm trying to set the focus on a <h:inputText id="myId" /> component by setting the focus attribute in the adhering <a4j:form focus="myId" /> as described in the reference. No success.
      I also tried to make use of the <a4j:support focus="myId" /> tag. No success.
      What do I miss? Thanks in advance!

        • 1. Re: regain focus

          post your code snippet

          • 2. Re: regain focus
            dev.pma

            Code-Snipet:

            <a4j:form id="formBearbeiten" focus="inputZahl">
             <t:div styleClass="vBearbeiten">
             <div id="vBearbeitenContent">
             <table cellpadding="5" border="0">
             <tr>
             <td colspan="3">
             <h2><a name="Gegenstand">Gegenstand</a></h2>
             </td>
             </tr>
             <tr>
             <td valign="top">
             Zahl: <span class="inputRequired">*</span>
             </td>
             <td valign="top" colspan="2">
             <h:inputText label="inputZahl" id="inputZahl"
             styleClass="inputTextMedium"
             value="#{MyHandler.myZahl}">
             </h:inputText>
             </td>
             </tr>
             </table>
             </div>
             </t:div>
            </a4j:form>
            
            

            We use:
            JSF; 1.2.04
            RichFaces 3.1.2