Wow, that's great. Thinking in Struts2 concept means to use interceptors, action abilities, ognl and ui-tags. I didn't want to develop my own solution. As I can see, scope interceptor exactly what I need. Thank you.
Miguel-55 wrote: > > You could use the scope interceptor to store your object in the > session or application context, and have injected directly with a > getter/setter in the configured actions that use the object, without > having to write code to push/pop from the session. > > http://struts.apache.org/2.1.2/docs/scope-interceptor.html > The scope interceptor also exists and works identically in the 2.0.x > family > > Si quieres ser más positivo, pierde un electrón > Miguel Ruiz Velasco S. > > > On Fri, Jul 18, 2008 at 10:45 AM, Owen Berry <[EMAIL PROTECTED]> wrote: >> Another option is to store it as a temporary record in the database >> (assuming you're using one). It could either be in a temporary table, >> or marked as an incomplete record in some way. An advantage of this >> approach is that the record is not lost if the server is restarted >> while the user is busy (unless you're storing session information in >> the db anyway), or if their browser crashes. You'll have to have some >> way of notifying them of these records in case they're left >> incomplete. >> >> On Fri, Jul 18, 2008 at 8:52 AM, Gabriel Belingueres >> <[EMAIL PROTECTED]> wrote: >>> 1 and 2: You could choose store your objects in session scope. >>> Even it may be the only way to do it, because you say that there are >>> Law fields that the user can't modify, which it discards the option of >>> rewriting those fields as hidden fields in your form (for security >>> reasons) >>> >>> 2008/7/18 holod <[EMAIL PROTECTED]>: >>>> >>>> Please, help me with suggestion. >>>> My logic is: >>>> >>>> 1.PrepareLawAction is invoked. >>>> This action gets Law object from DB (if action received lawId parameter >>>> ) or >>>> it prepares template Law object (just automatically fills some Law >>>> fields >>>> which user can't modify). >>>> >>>> 2.Action sends user to processlaw.jsp >>>> Here user inputs other fields of Law object or modifies them. All >>>> fields >>>> like <s:textfield/>, <s:select/> and others are inside <s:form/> >>>> >>>> Now, problems which I can't solve: >>>> 1.PrepareLawAction already made the Law instance. This object can be >>>> accessed from processlaw.jsp, but the next action (StoreLawAction) >>>> after >>>> processlaw.jsp will not "see" my Law object. Is it good practice to >>>> store >>>> Law object in session (PrepareLawAction will do it) and then retrieve >>>> it in >>>> StoreLawAction? >>>> >>>> 2. When user is on the processlaw.jsp he can go to other jsp page to >>>> specify >>>> special complicated input. I want to allow user to go to this page, but >>>> I >>>> don't want to loose user input on processlaw.jsp. How can I do it? >>>> >>>> Please, see my drawing: >>>> >>>> >>>> >>>> http://www.nabble.com/file/p18523944/parliament%2Bsheme.jpg >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/How-can-I-store-temporary-data-during-user-input-procedure--tp18523944p18523944.html >>>> Sent from the Struts - User mailing list archive at Nabble.com. >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/How-can-I-store-temporary-data-during-user-input-procedure--tp18523944p18541985.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

