Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

html:select disabled property not working

843840Dec 16 2008 — edited Dec 18 2008
Hi all,

In my struts application, I would like to disable / enable an html:select box based on values selected from another html:select. I am using the following code for enable / disable.

<bean:define id="myForm" name="myActionForm" type="org.myproj.view.myActionForm" />

<html:select property="select_name" size="1"
disabled='<bean:write name="myForm" property="disableNameFlag"/>' onchange="findAge()">

<html:option value="0">--- Select ---</html:option>

<logic:present name="myActionForm" property="childNameList">
<html:optionsCollection name="myActionForm" property="childNameList"/>
</logic:present>
</html:select>

I am setting the value of disableNameFlag to true in the action form bean and <bean:write name="myForm" property="disableNameFlag"/> prints value as true. But html:select is not disabled. Pls help.

Thanks.

roshni
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 15 2009
Added on Dec 16 2008
2 comments
626 views