Hi,
 
I want to save the data in both the two forms when i clicked the save button in one of the forms. I  have several forms in my documents as illustrated below:
 
<f:view>
<h:form id="form1">
 
<h:inputText id="name" value="#{backingBean.var1}"/>
 
</h:form>
 
<h:form id="form2">
 
<h:inputText id="address" value="#{backingBean.var2}"/>
 
<h:commandButton value="SAVE" action=""/>
 
</h:form>
</f:view>
 
When i clicked the save button, only the address component value in "form2" is saved while the name component in "form1" is not saved. How can I get both the forms to be submitted upon clicking the save button? I tried submitting form1 using the onclick property of the button as below but it didnt work:
 
 
<h:commandButton value="SAVE" action="" />
 
I have been stucked with this problem for the past week so can anyone please give me some idea on how i could get both the forms to be submitted? Thanks in advance!
 
 

Reply via email to