Is it possible to submit two forms in a single jsp/jsf page?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Vijendra_Singh
Posted On:   Thursday, June 7, 2007 02:33 AM

Hi all, My requirement is to submit the form based on selection of radio button. since half part needs to be jsp based which is not using any tags etc. But i am trying to use some jsf based component which requires to be inside of <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %> <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %> i.e. some Now earlier i was submitting the form as But now i found, in order to use combo box component which is entirely jsf based i need to use which is kind of taking over the previous form submission mechiansm. I am trying to keep them separate as two diffe   More>>

Hi all,
My requirement is to submit the form based on selection of radio button.
since half part needs to be jsp based which is not using any tags etc.
But i am trying to use some jsf based component which requires to be inside of
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
i.e. some


Now earlier i was submitting the form as



But now i found, in order to use combo box component which is entirely jsf based i need to use which is kind of taking over the previous form submission mechiansm.
I am trying to keep them separate as two differnt forms.

one entirely jsp based and other as jsf based.

Now my question is can i use such way of doing so or is there any better way of implementing so.


My friend suggested that i can pass the value of jsf based form in hidden form to a input box of form to be submitted finally instead of submitteing two diff forms.
but in that case also i ahev to use two forms in a single jsp/jsf page.

suggest me something which can really work out.


thanks
vijendra    <<Less

Re: Is it possible to submit two forms in a single jsp/jsf page?

Posted By:   Robert_Lybarger  
Posted On:   Thursday, June 7, 2007 08:18 PM

When "JSF" gets involved (in my somewhat limited and personal opinion) it tends to be an "all or nothing" approach. And from a practical standpoint, you can only make one "post" request at a time, which means only one form can be submitted at a time. You can arrange, via javascript code, to copy element values from one form into hidden elements in another prior to submission ... but I'd make that the last option. Are you sure you cannot go completely JSF for sake of keeping things sane?
About | Sitemap | Contact