Anant,

You can do the following:

set up a boolean flag at the top of the jsp page that will be used to
disable fields on your page like so:

<% boolean flag = false; %>

and then set this according to the value of the flag in your form using
logic tags:

<logic:equal name="FormName" property="xxx" value="true">
    <% flag = true; %>
</logic:equal>

<logic:equal name="FormName" property="xxx" value="false">
    <% flag = false; %>
</logic:equal>

and then in your <html:text> elements do this:

<html:text property="xxx" disabled="<%= flag %>"/>


you have to make sure though that the boolean is set to the right value (so
that if you wish to disable something it is true - this got me caught out a
few times!)


HTH
Claire :)


----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 02, 2004 10:35 AM
Subject: Making the fields non editable dynamically using a form bean
element




Hi ppl,


I have a situation where I do not want the user to edit the fields if
the history record flag in the form bean is true.
Can you suggest me how to go about it. Can I use a form bean element
(java.lang.Boolean/String) to disable a <html:text> dynamically
depending on its value.


If yes then how can I do it?

Thanks a ton in advance

Regards

Anant Parnami



Confidentiality Notice

The information contained in this electronic message and any attachments to
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or
[EMAIL PROTECTED] immediately
and destroy all copies of this message and any attachments.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to