java - Sending parameter input type hidden value to another jsf page -
<h:commandlink action="http://192.168.2.66:8084/tekirmobile2/customerlistdetailed.xhtml" value="#{item.code}" > <h:inputhidden value="#{item.address}" /> <h:inputhidden value="#{item.name}" /> </h:commandlink>
i have above code. code in customerlist.xhtml , after user click commandlink button want send input hidden value customerlistdetailed.xhtml. how can that?
to this, can write hidden tag after commandlink tag. note should add above codes h:form tag
example:
<h:form> <h:commandlink action="http://192.168.2.66:8084/tekirmobile2/customerlistdetailed.xhtml" value="#{item.code}" > </h:commandlink> <h:inputhidden value="#{item.name}" name="name" id="name" /> <h:inputhidden value="#{item.address}" name="address" id="address" /> </h:form>
backing bean
@managedbean(name="item") public class item implements serializable{ private string code; private string address; private string name; public item(){ string name= facescontext.getcurrentinstance(). getexternalcontext().getrequestparametermap().get("name"); string address= facescontext.getcurrentinstance(). getexternalcontext().getrequestparametermap().get("address"); } //getters , setters }
Comments
Post a Comment