Please add your findings to the Wiki so others will see it too... See below for comments...
> -----Original Message----- > From: Nils Hartmann [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 24, 2003 12:16 PM > To: [EMAIL PROTECTED] > Subject: [OS-webwork] Migrating to WW2 > > > Hi, > > I'm currently migrating a WW1 application to XW1/WW2. > > I noticed the following points not mentioned in the "Webwork > 2 Migration Guide" > (http://wiki.opensymphony.com/space/WebWork+2+Migration+Guide); > maybe some of these points are interesting for other who want > to migrate > too. > > It would be nice if some of you could comment these points, > at least where you think I'm running into wrong direction... > > 1. ResultException doesn't exist anymore. > I don't really have working solution here. To make my project > *compile* I copied the ResultException from WW1 to my project > and changed all imports > in > my project. > To make it *work* I'm thinking of writing some Interceptor > which catches > the > ResultException add the result of getMessage() to the > actionErrors of the executed Action and return > ResultException.getResult(). Without having implemented this, > it seems like a workaround for me. > Hmm... What do people think of adding ResultException to WW2? I'm of two minds... On the one hand, throwing an exception for control flow is BAD... On the other, it works ok in WW1.... > 2. DateFormatter doesn't exist anymore > I've replaced it with direct calls to java.text.DateFormat. > Patrick, does the type conversion handle this for you now (in the ww:property tag maybe)? What's the right way to do this? > 3. addError(String, String) in webwork.action.ActionSupport has been > removed. > I'm using addFieldError(String, String) instead. Right, we changed these to be more descriptive. > > 4. addErrorMessage(String) in webwork.action.ActionSupport has been > removed. > I'm using addActionError(String) instead. > > 5. webwork.util.ValueStack is OgnlValueStack now. > All calls to webwork.util.ValueStack has been changed to > calls on OgnlValueStack. Methods "pushValue" and "popValue" > are now simply "push" > and > "pop". Instead of accessing ValueStack.getStack() I'm using > ActionContext.getContext().getValueStack. > Yep. > 6. *Aware-Interface has been removed. > Instead of implementing ServletRequestAware etc. I'm using > [Servlet]ActionContext.getXXX to application map, request, > response etc. > Yep. > 7. isCommand(String) method has been removed. > In ww1 there was a method "isCommand(String)" on > ActionSupport. This method doesn't exist anymore. I don't > know if there is a way to get the name of > the > command and/or method that has been invoked from the dispatcher ? > You can see which alias you're accessing by doing this: ActionContext.getContext().getActionInvocation().getProxy().getActionNam e() > That are the points about the API changes. > > I'm now going to change all usages of EL to Ognl-EL. One > thing I've noticed > yet is, that <ww:property value="[0]"/> returns the > value of '[0]' in [brackets]. ("[Hello World]" instead of > "Hello World"). I think this has been mentioned before on this list. > > Thank you all for building webwork and for commenting on my issues. > > Nils > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Opensymphony-webwork mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork