|
Struts2 Tags |
|
textareaTag.jsp
<%@ taglib prefix=”s” uri=”/struts-tags” %>
<html>
<head>
<title>Textarea Tag Example</title>
</head>
<body>
<h2>Textarea Tag Example</h2>
<s:form>
<s:textarea label=”Description”
name=”description” cols=”15" rows=”10" />
</s:form>
</body>
</html>
Output of the textareaTag.jsp:
18. Textfield Tag (Form Tag) Example
The textfield tag is a UI tag that is used to
render an HTML input field of type text.
Add the following code snippet into the
struts.xml file.
<action name=”textfieldTag”>
<result>/pages/formTags/textfieldTag.jsp</
result>
</action>
|
|
Create a jsp using the tag <s:textfield >
This tag renders an HTML input field of type
text.
<s:textfield label=”Employee Name”
name=”empname” size=”15" maxlength=”10"
/> tag displays an HTML text field with label
equal to Employee Name with length of 15
columns.
textfieldTag.jsp
<%@ taglib prefix=”s” uri=”/struts-tags” %>
<html>
<head>
<title>Textfield Tag Example</title>
</head>
<body>
<h2>Textfield Tag Example</h2>
<s:form>
<s:textfield label=”Employee Name”
name=”empname” size=”15" maxlength=”10"
/>
</s:form>
</body>
</html>
Output of the textfieldTag.jsp:
]
19. Updownselect Tag (Form Tag)
Example
The updownselect tag is a UI tag that creates
|
|
|
Feb
2008 | Java Jazz Up | 52 |
|
|
View All Topics |
All Pages of this Issue |
Pages:
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53 ,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63 ,
64,
65 ,
66 ,
67 ,
68 ,
69 ,
70 ,
71 ,
72 ,
Download PDF |
|
|
|
|
|
|
|
|
|