File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "selectOneMenu disabled" Watch "selectOneMenu disabled" New topic

selectOneMenu disabled

Priti Shah
Ranch Hand

Joined: May 10, 2005
Posts: 43

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 ??

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
I agree. Here's the link:
subject: selectOneMenu disabled
It's not a secret anymore!