Struts2 question: ModelDriven +

2011-01-28 Thread Agoston Bejo
Hey there, here's my problem: a) the action: public class SomeAction ... implements ModelDriven { ... public SomeModel getModel() {...} ... } b) the model: public class SomeModel implements Serializable { ... public List> getMessageTypes() { ... } public String getRaggedyAndy() { ... } ... }

Re: struts2 question

2008-03-02 Thread Dave Newton
--- red phoenix <[EMAIL PROTECTED]> wrote: > I use struts2.0.11, I use Hibernate to get data and put it into attribute > in > struts2 action,like follows: > public String show() throws Exception{ > request=ServletActionContext.getRequest(); > List myList=this.getHibernateTemplate().find("from t

struts2 question

2008-03-02 Thread red phoenix
I use struts2.0.11, I use Hibernate to get data and put it into attribute in struts2 action,like follows: public String show() throws Exception{ request=ServletActionContext.getRequest(); List myList=this.getHibernateTemplate().find("from test.MyModel"); request.setAttribute("myList",myList);

Re: Struts2 question on action with properties

2006-11-09 Thread Ing. Andrea Vettori
Ok I understand. What I'm missing is that when the form is displayed the Action is not yet istantiated so no methods can be called. If you want to call a method of that Action you must instantiate it with the action tag. Thanks Il giorno 10/nov/06, alle ore 00:15, Ted Husted ha scritto: T

Re: Struts2 question on action with properties

2006-11-09 Thread Ted Husted
The typical approach is to place an input method on the "Action that is associated to the form". To display the method, you can refer to "action_input" and then to submit the action you can refer to just "action". If you want to avoid defining two action elements, you can use wildcards. Now, a

Struts2 question on action with properties

2006-11-07 Thread Ing. Andrea Vettori
Hi, I've used struts1 a lot and now I'm using struts2 version 2.0.1 for a new medium-sized project (it's an e-commerce site). I'm facing this problem and since the documentation is poor (or at least it seems poor, maybe I'm looking on the wrong places), I need an advice from you experts.