I sent this to you already but apparently was lost
you can use the spring plugin to create the necessary entities for you e.g.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bean="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-2.0.xsd">
<util:bean id="BaranBean" path="com.baran.BaranBean">
</util:bean>
</beans>then in your Action class declare the bean, mutator and accessor e.g.
public class BaranAction extends ActionSupport
{
public com.baran.BaranBean baran_bean;
public void setBaranBean(BaranBean baran_bean) {
this.baran_bean = baran_bean;
}
public void getBaranBean() {
return this.baran_bean;
}
}Did you try this?
Martin
______________________________________________
Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note de
déni et de confidentialité
This message is confidential. If you should not be the intended receiver, then
we ask politely to report. Each unauthorized forwarding or manufacturing of a
copy is inadmissible. This message serves only for the exchange of information
and has no legal binding effect. Due to the easy manipulation of emails we
cannot take responsibility over the the contents.
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung.
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est
interdite. Ce message sert à l'information seulement et n'aura pas n'importe
quel effet légalement obligatoire. Étant donné que les email peuvent facilement
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité
pour le contenu fourni.
> Date: Mon, 13 Apr 2009 09:00:32 -0400
> From: [email protected]
> To: [email protected]
> Subject: Re: Struts access static list
>
> Baran wrote:
> > Hi Guys,
> >
> > This is about implementing reusability in the actions. I am struggling to
> > identify the ways how we can share some comming functionality between
> > different actions. Lets say I got a list of users i need to use as a
> > combobox list at multiple pages. Right now I have to push the code in every
> > action I need that list displayed for.
> >
> > any idea if I can use that list at multiple places without repeating the
> > code. I guess we need to have it static, but not sure how we can use a list
> > as an static element
> it's a matter of reorganizing your Java classes. extract all the
> code that's common to all your user-related classes into a class called
> UserActionSupport, and then have all those user-related classes extend
> from UserActionSupport.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
_________________________________________________________________
Rediscover Hotmail®: Get quick friend updates right in your inbox.
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Updates1_042009