In Struts Shale there is an optional interface that you can have your
backing beans implement.  This interface includes an init method
(can't remember the exact name of the method offhand) which will be
guaranteed (by Shale) to be called right after the bean is created by
the managed bean facility.  (At least I think that is right, Craig can
probably explain it better than I.)


SEan,
do you mean ViewController-Interface?
http://www.apache.org/~craigmcc/struts-shale/org/apache/shale/ViewController.html
It also contains a nice prerender() method. That is also nice if you've
got non-request scope beans.

-Matthias

Anyways, it would be interesting to know if there is a potential
conflict between these two features.  I'm thinking that there wouldn't
be much of a problem because if you were saving the state of the bean
on the client, then you would just choose not to make that bean
implment the special interface that provides the extra lifecycle
methods.

Just something to think about.  I don't know enough about Shale or
saveState to tell you one way or another.  I do think that some of the
uses for saveState might be handled by having the initialization
functionality of Shale.

sean


-- Matthias Weßendorf Aechterhoek 18 DE-48282 Emsdetten Germany phone: +49-2572-9170275 cell phone: +49-179-1118979 email: matzew AT apache DOT org url: http://www.wessendorf.net callto://mwessendorf (Skype) icq: 47016183

Reply via email to