File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes html:select disabled Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:select disabled" Watch "html:select disabled" New topic
Author

html:select disabled

nachagoni rishi
Greenhorn

Joined: Oct 14, 2004
Posts: 26
Hi everybody
Is there any way i can make select tag readonly. i donot want to grey out the select tag
Thanks
alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
set disabled attribute to 'true'. it WILL grey out the box, but that's browser-dependent on how disabled is handled. you can also just display the form value <bean:write name="MyForm" property="theFieldName"/> (i think that's the syntax).


-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
nachagoni rishi
Greenhorn

Joined: Oct 14, 2004
Posts: 26
Thanks alan the below tag did work for me.
<bean:write name="MyForm" property="theFieldName"/>
shahbaz aamir
Greenhorn

Joined: Dec 25, 2011
Posts: 2
nachagoni rishi wrote:Thanks alan the below tag did work for me.
<bean:write name="MyForm" property="theFieldName"/>

Hi, I also want to make a combo:box readonly but dont want to use disable is there any other way........................
jatan bhavsar
Ranch Hand

Joined: Jul 23, 2008
Posts: 296

Hi shahbaz,

I would like to suggest you to go through this link http://struts.apache.org/2.0.6/docs/combobox.html . It has different attribute for the tag.readonly is also there. Its easy to find..try to do soem googling which is the best way to learn.


Regards
Jatan
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: html:select disabled