0 Replies Latest reply on Aug 9, 2007 9:40 AM by jfrankman

    Rerender inside Tab Panel Fails


      Seam version: 1.2.1

      I have alread posted this to the Seam forum, but thought it might be more applicable here.

      I have created a page that used the rich:tabpanel component. Inside one of the tabs I want to change a label depending upon what is selected in a radio button. To do this I added the a4j rerender attribute for the onchange event. However, the rerender does not work until something has been typed into one of the other fields. Here is the behavior I have noticed:

      Scenario A. If components are placed outside of tab panel everything works fine.

      Scenario B. If components are placed inside tabl panel...
      If you click on the radio button with the rerender event, nothing happens.
      If you click inside another text box and type something (anything) and then click on the radio buttons the reRender event starts to work.

      Scenario C. If I add ajaxSingle to the support tag. It works:

      <a:support event="onclick" reRender="deductiblegroup1" ajaxSingle="true" />

      I have found I get the same behavior whether the switch type is ajax, server, or client.

      Here is the markup in question:
       <rich:tabPanel switchType="ajax">
       <rich:tab label="Client">
       <s:decorate id="coveragetypeDecoration" template="layout/edit.xhtml">
       <ui:define name="label">Coverage Type</ui:define>
       <h:selectOneRadio id="coveragetype" value="#{rptphdmgbinderHome.instance.coveragetype}">
       <f:selectItem itemValue="AUTO" itemLabel="Auto"/>
       <f:selectItem itemValue="OTHER" itemLabel="Other"/>
       <a:support event="onclick" reRender="panelx"/>
       <s:div id="panelx">
       <h:panelGroup rendered="#{rptphdmgbinderHome.instance.coveragetype=='AUTO'}">
       <h:panelGroup rendered="#{rptphdmgbinderHome.instance.coveragetype!='AUTO'}">

      Is there a better/different way I could show/hide components?

      Is this more likely a bug or something else?

      I have not looked at ICEFaces. Would I have better luck using the ICEFaces tab component? If so, can I use the same theme with ICE Faces as with Rich faces? i.e. can and mix and match richfaces with icefaces and get the same look and feel?
      <a:support event="onclick" reRender="deductiblegroup1" ajaxSingle="true" />