0 Replies Latest reply on Jun 2, 2011 6:36 AM by trigun

    Problem with rich:tabPanel

    trigun Newbie

      Hi, i have the following code for my tabPanel: Each tab includes a <h:form> element with inputs

       

      <ui:define name="metadata">
              <f:viewParam id="kundeIdMeta" name="benutzerId"/>
              <f:event type="preRenderView" listener="#{bv.loadBenutzerForUpdateById}"/>
          </ui:define>
      
          <ui:define name="title">
              Profil
          </ui:define>    
      
          <ui:define name="contents">
                  <rich:panel rendered="#{not empty benutzer}">            <f:facet name="header">
                      <h:outputLabel value="Benutzer: #{benutzer.username}" style="text-transform: uppercase;"/>
                  </f:facet>
                  <rich:tabPanel switchType="client">
                      <rich:tab header="Info">
                      <h:form id="updateBenutzerInfoForm">
                      <rich:graphValidator id="kundeValidator">
                          <h:panelGrid id="createKundeTabelle" columns="3">
                                  <rich:messages/>
                                  <f:verbatim />
                                  <f:verbatim />
                  
                                  <h:outputLabel id="nachnameLabel" for="nachname" value="#{msgBv['createBenutzer.nachname']}"/>
                                  <h:inputText id="nachname" value="#{benutzer.nachname}" valueChangeListener="#{bv.geaendert}">
                                        
                                  </h:inputText>
                                  <rich:message id="fehlermeldungenNachname" for="nachname" style="color:red"/>
                                              
                                  <h:outputLabel id="vornameLabel" for="vorname" value="#{msgBv['createBenutzer.vorname']}"/>
                                  <h:inputText id="vorname" value="#{benutzer.vorname}" valueChangeListener="#{bv.geaendert}">
                                       
                                  </h:inputText>    
                                  <rich:message id="fehlermeldungenVorname" for="vorname" style="color:red"/>
                                  
                                  <h:outputLabel id="gebDatumLabel"
                                                 for="gebDatum"
                                                 value="#{msgBv['createBenutzer.geburtsdatum']}"/>
                                  <rich:calendar id="gebDatum"
                                                 datePattern="dd.MM.yyyy"
                                                 value="#{benutzer.geburtsdatum}"
                                                 timezone="CET"
                                                 enableManualInput = "true"
                                                 valueChangeListener="#{bv.geaendert}">
                                       
                                  </rich:calendar>
                                  <rich:messages id="fehlermeldungenGebDatum" for="gebDatum" style="color:red"/>
                                  
                                  <h:outputText id="geschlechtLabel" value="#{msgBv['createBenutzer.geschlecht']}"/>
                                  <h:selectOneRadio id="geschlecht" value="#{benutzer.geschlecht}" valueChangeListener="#{bv.geaendert}">
                                      <f:selectItem id="weiblich" itemValue="WEIBLICH" itemLabel="#{msgBv['createBenutzer.geschlecht.weiblich']}"/>
                                      <f:selectItem id="maennlich" itemValue="MAENNLICH" itemLabel="#{msgBv['createBenutzer.geschlecht.maennlich']}"/>
                                  </h:selectOneRadio>
                                  <f:verbatim/>
                                  
                                  <h:outputLabel id="newsletterLabel" value="#{msgBv['createBenutzer.newsletter']}"/>
                                  <h:selectBooleanCheckbox id="newsletter" value="#{benutzer.newsletter}" valueChangeListener="#{bv.geaendert}"/>
                                  <f:verbatim/>
                                                  
                                  <h:outputLabel id="passwortLabel" for="passwort" value="#{msgBv['createBenutzer.passwort']}"/>
                                  <h:inputSecret id="passwort" value="#{benutzer.passwort}" redisplay="true" valueChangeListener="#{bv.geaendertPw}">
                                       
                                  </h:inputSecret>
                                  <rich:message id="fehlermeldungPasswort" for="passwort" style="color:red"/>
                                  
                                  <h:outputLabel id="passwortWdhLabel" for="passwortWdh" value="#{msgBv['createBenutzer.passwortWdh']}"/>
                                  <h:inputSecret id="passwortWdh" value="#{benutzer.passwortWdh}" redisplay="true" valueChangeListener="#{bv.geaendertPw}"/>
                                  <rich:message id="fehlermeldungPasswortWdh" for="passwortWdh" style="color:red" />
                                  
                              </h:panelGrid>
                              <p id="buttons">
                                  <a4j:commandButton type="button" id="createSubmit" value="#{msgBv['createBenutzer.submit']}" action="#{bv.update}">
                                      <a4j:param name="benutzerId" value="#{auth.user.id}"/>
                                  </a4j:commandButton>    
                              </p>
                          </rich:graphValidator>
                          </h:form>
                      </rich:tab>
                      <rich:tab header="Details" id="updateDetails">
                          <h:form id="updateBenutzerDetailsForm">
                              other content fields
                          </h:form>
                      </rich:tab>
                      <rich:tab header="Bilder">
                         <h:form id="uploadForm">
                             other content fields
                          </h:form>
                          </rich:tab>
                          <rich:tab header="Gästebuch">
                          Here is tab #3
                          </rich:tab>
                  </rich:tabPanel>
              </rich:panel>
           </ui:define>
      
      
      

      If i press the "createSubmit" nothing`s gonna happen ... and if i start jboss in debug mode, the valeChangeListener Event is not fired also

      Tryed to put switchtype to "ajax" and put a <h:form> around the tabPanel resluts in not being able to switch the tabs, i think its because of the

      "<f:event type="preRenderView" listener="#{bv.loadBenutzerForUpdateById}"/>" on top of page ?! Maybe need to set the param on tab swicht ?!

       

      I prefer the client method, if its possible ...

       

      Thx