i have two radio buttons in one JSF Form

i have two radio buttons in one JSF Form

when  i click one radio button and click submit button it would go to one page

when  i click another  radio button and click submit button it would go to  another page

Could you please give me the Pseudo code for that
Manikandan ThiagarajanSenior consultantAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sathish David Kumar NArchitectCommented:
you use Java Script fo that
you can get the ration button value using document.getElementById("id of ur radio button");
then u can set the url and pass

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Manikandan ThiagarajanSenior consultantAuthor Commented:
could you give me the code for how could i set the url and pass

i am using radio group in jSF

so how could i get the radio button

That is not possible in document.getElementById
Sathish David Kumar NArchitectCommented:
<h:selectOneRadio id="myRadio" value="#{myBackingBean.myRadioValue}" onclick="call java script function">
   <f:selectItem itemValue="0" itemLabel="#{myBackingBean.myRadioPossibleLabel1}"/>  
   <f:selectItem itemValue="1" itemLabel="#{myBackingBean.myRadioPossibleLabel2}"/>  
   <f:selectItem itemValue="2" itemLabel="#{myBackingBean.myRadioPossibleLabel3}"/>  
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

Sathish David Kumar NArchitectCommented:
Manikandan ThiagarajanSenior consultantAuthor Commented:
could you please give me jaascript code for that simple
@stmani2005: Please donot use uneccessary javascript code to achieve such functionality. It defeats the entire purpose of JSF. Configure your app to have navigation rules instead. If you donot have any idea about how navigation rules work, post here and I shall help you out.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java EE

From novice to tech pro — start learning today.