Overview
Results of an Action are used in Webwork to map to a view implementation(ex. jsp, vm, html) or another action. Keep in mind though, the com.opensymphony.xwork.Result
interface represents a generic interface for all action execution results, whether that be displaying a webpage, generating an email, sending a JMS message, etc.
Result types define classes and map them to names to be referred in the action configuration results. This serves as a shorthand name-value pair for these classes.
Code Block |
---|
<!-- xwork.xml -->
<action name="bar" class="myPackage.barAction">
<result name="success" type="dispatcher">
<param name="location">foo.jsp</param>
</result>
<result name="error" type="dispatcher">
<param name="location">error.jsp</param>
</result>
</action>
|
Result Types
Webwork provides several implementations of the com.opensymphony.xwork.Result
interface to make web-based interactions with your actions simple. These result types include:
...
Code Block |
---|
<result name="success" type="jasper">
<param name="location">foo.jasper</param>
<param name="dataSource">mySource</param>
<param name="format">CSV</param>
</result>
|
...