[Opensource] Setting a CSS style
Ben Switzer
ben at site85.com
Fri Dec 13 07:42:23 PST 2002
Hey.
The problem I had with using the struts taglib is that I don't know that
name of the input before hand. I've nested the input tag in an
ElementIterator tag. I can't leave the property attribute empty with
the struts taglib. :(
I'll have time after this project to make the modifications that will
allow the nesting of an attribute tag inside an input tag. Just in a
bit of a crunch right now.
Thanks for the reply,
Ben
-----Original Message-----
From: opensource-admin at jcorporate.com
[mailto:opensource-admin at jcorporate.com] On Behalf Of Peter A. Pilgrim
Sent: Thursday, December 12, 2002 10:33 PM
To: opensource at jcorporate.com
Subject: Re: [Opensource] Setting a CSS style
Ben Switzer wrote:
> 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.
>
The AttributeTag is only working for the OutputTag.
The standard Expresso InputTag does not support HTML cascading
stylesheet, but the Expresso exttended Struts HTML Tags supports CSS,
and also the javascript handling. e.g
<html:form action="/acme/insert_new_employee.do" >
<html:text property="lastName" styleClass="HTML-TEXT-CSS"
style="color:red"
onclick="javascript:executeFunction()" />
</html:form>
This was always a little oversight, when Adam Rossi origiinally wrote
the tags. It wouldn't be difficult to added extra tag attributes to the
InputTag if you want such a beast.
--
Peter Pilgrim
ServerSide Java Specialist
My on-line resume and for interview videos about myself, J2EE Open
Source, Struts and Expresso.
||
\\===> `` http://www.xenonsoft.demon.co.uk/no-it-striker.html ''
_______________________________________________
Opensource mailing list
Opensource at jcorporate.com
http://mail.jcorporate.com/mailman/listinfo/opensource
Archives: http://mail.jcorporate.com/pipermail/opensource/
More information about the Opensource
mailing list