Hi, Is there any out-of-the-box struts support for the following: In the system I am designing there is a common use case which can be called by other use cases in a function like manner (i.e. the common use case accepts parameters and returns a result to the calling screen). The parent screen needs to passivate itself just before the call to the common use case, and reconstitute itself on return from the common use case. I don't have any issue if this behaviour doesn't exist in struts as I have designed something on a previous (non-struts)project which I could carry forward, but if struts does provide support then it will save time. Thanks in advance
Hmm Brett, It's an interesting question you pose. For the most part I think Struts can do what you want. But, maybe not in the terms your using. A struts application can have dynamic flow, it's inherrirent to the system. When you create a set of forms/actions/mappings, you create pathways that can be taken in any order, given each has only basic dependancies on the caller. If your common page has some type of input on it, it would depend where you get those inputs from. When you have a page and it submits to an action class, you could then forward out to the common page, then it would submit to it's action, and with a session object possibly, it could choose the correct forward to return to. Struts in general can't pasivate a class or object. It's usally a one and done kinda thing. Given a set of form inputs, the action class performs methods, like updating the db, pulling new data, and then forwards to another page. That page usally has it's own dataaccess component.
Hi Brett, When you say that the parent screen needs to passivate itself, do you mean that the parent screen needs to preserve its view state so that upon return it can restore screen position, element selections, etc? If so, then I do not think that Struts in and of itself can help you here except indirectly because it doesn't have this functionality built into it (like .NET, for example.) However, one thing might be worth considering: 1. Struts 1.1.0 comes bundles with Java Server Faces (JSF.) I haven't read the JSF specifications in an extensive manner, but it implements an event-driven server-component model over HTTP much like Web Forms does for ASP.NET. Since the preservation of view state is a fundamental feature of Web Forms, you may want to see if JSF can do the same thing for you on the Java side of things. Hope this helps. Darryl [ July 22, 2003: Message edited by: Darryl A. J. Staflund ]
Joined: Jul 03, 2003
When you say that the parent screen needs to passivate itself, do you mean that the parent screen needs to preserve its view state so that upon return it can restore screen position, element selections, etc?
Thank you both for your help, I appreciate it. :-)