jQuery in Action, 2nd edition*
The moose likes Struts and the fly likes how to change the default class for label in <s:textfield=" title="" /> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to change the default class for label in <s:textfield="" label=""/>" Watch "how to change the default class for label in <s:textfield="" label=""/>" New topic
Author

how to change the default class for label in <s:textfield="" label=""/>

Jibin Najeeb
Greenhorn

Joined: Nov 27, 2012
Posts: 6
The following code
<s:form>
<s:textfield name="username" label="Username"/>
</s:form>

generates the follwing html code

<table>
<tr>
<td class="tdLabel"><label for="login_username" class="label">Username:</label></td>
<td><input type="text" name="username" value="" id="login_username"/>
</td>
</tr>
</table>

I want to change the value of label class--- class="label" which is default. Is there any method with default theme as xhtml..
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to change the default class for label in <s:textfield="" label=""/>
 
Similar Threads
problem designing jsp using struts 2.0 tags
unable to do validation for select in struts2
form visibility
Equivalent of logic iterate in Struts 2
How to place textfield and submit button in one row by using struts2 tags?