form inside tabview doesn't work

Posted by user3536737 on Stack Overflow See other posts from Stack Overflow or by user3536737
Published on 2014-06-08T09:20:08Z Indexed on 2014/06/08 9:24 UTC
Read the original article Hit count: 179

Filed under:
|
|

i am working with jsf and primefaces , and here is what 've tried well i want to creat a tabview that get data from an arraylist in my bean i get for exemple 4 tabs , and inside each one i've created a hidden panel where i have a form with 2 input text to update informations , do i display the panel when i click on the second button Update , after that my panel is not hidden anymore , and i set the new values and click on the second button to update the informations , the problem is that the updating and the execution is working only for the first tab , it means when i try to update the new informations it works for the first one and for the other tabs it doesn't here is the code

        <p:tab title="#{rr.nom_ressource}">
        <h:panelGrid>
        <h:graphicImage value="Ressources/images/emp.jpg"  style="vertical-align:middle" /> 
        <span style="font-size:15px; width:170px; display:inline-block;"> Nom : #{rr.nom_ressource} Type: #{rr.type_ressource} Specification: #{rr.experience}  </span>

        <h:commandButton image="Ressources/images/delete.jpg"  actionListener="#{SelectBean.act}" update=":form"  style="vertical-align:middle" >
        Update
        </h:commandButton>
        <h:commandButton update=":outPanel"  actionListener="#{SelectBean.mod1()}"   image="Ressources/images/update.png"   style="vertical-align:middle" >
        Modifier
        </h:commandButton>
        <h:form id="form111">
         <p:growl id="growl" showDetail="true" sticky="true" />
        <p:panel rendered ="#{SelectBean.bol}" closable="true"  toggleable="true"   id="outPanel" styleClass="outPanel" widgetVar="outpanel">
       <h:outputLabel value="Nom  " />
       <h:inputText value="#{SelectBean.nom}" />
       <br/>
       <h:outputLabel value="Experience " />
       <h:inputText value="#{SelectBean.exp}" />    
       <br/>
       <h:commandButton  value="Update" action="#{SelectBean.done}"/>
        </p:panel>
        </h:form>
        </h:panelGrid>
        </p:tab>

for my managedbean the code is correct i think the problem is here

© Stack Overflow or respective owner

Related posts about jsf

Related posts about java-ee