Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change 
notification.

The following page has been changed by MichaelJouravlev:
http://wiki.apache.org/struts/RoughSpots

------------------------------------------------------------------------------
      * [jcarreira] I can attest that the Spring scoped components work well 
with WebWork. It's what we use at work for maintaining session or request state.
      * [plightbo] Let's not dismiss Tim's comments too quickly. While we might 
not implement a solution exactly like he suggests, his point is valid that 
handling state management in WebWork has always been a very week area. The 
ScopeInterceptor isn't a great option either, especially considering one of my 
other issues specifically asks that we avoid having to create custom 
interceptor stacks for various actions.
      * [jcarreira] I'm open to hearing good ideas for state management. 
Especially short-lived wizard type state. Long lived session state (things like 
your user profile) work really well as Spring session-scoped components, but 
state which is just used for the next 4 or 5 pages isn't such a good fit.
+     * [MJ] I think talking in terms of pages does not really get us further 
from ancient SAF1 practices. A web resource can have one view (page) or ten. A 
wizard can have ten pages defined, but it can use only 3 or 5 of them depending 
on current state and transitions. It is better to think in terms of web 
resources, and when it goes out of scope. A wizard is a distinct web resource, 
who cares how many pages it has. I have built a wizard engine a year ago, and 
it proved its viability and robustness. No XML, by the way. Check the 
[http://www.superinterface.com/wizard/signupWizard.do sample]. Try to break it 
with Reload, Back and Forward buttons. The wizard code hasn't been changed for 
almost a year, which shows the maturity. I can provide the code and the docs if 
there is interest. I know that Tim as well as Jason dislike session-scoped 
data. I hope you guys change your point of view.
+     * [MJ] In regards to wizards and Redirect-After-Post pattern, does 
Webwork have something like FlashScope? FlashScope works for only one redirect 
call, so there may be something longer than FlashScope, but shorter than 
session. At best, it would be great if a stateful component like a wizard, 
could be assigned to its own FlashScope+ .
  
    1. In tandem with the previous point, since Actions are already stateful, 
it'd be nice to have the ActionContext injected into the Action.  One benefit 
is when a newbie developer needs it, the linkage is obvious (they don't have to 
a priori know about the ActionContext, they're being handed in it on a 
platter). If the developer can subclass ActionContext, it would also encourage 
them to implement a base action which accepts the context inject and leveraging 
the fact that JDK 1.5 allows co-variant returns, also write a getContext() 
method that returns the down-casted type; they wouldn't have to do 
((MyActionContext) ActionContext.getContext()).getUser() for example, just 
getContext().getUser().
      * [frankz] This might well address the issue of !ActionContext being 
!ThreadLocal.  If it was injected, it wouldn't need to be !ThreadLocal to get 
the same basic effect, and maybe more importantly, it wouldn't automatically be 
available to helper classes as it is as a !ThreadLocal.  That would address my 
concern about "inappropriate" usage of !ActionContext.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to