aspose file tools*
The moose likes JSF and the fly likes selectOneMenu disabled Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "selectOneMenu disabled" Watch "selectOneMenu disabled" New topic
Author

selectOneMenu disabled

Priti Shah
Ranch Hand

Joined: May 10, 2005
Posts: 43
Hi,

I have dropdown menu on my page which gets value from a bean. I also have a checkbox which if not selected disables the dropdown menu.

I do that using javascript.

Now when I submit the form (when dropdown menu is disabled) bean throws null pointer exception for dropdown menu property.

I donot want to get this exception when my dropdown menu is disabled. How to resolve this ??

Thanks
Priti Shah
Ranch Hand

Joined: May 10, 2005
Posts: 43
Can any one help me for my previous post ?? This is really urgent.

Can I use binding attribute rather than using value binding ?

Thanks in advance.
Varun Khanna
Ranch Hand

Joined: May 30, 2002
Posts: 1400
Javascript can disable the component at UI, but at server the component is still enabled (not disabled). Don't use javascript to disable menu.
Do it the JSF way, probably by writing a listener.

Show some code so that we can help you.


- Varun
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: selectOneMenu disabled