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() { ... }
... }
--- 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
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);
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
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
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.
6 matches
Mail list logo