Re: [Actionframework-users] Passing objects from request to another...
Status: Inactive
Brought to you by:
ptoman
From: Mandip S. S. <ma...@su...> - 2002-07-23 16:10:05
|
Hi Petr Thanks for the quick response. -------------------------------------------------------------------------- Summary: 1) you need to transfer an object across calls - this can be achieved by: a) storing it in a session component (like your ObjectStore) b) putting it into the session directly (by 'scope' attribute) c) serializing it in the request/response (clumsy or even impossible) d) ? AS can implement 1b) easily (by ParameterRetriever), the question is: 2) how to remove our object from the session: a) let it expire with the session (default behaviour) b) remove it from the session when the <in/output-variable> scope changes c) programatically: ctx.get("REQUEST").getSession().removeValue("id") d) ? I think that "id management" should not be done by AS. If you need to pass both object and its id, you can simply put them as two $variables into the context/session (or include the id with its object). -------------------------------------------------------------------------- If this is the case (with "id management") then I think perhaps it may not be worth introducing a scope attribute for <in/output-variable>'s. We already have the functionality for transfering objects across calls, using 1a (which is simple and works very well) and perhaps introducing 1b would be overkill/unnecessary. "You can use <invoke> element to avoid URL redirecting" Oops I think I gave you the wrong impression here, we love URL redirecting because it means that a user cannot perform a Ctrl+Shift+Reload and possibly resubmit invalid values on a template! :-) In summation I think the framework is pretty much where we would like it to be apart from the "different type handlers for different methods with the same input class" and the "loading values upon a new session" that David talked about. It would be excellent if you could find the time to complete these requests. In the mean time thanks for developing such a great tool!!!! :-) Regards Mandip |