Subset Tag

In this tutorial you will learn about the struts tags

Subset Tag

Subset Tag (Control Tags) Example Using Start

In this section, you will learn how to set the tool tip text for text field tag of struts2. Tool Tip text is the help text of any component for user. When you rest the mouse cursor on the component then at that point a message. Which show the information about that component.

Add the following code snippet into the struts.xml file.

<?xml version="1.0" encoding="UTF-8" ?>
  "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"

  <!-- Rose India Struts Tutorials -->
  <constant name="struts.enable.DynamicMethodInvocation" value="false" />
  <constant name="struts.devMode" value="true" />

  <package name="roseindia" namespace="/roseindia" 

  <action name="Tooltips">

 <!-- Add actions here -->

  <!-- Add packages here -->


Now we create a jsp page using <s:form> and <s:textfield> tags as shown in the toolTips.jsp page. 


<%taglib prefix="s" uri="/struts-tags" %>

  <title>Combobox (Form TagTag Example!</title>
  <link href="<s:url value="/css/main.css"/>" rel="stylesheet"
  <h1><span style="background-color: #FFFFcc">Tooltips Example!</span></h1>
  <s:textfield name="name" label="Enter Name" 
"20" tooltip="Please Enter name"/>
  <s:param name="tooltipDelay" value="200" />

Output of toolTips: