You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dominik Fischer <fi...@idowa.de> on 2009/02/05 14:59:19 UTC

Access Struts2 Action Properties - Noob

Hello folks,

how can i access a property (i.e. data) of a class like....

public class BabyAction extends ActionSupport implements RequestAware {
	private List data;

	public List getData() {
         	return this.data;
	}

	public void setSearch(List data) {
         	this.data = data;
	}

	...

}

... in a custom tag like ...
	<i:divTable list="data"/>
... without the help of request.setParameter() i.e.
?????



Thankz
Dom


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Access Struts2 Action Properties - Noob

Posted by Dave Newton <ne...@yahoo.com>.
Dominik Fischer wrote:
> how can i access a property (i.e. data) of a class like....
> 
> public class BabyAction extends ActionSupport implements RequestAware {
>     private List data;
> 
>     public List getData() {
>             return this.data;
>     }
> 
>     public void setSearch(List data) {
>             this.data = data;
>     }
> 
>     ...
> 
> }
> 
> ... in a custom tag like ...
>     <i:divTable list="data"/>
> ... without the help of request.setParameter() i.e.
> ?????

<i:divTable list="${data}"/>

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Access Struts2 Action Properties - Noob (correction)

Posted by "Kawczynski, David" <da...@merck.com>.
Correction: 2.4 container is needed for el scripting.  

>> BTW, Dave Newton's suggestion of using ${ propertyname } is the way
to
>> go, assuming you're on a 2.3 servlet container.  I completely
overlooked
>> the simple approach.  
Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Access Struts2 Action Properties - Noob

Posted by "Kawczynski, David" <da...@merck.com>.
>From the looks of it, your tag class is trying to call the getRequest()
method of the action class.  That's completely unnecessary.  It could
access the "data" property as it would for any pojo variable.  No need
to deal with the request, much less the action class or any of its
methods.

BTW, Dave Newton's suggestion of using ${ propertyname } is the way to
go, assuming you're on a 2.3 servlet container.  I completely overlooked
the simple approach.  


-----Original Message-----
From: Dominik Fischer [mailto:fischer.d@idowa.de] 
Sent: Thursday, February 05, 2009 11:20 AM
To: Struts Users Mailing List
Subject: Re: Access Struts2 Action Properties - Noob

Ok. Your idea worked allready. But know i have more properties to 
transport. What do you say about following construction:

/****Example Action****/
public class EAction extends ActionSupport implements RequestAware {
	private List data;
	private Map<String, Object> request;

	public void setRequest(Map<String, Object> request) {
		this.request = request;
	}

	public Map<String, Object> getRequest() {
		return request;
	}

	public String execute() {
		getRequest().put("currentAction",this);
		return SUCCESS;
	}
}

/****Example Tag****/
public class ETag extends TagSupport {
	pirvate String action;
	
	//Getter/Setter start
	....
	//Getter/Setter end

	public int doStartTag() throws JspException {
		Object oAction =
		pageContext.getRequest().getAttribute(getRequest());
		
		if(oAction != null && oAction instanceof EAction) {
			EAction eAction = (EAction) oAction;
			//Then do something
		}
		return SKIP_BODY;
	}
}

I think this will work, but is there a better and propere construct?




Kawczynski, David schrieb:
> You can have your actionsupport subclass implement the 
> org.apache.struts2.interceptor.RequestAware interface 
> 
> This means your class will automatically get a Map which 
> is bound to the request attributes.  You can add things 
> to that map and they will be set as request attributes.
> 
> And the good news it, because it's a Map it plays well
> with junit without having to mock anything up.
> 
> 
> -----Original Message-----
> From: Dominik Fischer [mailto:fischer.d@idowa.de] 
> Sent: Thursday, February 05, 2009 10:57 AM
> To: Struts Users Mailing List
> Subject: Re: Access Struts2 Action Properties - Noob
> 
> Thank you,
> that is a first help. But is there a possibility without using tags
from
> 
> Struts? I don't know, i'm dreaming of things like 
> strutsActionSession.getAttribute("data"). Do you know something like
> this?
> 
> 
> 
> Kawczynski, David schrieb:
>> http://struts.apache.org/2.0.14/docs/set.html
>>
>>
>> -----Original Message-----
>> From: Dominik Fischer [mailto:fischer.d@idowa.de] 
>> Sent: Thursday, February 05, 2009 8:59 AM
>> To: user@struts.apache.org
>> Subject: Access Struts2 Action Properties - Noob
>>
>> Hello folks,
>>
>> how can i access a property (i.e. data) of a class like....
>>
>> public class BabyAction extends ActionSupport implements RequestAware
> {
>> 	private List data;
>>
>> 	public List getData() {
>>          	return this.data;
>> 	}
>>
>> 	public void setSearch(List data) {
>>          	this.data = data;
>> 	}
>>
>> 	...
>>
>> }
>>
>> ... in a custom tag like ...
>> 	<i:divTable list="data"/>
>> ... without the help of request.setParameter() i.e.
>> ?????
>>
>>
>>
>> Thankz
>> Dom
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>> Notice:  This e-mail message, together with any attachments, contains
>> information of Merck & Co., Inc. (One Merck Drive, Whitehouse
Station,
>> New Jersey, USA 08889), and/or its affiliates (which may be known
>> outside the United States as Merck Frosst, Merck Sharp & Dohme or
>> MSD and in Japan, as Banyu - direct contact information for
affiliates
> is
>> available at http://www.merck.com/contact/contacts.html) that may be
>> confidential, proprietary copyrighted and/or legally privileged. It
is
>> intended solely for the use of the individual or entity named on this
>> message. If you are not the intended recipient, and have received
this
>> message in error, please notify us immediately by reply e-mail and
>> then delete it from your system.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> Notice:  This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
> New Jersey, USA 08889), and/or its affiliates (which may be known
> outside the United States as Merck Frosst, Merck Sharp & Dohme or
> MSD and in Japan, as Banyu - direct contact information for affiliates
is
> available at http://www.merck.com/contact/contacts.html) that may be
> confidential, proprietary copyrighted and/or legally privileged. It is
> intended solely for the use of the individual or entity named on this
> message. If you are not the intended recipient, and have received this
> message in error, please notify us immediately by reply e-mail and
> then delete it from your system.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Access Struts2 Action Properties - Noob

Posted by Dominik Fischer <fi...@idowa.de>.
Ok. Your idea worked allready. But know i have more properties to 
transport. What do you say about following construction:

/****Example Action****/
public class EAction extends ActionSupport implements RequestAware {
	private List data;
	private Map<String, Object> request;

	public void setRequest(Map<String, Object> request) {
		this.request = request;
	}

	public Map<String, Object> getRequest() {
		return request;
	}

	public String execute() {
		getRequest().put("currentAction",this);
		return SUCCESS;
	}
}

/****Example Tag****/
public class ETag extends TagSupport {
	pirvate String action;
	
	//Getter/Setter start
	....
	//Getter/Setter end

	public int doStartTag() throws JspException {
		Object oAction =
		pageContext.getRequest().getAttribute(getRequest());
		
		if(oAction != null && oAction instanceof EAction) {
			EAction eAction = (EAction) oAction;
			//Then do something
		}
		return SKIP_BODY;
	}
}

I think this will work, but is there a better and propere construct?




Kawczynski, David schrieb:
> You can have your actionsupport subclass implement the 
> org.apache.struts2.interceptor.RequestAware interface 
> 
> This means your class will automatically get a Map which 
> is bound to the request attributes.  You can add things 
> to that map and they will be set as request attributes.
> 
> And the good news it, because it's a Map it plays well
> with junit without having to mock anything up.
> 
> 
> -----Original Message-----
> From: Dominik Fischer [mailto:fischer.d@idowa.de] 
> Sent: Thursday, February 05, 2009 10:57 AM
> To: Struts Users Mailing List
> Subject: Re: Access Struts2 Action Properties - Noob
> 
> Thank you,
> that is a first help. But is there a possibility without using tags from
> 
> Struts? I don't know, i'm dreaming of things like 
> strutsActionSession.getAttribute("data"). Do you know something like
> this?
> 
> 
> 
> Kawczynski, David schrieb:
>> http://struts.apache.org/2.0.14/docs/set.html
>>
>>
>> -----Original Message-----
>> From: Dominik Fischer [mailto:fischer.d@idowa.de] 
>> Sent: Thursday, February 05, 2009 8:59 AM
>> To: user@struts.apache.org
>> Subject: Access Struts2 Action Properties - Noob
>>
>> Hello folks,
>>
>> how can i access a property (i.e. data) of a class like....
>>
>> public class BabyAction extends ActionSupport implements RequestAware
> {
>> 	private List data;
>>
>> 	public List getData() {
>>          	return this.data;
>> 	}
>>
>> 	public void setSearch(List data) {
>>          	this.data = data;
>> 	}
>>
>> 	...
>>
>> }
>>
>> ... in a custom tag like ...
>> 	<i:divTable list="data"/>
>> ... without the help of request.setParameter() i.e.
>> ?????
>>
>>
>>
>> Thankz
>> Dom
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>> Notice:  This e-mail message, together with any attachments, contains
>> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
>> New Jersey, USA 08889), and/or its affiliates (which may be known
>> outside the United States as Merck Frosst, Merck Sharp & Dohme or
>> MSD and in Japan, as Banyu - direct contact information for affiliates
> is
>> available at http://www.merck.com/contact/contacts.html) that may be
>> confidential, proprietary copyrighted and/or legally privileged. It is
>> intended solely for the use of the individual or entity named on this
>> message. If you are not the intended recipient, and have received this
>> message in error, please notify us immediately by reply e-mail and
>> then delete it from your system.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> Notice:  This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
> New Jersey, USA 08889), and/or its affiliates (which may be known
> outside the United States as Merck Frosst, Merck Sharp & Dohme or
> MSD and in Japan, as Banyu - direct contact information for affiliates is
> available at http://www.merck.com/contact/contacts.html) that may be
> confidential, proprietary copyrighted and/or legally privileged. It is
> intended solely for the use of the individual or entity named on this
> message. If you are not the intended recipient, and have received this
> message in error, please notify us immediately by reply e-mail and
> then delete it from your system.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Access Struts2 Action Properties - Noob

Posted by "Kawczynski, David" <da...@merck.com>.
I just noticed your action class already implements the RequestAware
interface.  It should have something similar to the following:

private Map requestMap;
public void setRequest(Map<String,Object> request) {
	...
	this.requestMap = request;
	...
}

Which means you can do this somewhere relevant in your action:
	...
	this.requestMap.put("data", this.data);
	...

and all should be well.



-----Original Message-----
From: Kawczynski, David 
Sent: Thursday, February 05, 2009 11:06 AM
To: Struts Users Mailing List
Subject: RE: Access Struts2 Action Properties - Noob

You can have your actionsupport subclass implement the 
org.apache.struts2.interceptor.RequestAware interface 

This means your class will automatically get a Map which 
is bound to the request attributes.  You can add things 
to that map and they will be set as request attributes.

And the good news it, because it's a Map it plays well
with junit without having to mock anything up.


-----Original Message-----
From: Dominik Fischer [mailto:fischer.d@idowa.de] 
Sent: Thursday, February 05, 2009 10:57 AM
To: Struts Users Mailing List
Subject: Re: Access Struts2 Action Properties - Noob

Thank you,
that is a first help. But is there a possibility without using tags from

Struts? I don't know, i'm dreaming of things like 
strutsActionSession.getAttribute("data"). Do you know something like
this?



Kawczynski, David schrieb:
> http://struts.apache.org/2.0.14/docs/set.html
> 
> 
> -----Original Message-----
> From: Dominik Fischer [mailto:fischer.d@idowa.de] 
> Sent: Thursday, February 05, 2009 8:59 AM
> To: user@struts.apache.org
> Subject: Access Struts2 Action Properties - Noob
> 
> Hello folks,
> 
> how can i access a property (i.e. data) of a class like....
> 
> public class BabyAction extends ActionSupport implements RequestAware
{
> 	private List data;
> 
> 	public List getData() {
>          	return this.data;
> 	}
> 
> 	public void setSearch(List data) {
>          	this.data = data;
> 	}
> 
> 	...
> 
> }
> 
> ... in a custom tag like ...
> 	<i:divTable list="data"/>
> ... without the help of request.setParameter() i.e.
> ?????
> 
> 
> 
> Thankz
> Dom
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> Notice:  This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
> New Jersey, USA 08889), and/or its affiliates (which may be known
> outside the United States as Merck Frosst, Merck Sharp & Dohme or
> MSD and in Japan, as Banyu - direct contact information for affiliates
is
> available at http://www.merck.com/contact/contacts.html) that may be
> confidential, proprietary copyrighted and/or legally privileged. It is
> intended solely for the use of the individual or entity named on this
> message. If you are not the intended recipient, and have received this
> message in error, please notify us immediately by reply e-mail and
> then delete it from your system.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates
is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Access Struts2 Action Properties - Noob

Posted by "Kawczynski, David" <da...@merck.com>.
You can have your actionsupport subclass implement the 
org.apache.struts2.interceptor.RequestAware interface 

This means your class will automatically get a Map which 
is bound to the request attributes.  You can add things 
to that map and they will be set as request attributes.

And the good news it, because it's a Map it plays well
with junit without having to mock anything up.


-----Original Message-----
From: Dominik Fischer [mailto:fischer.d@idowa.de] 
Sent: Thursday, February 05, 2009 10:57 AM
To: Struts Users Mailing List
Subject: Re: Access Struts2 Action Properties - Noob

Thank you,
that is a first help. But is there a possibility without using tags from

Struts? I don't know, i'm dreaming of things like 
strutsActionSession.getAttribute("data"). Do you know something like
this?



Kawczynski, David schrieb:
> http://struts.apache.org/2.0.14/docs/set.html
> 
> 
> -----Original Message-----
> From: Dominik Fischer [mailto:fischer.d@idowa.de] 
> Sent: Thursday, February 05, 2009 8:59 AM
> To: user@struts.apache.org
> Subject: Access Struts2 Action Properties - Noob
> 
> Hello folks,
> 
> how can i access a property (i.e. data) of a class like....
> 
> public class BabyAction extends ActionSupport implements RequestAware
{
> 	private List data;
> 
> 	public List getData() {
>          	return this.data;
> 	}
> 
> 	public void setSearch(List data) {
>          	this.data = data;
> 	}
> 
> 	...
> 
> }
> 
> ... in a custom tag like ...
> 	<i:divTable list="data"/>
> ... without the help of request.setParameter() i.e.
> ?????
> 
> 
> 
> Thankz
> Dom
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> Notice:  This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
> New Jersey, USA 08889), and/or its affiliates (which may be known
> outside the United States as Merck Frosst, Merck Sharp & Dohme or
> MSD and in Japan, as Banyu - direct contact information for affiliates
is
> available at http://www.merck.com/contact/contacts.html) that may be
> confidential, proprietary copyrighted and/or legally privileged. It is
> intended solely for the use of the individual or entity named on this
> message. If you are not the intended recipient, and have received this
> message in error, please notify us immediately by reply e-mail and
> then delete it from your system.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Access Struts2 Action Properties - Noob

Posted by Dominik Fischer <fi...@idowa.de>.
Thank you,
that is a first help. But is there a possibility without using tags from 
Struts? I don't know, i'm dreaming of things like 
strutsActionSession.getAttribute("data"). Do you know something like this?



Kawczynski, David schrieb:
> http://struts.apache.org/2.0.14/docs/set.html
> 
> 
> -----Original Message-----
> From: Dominik Fischer [mailto:fischer.d@idowa.de] 
> Sent: Thursday, February 05, 2009 8:59 AM
> To: user@struts.apache.org
> Subject: Access Struts2 Action Properties - Noob
> 
> Hello folks,
> 
> how can i access a property (i.e. data) of a class like....
> 
> public class BabyAction extends ActionSupport implements RequestAware {
> 	private List data;
> 
> 	public List getData() {
>          	return this.data;
> 	}
> 
> 	public void setSearch(List data) {
>          	this.data = data;
> 	}
> 
> 	...
> 
> }
> 
> ... in a custom tag like ...
> 	<i:divTable list="data"/>
> ... without the help of request.setParameter() i.e.
> ?????
> 
> 
> 
> Thankz
> Dom
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> Notice:  This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
> New Jersey, USA 08889), and/or its affiliates (which may be known
> outside the United States as Merck Frosst, Merck Sharp & Dohme or
> MSD and in Japan, as Banyu - direct contact information for affiliates is
> available at http://www.merck.com/contact/contacts.html) that may be
> confidential, proprietary copyrighted and/or legally privileged. It is
> intended solely for the use of the individual or entity named on this
> message. If you are not the intended recipient, and have received this
> message in error, please notify us immediately by reply e-mail and
> then delete it from your system.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Access Struts2 Action Properties - Noob

Posted by "Kawczynski, David" <da...@merck.com>.
http://struts.apache.org/2.0.14/docs/set.html


-----Original Message-----
From: Dominik Fischer [mailto:fischer.d@idowa.de] 
Sent: Thursday, February 05, 2009 8:59 AM
To: user@struts.apache.org
Subject: Access Struts2 Action Properties - Noob

Hello folks,

how can i access a property (i.e. data) of a class like....

public class BabyAction extends ActionSupport implements RequestAware {
	private List data;

	public List getData() {
         	return this.data;
	}

	public void setSearch(List data) {
         	this.data = data;
	}

	...

}

... in a custom tag like ...
	<i:divTable list="data"/>
... without the help of request.setParameter() i.e.
?????



Thankz
Dom


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org