struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yasser Zamani <>
Subject Re: Instancia the bean
Date Wed, 03 Jan 2018 06:23:54 GMT

On 1/3/2018 1:08 AM, José Antonio Delgado Trujillo wrote:
> If you have a form linked to a bean using key attribute, then when you submitted, must
you instantiate the bean before the call action populate the properties? Or Strust2 instantiate
automatically after you call the action.

You must instantiate bean like below ....

> <form action=“a”>
> 	<s:textField key=“bean.t”/>
> <submit/>
> //The method execute of the A class action
> public class A extends AcctionSupport{
>      private Object bean;

private Object bean = new ...; //because for "bean.t" Struts calls 
getBean().getT() on get and getBean().setT() on post.

To unsubscribe, e-mail:
For additional commands, e-mail:
View raw message