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.
2. DateFormatter doesn't exist anymore I've replaced it with direct calls to java.text.DateFormat.
3. addError(String, String) in webwork.action.ActionSupport has been removed.
I'm using addFieldError(String, String) instead.
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.
6. *Aware-Interface has been removed. Instead of implementing ServletRequestAware etc. I'm using [Servlet]ActionContext.getXXX to application map, request, response etc.
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 ?
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