4 Replies Latest reply on Mar 18, 2010 10:32 AM by evi alxg

    ontabenter vs action in rich:tab

    nimo stephan Master

      Is want to rerender a region within a tab when tab is entered or clicked:

       

      I have tried it with ontabenter and ontabclick, but action is not fired:

       

      Version 1:

       

      <rich:tabPanel switchType="ajax">

      <rich:tab label="My Tab">

       

      <h:form>
      <a4j:support event="ontabenter" action="#{myBean.doAction}" reRender="myDiv"/>
      </h:form>

       

      <s:div id="myDiv">
                     ..
      </s:div>
      </rich:tab>

       

       

      When using this version, action is fired and all works:;

       

      Version 2:

       

      <h:form>

      <rich:tabPanel switchType="ajax">

      <rich:tab label="My Tab" action="#{myBean.doAction}"  reRender="myDiv">


      <s:div id="myDiv">
                      ..
      </s:div>
      </rich:tab>

      </h:form>

       

      But the problem with Version 2 is, that I need a form around the whole component, and this is not what I want.

       

      How can I make Version 1 to work?