4 Replies Latest reply on Nov 22, 2012 3:36 PM by alberto padilla

    rich:tab focus not working

    Jay Haley Newbie

      After a tab is selected, I'm trying to place focus on a rich:comboBox field. Below I have two ways to do it. I'm not sure why the first way does not work. The second way works (and it may be my best solution), but there seems to be a lag since an ajax call is invoked

      focus does not work

      <rich:tabPanel width="250" height="300" switchType="client">
       <rich:tab label="All" focus="availableArticlesFrm:categoryBasedOnFiltercomboboxField" >
       <t:panelGrid columns="2">
       <h:outputLabel for="categoryBasedOnFilter" value="Categories"/>
       <rich:comboBox id="categoryBasedOnFilter" valueChangeListener="#{roomCtrl.resetFilteredCategoryList}" value=""
       directInputSuggestions="true" listStyle="text-align:left;" width="150">
       <f:selectItems value="#{roomCtrl.categoryNameList}"/>
       <a4j:support event="onselect" ajaxSingle="true" reRender="filteredAvailableArticlesPanelBar"></a4j:support>
       </rich:comboBox>
       </t:panelGrid>
      


      focus does work
      <rich:tabPanel width="250" height="300" switchType="client">
       <rich:tab label="All" >
       <a4j:support event="onlabelclick" focus="availableArticlesFrm:categoryBasedOnFiltercomboboxField" ajaxSingle="true"></a4j:support>
       <t:panelGrid columns="2">
       <h:outputLabel for="categoryBasedOnFilter" value="Categories"/>
       <rich:comboBox id="categoryBasedOnFilter" valueChangeListener="#{roomCtrl.resetFilteredCategoryList}" value=""
       directInputSuggestions="true" listStyle="text-align:left;" width="150">
       <f:selectItems value="#{roomCtrl.categoryNameList}"/>
       <a4j:support event="onselect" ajaxSingle="true" reRender="filteredAvailableArticlesPanelBar"></a4j:support>
       </rich:comboBox>
       </t:panelGrid>