This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have an xhtml page with two forms.In form1 I have one input text and in form two I have a submit button.In the actionlistener of the action button in form2 I want to get the value of the fom1's input textbox throgh the backing bean value.When I am trying it is giving null value.What is the workaround of this problem?
The obvious thing to do is to use one form. Why have you got two? This is the source of all your problems. The submit button
is submitting the values of components within the form it is in, which sounds like just the button. These values (ok, this value)
is sent to the server, but not the input field value.
There's rarely any reason to use multiple forms in an ajax world except in a few exceptional situations such as when doing
file upload and using dialogs. You just limit what gets sent to the server with f:ajax execute=, and you save yourself getting
confused about which naming container your components are in.
My understanding is that what you are trying to do is completely impossible with HTML & JSF.
Joined: Aug 09, 2012
I know it is not a good practice to have multiple forms in one single page.But I want it to achieve the following template
left content right content
Now in the actual page where I am using this template, I want to put my buttons in the left area and other inputs in the right area.On the click of the button on the left form should submit the values entered in the right form.
Please let me nkow how to achieve this.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com