Write a tag.
I have a BooleanTag that displays an image (tick or cross).
You could modify it to show Yes/No

Here's the extract from the tld:

    <tag>
        <name>boolean</name>
        <tagclass>ants.servlets.taglib.BooleanTag</tagclass>
        <bodycontent>empty</bodycontent>
        <attribute>
            <name>value</name>
            <required>true</required>
            <rtexprvalue>true</rtexprvalue>
        </attribute>
        <attribute>
            <name>showFalse</name>
            <required>false</required>
            <rtexprvalue>false</rtexprvalue>
        </attribute>
    </tag>

-----Original Message-----
From: Alex Colic [mailto:[EMAIL PROTECTED]]
Sent: 06 June 2001 16:11
To: Struts
Subject: setting boolean to yes/no


Hi,

I have a form with a checkbox that sets a boolean property in one of my
classes. At a later page I display a msg if the user has selected the
checkbox and I get 'true' or 'false' displayed. What I am actually looking
for is a 'Yes' or 'No' to be displayed. Is there a clean way of getting the
boolean value and then converting it to the 'yes/no' and then displaying
them on a page?

Thanks for any help.

Alex





***************************************************************************
This email message contains confidential information for the above addressee only.  If 
you are not the intended addressee you must not disclose or use the information in any 
manner whatsoever.

Any opinion or views contained in this email message are those of the sender, do not 
represent those of the Company in any way and reliance should not be placed upon its 
contents.

Unless otherwise stated this email message is not intended to be contractually 
binding.  Where an Agreement exists between our respective companies and there is 
conflict between the contents of this email message and the Agreement then the terms 
of that Agreement shall prevail.

Abbey National Treasury Services plc. Registered in England. Registered Office:  Abbey 
House, Baker Street, London NW1 6XL.  Company Registration No: 2338548.  Regulated by 
the SFA
***************************************************************************

BooleanTag.java

Reply via email to