struts tag inside a tag

Discussion in 'Java' started by kishan bisht, Jul 8, 2003.

  1. kishan bisht

    kishan bisht Guest

    Hi,

    Can I specify a disabled attribute of a text tag using another tag.

    For example:
    <html:text property="name" size="40" maxlength="40" <logic:equal
    name="form" property="textDisabled" value="yes">disabled</logic:equal>
    />

    Here I have to disable the text depending upon the property
    "textDisabaled". The above thing is not working.

    Has anyone tried this thing before. I am using struts 1.02.

    cheers

    Kishan
    kishan bisht, Jul 8, 2003
    #1
    1. Advertising

  2. kishan bisht

    Wendy S Guest

    "kishan bisht" <> wrote:
    > Can I specify a disabled attribute of a text tag using another tag.


    No tags inside of tags, if you really need this, consider Struts-EL and
    JSTL. (You know Struts 1.1 final is out now, right?)

    > <html:text property="name" size="40" maxlength="40" <logic:equal
    > name="form" property="textDisabled" value="yes">disabled</logic:equal>
    > />


    Pull the logic:equal outside:

    <logic:equal name="form" property="textDisabled" value="yes">
    <html:text property="name" size="40" maxlength="40" disabled="true" />
    </logic:equal>

    <logic:notEqual name="form" property="textDisabled" value="yes">
    <html:text property="name" size="40" maxlength="40" />
    </logic:equal>

    Only one of those will be rendered. (Blech. Struts-EL and JSTL is a better
    way to do this, is there some reason you're stuck on Struts 1.0?)

    I can't find the docs for 1.0, but I'm wondering if maybe 'disabled' was not
    supported then?

    --
    Wendy in Chandler, AZ
    Wendy S, Jul 9, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. shahbaz
    Replies:
    0
    Views:
    896
    shahbaz
    Oct 27, 2003
  2. RC
    Replies:
    2
    Views:
    425
    Malte
    May 10, 2005
  3. shruds
    Replies:
    1
    Views:
    778
    John C. Bollinger
    Jan 27, 2006
  4. RC
    Replies:
    2
    Views:
    640
  5. Replies:
    2
    Views:
    87
Loading...

Share This Page