I could not resolve my problem yet. How can I use the "dispatch" result type
to forward to actions (or maybe tiles definitions) rather than to JSPs?
In my application are some situations where I have to forward the error
messages or the field validation errors to to a different action. I can not
use JSPs cos we use Tiles.
Let's assume we have four different Pages. A welcome-page displaying some
welcome information and a "search-form", a category-page displaying a list
of products and the same "search-form", a product page displaying detailed
product information and the same "search-form" and a "search-result-page"
displaying a list of products and as well the same "search-form".
This is the struts config how it could look like:

<action name="welcome">
  <result type="tiles">welcomePage</result>
</action>

<action name="category" class="com.foo.CategoryAction">
  <result type="tiles">categoryPage</result>
</action>

<action name="product" class="com.foo.ProductAction">
  <result type="tiles">productPage</result>
</action>
                  
<action name="search" class="com.foo.SearchAction">
   <result type="redirect-action">searchResult</result>                         
   <result name="input" type="dispatch">sameAction</result> 
   <result name="error" type="dispatch">sameAction</result>
</action>

<action name="searchResult" class="com.foo.SearchListAction">
  <result type="tiles">searchResultPage</result>
</action>

I do not display the tiles definition here. But it is important to me to
have a "forward" to an action defintion rather than a "redirect". Once I
redirect, I'm going to lose request-scoped data. "redirect" to actions works
perfectly but "forward" doesn't. In my struts configuration sameAction
should be dynamically substituted with the action name or the action call
where the form is included, either "/welcome.action", "/product.action",
"/category.action" or even "/searchResult.action".
Has somebody any idea how to accomplish this? I reckon this is a almost
common workflow.
-- 
View this message in context: 
http://www.nabble.com/-S2--Result-Type-Dispatch-problem-with-relative-Action-calls-tp21368053p21368053.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to