Struts2.2.1 optiontransferselect  tag example.
Posted on: January 12, 2011 at 12:00 AM
Struts2.2.1 optiontransferselect  tag example.

Struts2.2.1 optiontransferselect  tag example.

In this example, you will see the implementation of optiontransferselect tag of struts2.2.1. The Optiontransferselect tag is a generic UI tag that creates an option transfer select component. There are two <select ...> tags with buttons in the middle of them. With the help of these button tag, you can transfer selected data form one select box to another select box.

Directory structure of optiontransferselect tag example.

 1- index.jsp

<html>ADS_TO_REPLACE_1

<head><title>Struts2.2.1_Optiontransferselect_Example1</title>

<style type="text/css">

hr{margin: 0;}</style></head>ADS_TO_REPLACE_2

<body>

<h2>Struts2.2.1_Optiontransferselect_Example1</h2><hr>

<a href="optionTransfer.action">_Option Transfer Select_</a>ADS_TO_REPLACE_3

</body>

</html>

2-optionTransfer.jsp

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

<html>

<head><title>Struts2.2.1_Optiontransferselect_Example1</title></head>

<body><h2>Struts2.2.1_Optiontransferselect_Example1</h2><hr>ADS_TO_REPLACE_5

<s:form action="resultAction.action">

<s:optiontransferselect

leftTitle="List of indian cities.. "ADS_TO_REPLACE_6

headerKey="0"

headerValue="----Select Indian city-----"

name="IndiaCity"ADS_TO_REPLACE_7

list= "indianCityName"

doubleHeaderKey="0"

doubleHeaderValue="----Select American city-----"ADS_TO_REPLACE_8

rightTitle="List of American cities... "

doubleList="americanCityName" doubleName="americanCity">

</s:optiontransferselect><s:submit> </s:submit>ADS_TO_REPLACE_9

</s:form></body>

</html>

Related Tags for Struts2.2.1 optiontransferselect  tag example.:

Advertisements

Ads

Ads

 
Advertisement null

Ads