Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
How to change the default label style in Struts2?
Joined: Jun 26, 2001
Jan 24, 2009 15:43:16
It maybe very simple but I could not find an answer.
I have the following in login.jsp
.................. <s:form action="login"> <s:textfield key="username"/> <s:password name="password" label="Password" /> <s:submit?> .................
Struts2 renders the label username and password from a message properties file with default style. How do I change the label style, like change the font or color of "username" and "password"?
I tried <h2><s:textfield key="username"/></h2> or span class="xxx"... but none of them works.
Joined: Sep 29, 2008
Jan 24, 2009 18:07:33
The easiest way is to override the styles provided automagically by S2 (if you're using the <s:head.../> tag) or just create styles for the classnames emitted by the tags.
I agree. Here's the link:
subject: How to change the default label style in Struts2?
Struts2 newbee - Problem when using form tag
Struts2 Validation Not working
Struts2 Dojo- how to change this form to use "onkeyup"
How to overwrite the layout of "wwFormTable" in Struts2?
struts2 properties file reload
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015