Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

selectOneMenu disabled

 
Priti Shah
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic