struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slayer666 <>
Subject Interator values not showed
Date Tue, 18 May 2010 19:21:38 GMT

i'm trying the append tag and the list values of the appended lists are not
This is the main part of the jsp code:

<s:append var="metalBands">
   <s:param value="%{groups}"/>
   <s:param value="%{groups1}"/>
 Total Bands:<br>
 <s:iterator id="band" value="%{#metalBands}">
   Band: <s:property value=""/><br>

This is my Action class:

package struts2.action;

import java.util.ArrayList;

import com.opensymphony.xwork2.ActionSupport;

public class IteratorAction extends ActionSupport {
	ArrayList<Band> groups=new ArrayList<Band>();
	ArrayList<Band> groups1=new ArrayList<Band>();
	public String greeting(){
		return "Hi, Every body";
	public String execute() throws Exception {
		this.groups.add(new Band("trash","Slayer"));
		this.groups.add(new Band("trash","kreator"));
		this.groups.add(new Band("death","Deicide"));
		this.groups.add(new Band("death","Obituary"));
		this.groups1.add(new Band("heavy","Judas Priest"));
		this.groups1.add(new Band("heavy","Primal Fear"));
		return SUCCESS;

	public ArrayList<Band> getGroups() {
		return groups;

	public void setGroups(ArrayList<Band> groups) {
		this.groups = groups;

	public ArrayList<Band> getGroups1() {
		return groups1;

	public void setGroups1(ArrayList<Band> groups1) {
		this.groups1 = groups1;

This is my bean class:

package struts2.action;

public class Band {
	private String style;
	private String name;
	public Band(String st,String n){;;

	public String getStyle() {
		return style;

	public void setStyle(String style) { = style;

This is the ouput application:

Total Bands:

As you can see there is no values showed .
Please, can you help me with this?.

Thanks in advanced!!.
View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message