Now that WebWork has a GenericDispatcher, we need to allow a much more extensible configuration. In order to do this, I belive that views.properties needs to be removed completely. For example there is a big difference between:
Foo.success=Bar.action (the Bar action) Foo.success=Bar.action (the URI "Bar.action")
Clearly we've moved past the point where results are just JSP views, so we need to be able to specify this information in our config files. Not only that, but in order to allow for customized Actions (such as a PoolingAction) we will need properties for various actions. These properties are actually sort of already in WebWork, in the form of the CommandAware interface. Basically by specifying your action as:
Foo.action=Foo!someCommand
You are really doing this:
<action name="Foo" class="Foo"> <property name="command">someCommand</property> </action>
Essentially, the concept of "aliases" in the configuration should be done away with and replaced with generic properties. So besides commands, we can no start customizing the behavior of all our actions based upon the property value. Then for views, you can use a pluggable ViewFactory like so:
<action name="Foo" class="Foo"> <property name="command">someCommand</property> <views> <view name="input" factory="webwork.view.JSPViewFactory"> <property name="jspName">input.jsp</property> </view> <view name="error" factory="webwork.view.JSPViewFactory"> <property name="jspName">/global/error.jsp</property> <property name="fullPath">true</property> </view> <view name="success" factory="webwork.view.ActionViewFactory"> <property name="actionName">Bar</property> <property name="copyPrevious">true</property> </view> </views> </action>
Any thoughts?
4:02:04 PM
|