Ted Husted wrote:
Struts is not very powerful. There's no action chaining; all of

the models are one layer deep. Talking with a Struts user, I was reminded of the ability of an action to forward to another action, and it's easier than I thought. Silly rabbit. :)
'nuff said.
Although, I'm among those who recommend against action-chaining, since it implies that there is too much business logic in the Action class. (The "chaining" should happen on the business tier.) But, there's nothing to prevent it (if you are wearing your bullet-proof shoes).
I'm one of those that find action-chaining very helpful. Here's an example of how/why I use it (all JSP's are under WEB-INF)

- A list view of all items
- A delete link by each of the items
- User clicks to delete an item
- DeleteAction deletes the item and wants to forward back to
the list view
- An action is needed to generate the list view dynamically

I simply chain the "success" forward of the "/delete" mapping to "/view.do".

I've yet to see a solution that doesn't blur the delete step with the generate list view step - and this forces actions to be tied to how its used in the GUI, which to me goes against what Struts is all about. Creating tiny actions that only do one single thing and then glue them together in struts-config is something I find very helpful.

Is there a cleaner way to do this without action chaining?

Erik


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



Reply via email to