Skip to main content

Posts

Showing posts with the label Checkbox Tag

Struts Generic Tags

The struts generic tags are used to control the execution flow when pages are rendered. Another use of struts generic tags are data extraction. Further Generic Tags are classified into Control Tags and Data Tags. Control Tags: The Control Tags are used for flow control, such as if, else and iterate. Here are the list of Control Tags: * if tag - Details * elseIf tag - Details * else tag - Details * append tag - Details * generator tag - Details * iterator tag - Details * merge tag - Details * subset tag - Details Data Tags: The Data Tags are used for data manipulation or creation, such as bean, push, and i18n. Here are the list of Data Tags: * action - Details * bean - Details * date - Details * include - Details * param - Details * set - Details * text - Details * property - Details Struts UI tags: Struts UI Tags are mainly designed to use the data from your action/value stack or from Data Tags. These tags are used to display the data on the...

Struts2 - Checkbox Tag (Data Tags)

In this section, we are going to describe the checkbox tag. The checkbox tag is a UI tag that is used to render an HTML input element of type checkbox, populated by the specified property from the ValueStack. Add the following code snippet into the struts.xml file. struts.xml <action name="checkboxTag">    <result>/pages/uiTags/checkboxTag.jsp</result> </action> Create a jsp using the tag It renders an HTML input element of type chechbox. checkboxTag.jsp <%@ taglib prefix="s" uri="/struts-tags" %> <html>   <head>    <title>Checkbox  (Form Tag) Tag Example!</title>   </head>   <body>   <h1><span style="background-color: #FFFFcc"> Checkbox Tag Example!</span></h1>   <b>Sex</b><br>   <s:checkbox label="Ma...