On 6/23/06, Paul Benedict <[EMAIL PROTECTED]> wrote:

I find two uses of action mappings in my applications. One loads data for
view, another writes data and then goes to a view.


Two companies ago, I broke these down into "request handler" and "display
handler" classes. At my last company, those morphed into the same idea
implemented as separate commands in a chain. With respect to your mappings,
the first would be a chain of one command, the second, a chain of two
commands. (Using chains also means I can reconfigure navigation without
changing the Java code.)

These views, I suppose, would logically be "pages" if Struts were a
page-based controller. But I do find this kind of use-case always cropping
into my apps, and one of my biggest problems is that when I do a save or
cancel, I have no automated stack that tells me what my last logical view
was.


I'm not sure I understand this part. I haven't found a need for "stacks"
beyond just the 'input' of the action mapping. Could you elaborate? Are you
really talking about nested dialogs here?

So I'd like to propose allowing developers to mark actions as a page or a
view (and I have not finialized my nomenclature, so please help me word it
better). Then Struts can keep a running stack, at some N depth (maybe just
1), that would allow me to always return to the previous view.


The first part you could do today by adding custom properties to your
mappings. The second part, well, I'm sure customising either the request
processor chain, or your own chains, could accomplish that. (Whatever it is.
;)

--
Martin Cooper


<action mapping .... page="true" />

In the Action class:
Action.findPreviousPageForward();

Thoughts, O comrades?


---------------------------------
How low will we go? Check out Yahoo! Messenger's low  PC-to-Phone call
rates.

Reply via email to