>>>>> "Chennamakal" == Chennamakal Subramanian Savantraj <Savantraj> writes:

    Chennamakal> Hi ,
    Chennamakal> Again the problem here is we need to extract the Attribute and use the
    Chennamakal> correct variable in JSP page.
    Chennamakal> I am not sure is there any other option. 
    Chennamakal> What I would like to do is
    Chennamakal> Suppose I have a text field "NAME"
    Chennamakal> I will use a "NAME_CTRL_FLG" (Naming will be standardised) in my Bean.
    Chennamakal> We have some complecated logic to decide whether this field should be
    Chennamakal> enabled/disabled, and we will set the value
    Chennamakal> of "NAME_CTRL_FLG" to true/false in action.
    Chennamakal> So my requirement is just to reffer the Attribute name of the Bean in 
the
    Chennamakal> Custom Tag and then enabling disabling should be handled by the 
Custom Tag.
    Chennamakal> In this case binding is by naming standardization.
    Chennamakal> Pls suggest if there is a better way /Is STRUTS doing something 
similar
    Chennamakal> already?

This (untested) is how you you specify that a text field is disabled or not:

<html:text name="formname" property="textProperty"
           disabled="<%= formname.getNameCtrlFlag() %>"/>

Using Struts-EL, it would look like this:

<html-el:text name="formname" property="textProperty"
              disabled="${formname.nameCtrlFlag}"/>

-- 
===================================================================
David M. Karr          ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]   ; SCJP



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

Reply via email to