aspose file tools
The moose likes JSF and the fly likes Using disabled attribute in SelectOneMenu Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Using disabled attribute in SelectOneMenu" Watch "Using disabled attribute in SelectOneMenu" New topic
Author

Using disabled attribute in SelectOneMenu

Franck Q.
Greenhorn

Joined: Mar 01, 2006
Posts: 1
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

Joined: Aug 27, 2002
Posts: 455
Franck , you can do it this way

jsp
-----


Backing Bean
---------


Thanks,
Rajeev.


SCJP, SCWCD, SCBCD, Oracle Certified Professional (SQL n PL/SQL)
Cemre Ceren
Greenhorn

Joined: Jun 27, 2006
Posts: 1
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
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14456
    
    7

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 ]

Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://jrebel.com/download
 
subject: Using disabled attribute in SelectOneMenu
 
Similar Threads
selectOneMenu and ajax support
selectOneMenu rendered while it shouldn't
SelectOneMenu submit not working
How to auto-render a GUI using Ajax
selectOneMenu label value