jsf - JSP values are not set to the backing bean -
i have jsp page , backing bean. values entered on page not set backing bean.
following sample code
jsp code
<tr> <td nowrap> <b>script name:</b> </td> <td> <h:inputtext id="name" value="#{addscriptbean.name}" /> </td> </tr>
backing bean code is
private string name; public string getname() { return name; } public void setname(string name) { this.name = name; }
i guess button click submit page has it.
<h:commandbutton immediate="true" id="finishbutton" style="display:none;" action="#{addscriptbean.finish}" > <f:verbatim><feat:button label="finish" onclick="submitfinishbutton()"/> </f:verbatim> </h:commandbutton>
my faces-config.xml follows.
<navigation-rule> <from-view-id>/wizards/script/add_script_wizard_done.jsp</from-view-id> <navigation-case> <from-outcome>finish</from-outcome> <to-view-id>/ms/contract_delete_closer.jsp</to-view-id> </navigation-case> </navigation-rule>
its because have given immediate="true" command button. in case updating bean values phase skipped. go through this link better understanding of jsf lifecycle
Comments
Post a Comment