THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- Struts 2 is dependant on XWork 2 (nightly build).
- Java 1.5 is required to build the Struts 2 distribution from source, but Java 1.4 is targeted for the binary JARs.
- Rich text editor tag has been removed (a possible replacement would be to use the textarea tag with theme="ajax", this will used dojo's rich text editor)
Code Block <s:textarea theme="ajax" />
- Datepicker tag is now using dojo's (limited in terms functionality and internationalization)
- foo!bar functionality is off by default (could be truned on by having struts.compatibilityMode=true in struts.properties)
Code Block title struts.properties struts.compatibilityMode = true
- prepare interceptor now uses reflection to call prepareXXX where XXX is the action method configured for the particular action in struts.xml
Code Block <action name="myAction" method="execute" ....> ..... </action> // with the above configuration, and preparator interceptor in place, call // sequence will be 1] prepareExecute() 2] prepare() (could be left out depending on interceptor's alwaysInvokePreapre parameter) 3] execute()
- Default workflow interceptor (named workflow in struts-default.xml) now uses reflection to call validateXXX on the action class that implements Validateable interface where XXX is the action method configured for the particular action in struts.xml
Code Block <action name="myAction" method="execute" ...> ... </action> // with the above configuration, and workflow interceptor in place, call // sequence for action that imlpements Validateable interface will be 1] validateExecute() 2] validate() (could be left out depending on interceptor's alwaysInvokeValidate parameter) 3] execute()
- doXXX fallback method call is being removed.
Code Block <action name="myAction" method="execute" ...> ... </action> // with the above, if execute() method is not found in the action, no // doExecute() will be fallbacked. It is considered as an error
- ConfigurationManager is no longer a static factory. It is now an instance created through Dispatcher. Custom configuration could be done through DispatcherListener.
- Configuration is no longer statically accesible, it is created by ConfigurationManager. Custom configuration could be done through DispatcherListener.
- Custom configuration to ConfigurationManager and Configuration cannot be done statically anymore, instead use Dispatcher's DispatcherListener to achieve such effect.
Code Block Dispatcher.addDispatcherListener( new DispatcherListener() { public void dispatcherInitialized(Dispatcher dispatcher) { // do custom stuff here eg. dispatcher.setConfigurationManager(....); } public void dispatcherDestroyed(Dispatcher dispatcher) { // do clean up of custom stuff here } });
...