alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Struts example source code file (PersonAction.java)

This example Struts source code file (PersonAction.java) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Struts tags/keywords

conversion, conversion, list, list, personaction, personaction, util

The Struts PersonAction.java source code

package com.opensymphony.xwork2.test.annotations;

import com.opensymphony.xwork2.conversion.annotations.Conversion;
import com.opensymphony.xwork2.conversion.annotations.ConversionType;
import com.opensymphony.xwork2.conversion.annotations.TypeConversion;
import com.opensymphony.xwork2.util.Element;

import java.util.List;

@Conversion(
	conversions={
		@TypeConversion(type=ConversionType.APPLICATION,
						key="com.opensymphony.xwork2.test.annotations.Address",
						converter="com.opensymphony.xwork2.test.annotations.AddressTypeConverter"),
		@TypeConversion(type=ConversionType.APPLICATION,
						key="com.opensymphony.xwork2.test.annotations.Person",
						converter="com.opensymphony.xwork2.test.annotations.PersonTypeConverter")})
public class PersonAction {
	List<Person> users;
	private List<Address> address;
	@Element(com.opensymphony.xwork2.test.annotations.Address.class)
	private List addressesNoGenericElementAnnotation;

	public List<Person> getUsers() {
		return users;
	}

	public void setUsers(List<Person> users) {
		this.users = users;
	}

	public void setAddress(List<Address> address) {
		this.address = address;
	}

	public List<Address> getAddress() {
		return address;
	}

	public void setAddressesNoGenericElementAnnotation(List addressesNoGenericElementAnnotation) {
		this.addressesNoGenericElementAnnotation = addressesNoGenericElementAnnotation;
	}

	public List getAddressesNoGenericElementAnnotation() {
		return addressesNoGenericElementAnnotation;
	}
}

Other Struts examples (source code examples)

Here is a short list of links related to this Struts PersonAction.java source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.