Version 2

    Hi,

     

    Do you have any idea how to set the focus on the filter input after rendering the page.

     

    Env : Richfaces 4.3.0.Final, websphere portal 8, myfaces.

     

    I tried to do it on javascript, but it is not working. I tried also to use JQuery but it seems that the dom update is preventing the focus to be set as expected :

     

    below the code :

     




    <a4j:outputPanel ajaxRendered="true">

    .....

    <rich:datatable...>

    ...

      <rich:column

      filterExpression="#{fn:containsIgnoreCase(list.lastName, lastNameFilter)}"

      filterValue="#{personBean.lastNameFilterr}"

      <h:panelGroup>

      <h:inputText value="#{personBean.lastNameFilter}"

      id="elm2">

      <a4j:ajax oncomplete="jQuery('#{rich:element('elm2')}').focus();" 

      event="keyup" execute="@this">

      </a4j:ajax>

      </h:inputText>

      </h:panelGroup>

      </rich:column>