[Opensource] Setting a CSS style
Malcolm Wise
malcolm.wise at sde.eu.sony.com
Fri Dec 13 00:20:30 PST 2002
RE: [Opensource] Setting a CSS styleOr you could use the extended Struts
tags which already cater for CSS styles ... :-)
Malc
-----Original Message-----
From: opensource-admin at jcorporate.com
[mailto:opensource-admin at jcorporate.com]On Behalf Of Eddie Lewis
Sent: 13 December 2002 02:49
To: 'opensource at jcorporate.com'
Subject: RE: [Opensource] Setting a CSS style
We couldnt find a way around this either.
We simply created a new tag lib entry
add this to expresso.tld
to include the styleClass parameter
<tag>
<name>InputTagEx</name>
<tagclass>com.jcorporate.expresso.ext.taglib.InputTagEx</tagclass>
<bodycontent>empty</bodycontent>
<info>A tag to display an Expresso Input Object</info>
<attribute>
<name>name</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>styleClass</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>value</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>response</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>type</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>size</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>maxlength</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>showlabel</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
then create a new file to handle the tag. we created InputTagEx.java in as
per the attachment in
expresso_path\WEB-INF\classes\com\jcorporate\expresso\ext\taglib.
NOTE - if the styleClass property is null, we set it to a default style -
CHANGE THIS to suit your default style.
ie. in InputTagEx.java
if (styleclass == null) {
styleclass = "smallfont"; // set a default font if none passed.
}
simply call InputTagEx instead of InputTag.
If you place the attachment in the correct place, it should compile and then
add the above tag declaration to the expresso.tld file you should be up and
running in 15 minutes.
call in jsp via
<expresso:InputTagEx name="input_name_here" styleClass="default_style"/> //
omit styleClass to get the default style.
Good Luck
-----Original Message-----
From: Ben Switzer [mailto:ben at site85.com]
Sent: Friday, 13 December 2002 8:39 AM
To: opensource at jcorporate.com
Subject: [Opensource] Setting a CSS style
Good day all.
Have a quandary for you all.
I'm trying to set the CSS style of an expresso input object. The input
is rendered properly, but I'd like to apply a style. I've tried using
the AttributeTag, but with little success. I'm lead to believe from the
taglib docs that I can make AttributeTag a child tag of InputTag. No
luck. I get a Japser exception: jasper.error.emptybodycontent.nonempty
I'm trying to set the attribute from my controller with the method
setAttribute from the input object that I've created.
Any ideas?
I don't have a lot of time at this moment, so I can't investigate
myself. Must forge ahead. So any help on this matter would be much
appreciated.
Best,
Ben Switzer [ben at site85.com]
site85.developer.*;
phone.416.466.4509;
_______________________________________________
Opensource mailing list
Opensource at jcorporate.com
http://mail.jcorporate.com/mailman/listinfo/opensource
Archives: http://mail.jcorporate.com/pipermail/opensource/
*************************************************************************
The information contained in this message or any of its
attachments may be privileged and confidential and intended
for the exclusive use of the addressee. If you are not the
addressee any disclosure, reproduction, distribution or other
dissemination or use of this communication is strictly prohibited
*************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.jcorporate.com/pipermail/opensource/attachments/20021213/2b357cf2/attachment-0002.htm
More information about the Opensource
mailing list