Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

How to set attribute of <s:textfield>

red phoenix

2007-05-12

Replies:

I read document from struts2 and I know <s:textfield> has
label,name,cssStyle,cssClass,so I use <s:textfield> as follows:
<s:textfield label="Your First Name" name="Fname" cssStyle="test"
cssClass="test">
I want to set label "Your First Name" as red color and font size is 6,but
when I execute above code,I found label "Your First Name" is still black
color and not red color and its size is not 6,why? How to define label
attribute in <s:textfield> to realize above function?

My other question is when execute <s:textfield ...>,it will shows follows:
                ----------------
Your First Name:|   Mary   |
                ----------------
I want to know how to set its length,such as label "Your First Name" occupy
30% width of line and "Mary" occupy 70% width of line?

Thanks
©2008 junlu.com - Jax Systems, LLC, U.S.A.