struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierre Thibaudeau" <pierre.thibaud...@gmail.com>
Subject Re: [S2] ModelDriven: model not pushed on stack?
Date Wed, 27 Aug 2008 05:43:09 GMT
2008/8/27 Wes Wannemacher <wesw@wantii.com>

> this is documented behavior -
> http://struts.apache.org/2.x/docs/model-driven-interceptor.html
>
> see the second note, toward the top of the page.
>

Wes, are you referring to the following note:  "The ModelDrivenInterceptor
will only push the model into the stack when the model is not null, else it
will be ignored."
Notice that, in my original post, I did address that specific issue.
Moreover, if you modify my "FaillingAction" to the following, it still
fails:

/*********************/
/* StillFailingAction */
/*********************/
public class StillFailingAction extends ActionSupport implements
ModelDriven<SmallObject>, Preparable {
    private SmallObject obj;
    public SmallObject getModel() { return obj; }
    public void prepare() { obj = new SmallObject(""); }
    public String execute() {
        obj = new SmallObject("bar");
        return SUCCESS;
    }
}

The model being put on the stack is the zero-string one, not the "bar"
one...

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message