struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Session A Mwamufiya" <smwam...@andrew.cmu.edu>
Subject Evaluating a javascript expression in order to set the readonly attribute
Date Mon, 13 Aug 2007 10:40:46 GMT
Hi,

I would like to set a textbox to readonly when a flag is set in my action.  I have the following
jsp call:
<s:textfield name="name" label="Name" readonly="if(%{editingFlag==true}){return 'true'}"/>

but the textfield is not readonly, and the page source reflects it.  BTW, editingFlag is set
in the prepare() method of my action.

Any idea on how to write the evaluation?

Thanks,
Session


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message