Hi Slawek,

Thanx a lot for ur prompt reply.
I implemented the first way and its working fine.

thanx again..
Regards,
Sunil

----- Original Message ----- From: "Slawek" <[EMAIL PROTECTED]>
To: "MyFaces Discussion" <[email protected]>
Sent: Thursday, April 21, 2005 11:52 PM
Subject: Re: regarding <h:selectOneMenu>



i have 2 concepts:

//-----1-------------------
u can put invisivle command button:
to do this jus add style paramter with value
  dispalay:none
or
  visibility:hidden
(i cant remeber which is better)
action of that button can determine selected value...

u can add onchange="comboboxChanged()" parmaterer to your combobox.
comboboxChanged() is javascript function that "clicks" your invisible button.
action binded to that button can determine value of combox and for example return somme string that will be maped to view...


//-----2-------------------------
u can put three (or whatever u need) invisble buttons. each of them has action that finally leads to desired view.
that time your JS function must determine selection and "click" one of invisble buttones (depending on selection)
//============================


summary:
first method check selection on server but secod do that on client
problem:
when user drop down list and choose the _same_ value than nothing happends:/
u cant add onclick attrib cause it will be fired wher user drop down list (before choose value)-what a shyt;)



choose whatever matches your philosophy or sth;)

cheers

Sławek

Hi,

How to navigate to some other page by just selecting one value from a drop down menu in JSF?
I mean you shd nt use the submit or link.
suppose there are 3 values in the drop down.
Now, depending on whatever you select , it should go to different page.
say, if i select first value, it shd go to first.jsp.
if i select second value then it shd go to second.jsp and so on.


I am able to do this by using submit button but i am not able to do this without the button.

the moment u select some value from the dropdown , some other jsp page shd come up depending on the value selected by the user.

I am using JSF on WebSphere.

Plz help guys.

Thanx in Advance
Sunil




Reply via email to