jsf - hide panel with commandbutton -


i using jsf , trying show hidden panel tried

     <h:commandbutton update=":outpanel"  actionlistener="#{selectbean.mod1()}"   image="ressources/images/update.png"   style="vertical-align:middle" >             modifier             </h:commandbutton>              <p:panel visible="#{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="modifier"/>             </p:panel> 

my bean

            private boolean bol=false;               public boolean getbol() {                 return bol;             }             public void setbol(boolean bol) {                 this.bol = bol;             }             public string mod1()             {                 bol = true;                 return "success";             } 

but thing not working panel hidden.

try this, panel shown if bol true

<p:panel rendered="#{selectbean.bol}" closable="true"  toggleable="true"   id="outpanel" styleclass="outpanel" widgetvar="outpanel"> 

also think have wrong syntax, should call methods , variables of class through selectbean not selectbean


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -