6 Replies Latest reply on Nov 27, 2008 10:00 AM by Flavio Henrique

    a4j:include and focus

    Cezary Olborski Newbie

      Hi!
      I have simple problem but I can't resolve it.
      My components in included pages are losing focus after any ajax action:

      This is my code:

      home.xhtml

      ...
      <ui:define name="body">
       <a4j:include id="inc" viewId="simple.xhtml"/>
      </ui:define>
      ...
      


      simple.xhtml
      <a4j:form id="dg" ajaxSubmit="true" xmlns="http://www.w3.org/1999/xhtml"
       xmlns:s="http://jboss.com/products/seam/taglib"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:rich="http://richfaces.org/rich"
       xmlns:a4j="http://richfaces.org/a4j">
      <h:inputText id="myInput">
       <a4j:support ajaxSingle="true" process="colA" event="onkeyup" reRender="outtext"/>
      </h:inputText>
      <h:outputText id="outtext" value="#{rich:findComponent('myInput').value}" />
      </a4j:form>
      

      This is example with <h:inputText/> but it doesn't depends from the component type.
      After onkeyup event text field loses focus.

      This is my configuration:

      RichFaces 3.2.2
      Seam 2.0.2.SP1


      Where is my mistake ??
      Can anyone tell me ??