5 Replies Latest reply on Feb 11, 2009 9:25 AM by Bjørn T Johansen

    Focus problem...

    Bjørn T Johansen Newbie

      I have the following code in my xhtml file..:

      <h:outputText value="*#{msgs.FootRing}:" style="font-weight: bold"/>
       <h:inputText id="observfotring" value="#{observMarkedBean.chosenObserv.fotring}" size="20" maxlength="7"
       validatorMessage="Lengde må være på max 7 tegn">
       <f:validateLength maximum="7"/>
       <a4j:support event="onblur" reRender="observExtraInfo,observhalsring" ajaxSingle="true" limitToList="true" action="#{observMarkedBean.findHalsring}"/>
       </h:inputText>
       <rich:message for="observfotring">
       <f:facet name="passedMarker">
       <h:graphicImage value="/secure/images/passed.gif"/>
       </f:facet>
       <f:facet name="errorMarker">
       <h:graphicImage value="/secure/images/error.gif"/>
       </f:facet>
       </rich:message>
       <h:outputText value="*#{msgs.NeckRing}:" style="font-weight: bold"/>
       <h:inputText id="observhalsring" value="#{observMarkedBean.chosenObserv.halsring}" size="20" maxlength="3"
       validatorMessage="Lengde må være på max 3 tegn">
       <a4j:support event="onblur" reRender="observExtraInfo,observfotring" ajaxSingle="true" limitToList="true" action="#{observMarkedBean.findFotring}"/>
       <f:validateLength maximum="3"/>
       </h:inputText>
       <rich:message for="observhalsring">
       <f:facet name="passedMarker">
       <h:graphicImage value="/secure/images/passed.gif"/>
       </f:facet>
       <f:facet name="errorMarker">
       <h:graphicImage value="/secure/images/error.gif"/>
       </f:facet>
       </rich:message>
      


      When entering leaving the first field (observfotring) then I expect the cursor to appear in the next field (observhalsring) but it doesn't... It disappear... If I remove the a4j:support tag, the the cursor and focus behave as I expect...
      How can I the this to work when using the a4j:support tag? (And I have tried the focus attribute on the a4j:support tag but that didn't change anything...)


      Regards,

      BTJ