You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Gianluca Musella <gi...@bsc.it> on 2009/01/24 21:57:56 UTC

I: model created more than 1 times

Does someone can explain me this behaviour please?

I'm absolutely sure that my model is created more than one times. This
is a problem for me.

Can you explain me the lifecycle of the model?

Thanks in advance

Gianluca


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


Re: I: model created more than 1 times

Posted by Wes Wannemacher <we...@wantii.com>.
On Saturday 24 January 2009 15:57:56 Gianluca Musella wrote:
> Does someone can explain me this behaviour please?
>
> I'm absolutely sure that my model is created more than one times. This
> is a problem for me.
>
> Can you explain me the lifecycle of the model?
>
> Thanks in advance
>
> Gianluca
>

Which version of struts are you using? There was a bug at some point where 
getModel() was called more than once, something like the following - 

if (getModel() != null) {
  model = getModel();
}

This came up a few times and prior to the fix, the workaround was to 
instantiate the model in a prepare() method. 

-Wes

-- 

Wes Wannemacher
Author - Struts 2 In Practice 
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher


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