Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Using disabled attribute in SelectOneMenu  RSS feed

 
Franck Q.
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm trying to disable the form SelectOneMenu with the disabled attribute, but I can't find out why it doesn't work.

Here some of the code I'm using:

<h:selectOneMenu value="#{myBean.Item1}"
disabled="true">
<f:selectItems value="#{myBean.items}"/>
</h:selectOneMenu>

Of course, I used my bean to change the value, but since it wasn't working, I decided to set the value directly to true with no luck.

Does anyone has an idea? I'm using firefox and glassfish.

Regards

Franck
 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Franck , you can do it this way

jsp
-----


Backing Bean
---------


Thanks,
Rajeev.
 
Cemre Ceren
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rajeev, i tried the code, works fine at pageload but after submitting i take 'Value is not valid' error at selectonemenu. Any help would be appreciated. Thanks.
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Franck. But please have a look at our Naming rules and change your display name. Thanks.

You can ignore that, if you're the same person as Cemre and just opened a new account. Actually, all we needed was that you edit your display name because we require a real last name and not just an initial.
[ June 27, 2006: Message edited by: Tim Holloway ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!