[Opensource] Setting a CSS style
Peter A. Pilgrim
peterp at xenonsoft.demon.co.uk
Thu Dec 12 19:33:18 PST 2002
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 ''
More information about the Opensource
mailing list