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
nameboolean/name
tagclassants.servlets.taglib.BooleanTag/tagclass
bodycontentempty/bodycontent
attribute
Hi Alex,
You can use a logic:equal tag to check result stored in your form. Then a
bean:message to display the appropriate Yes or No message.
Jon.
-Original Message-
From: Alex Colic [mailto:[EMAIL PROTECTED]]
Sent: 06 June 2001 16:11
To: Struts
Subject: setting boolean to yes/no
Hi Alex,
You may add an extra attribute(displayProperty) in your form bean and have
it's get(getDisplayProperty) method generate the YES/NO based on the value
of the checkbox property attribute that you already have and then use this
new attribute (displayProperty) in your jsp to render
3 matches
Mail list logo