SanJ,

This is where you have to modify your code :-) You'll have to take
into account which tab was saved, and only save that tab's data. As
you said yourself, you can't just take the entire ActionForm data.

public void execute(...) {
  if (tab being saved is 'A') {
    saveTabA();
  } else if (tab being saved is 'B') {
    saveTabB();
  }
}

Paul

On Tue, Oct 6, 2009 at 7:28 AM, SanJ.SANJAY <girish...@gmail.com> wrote:
>
> Pawel,
>
>        You are right, but, the data that I have in tab 1 contains lot of
> fields and is kind of different set of data. So if I just change the Tab 2
> data and click save, I am unnecessarily re-saving the data of tab1 (which
> means firing big queries to Database) when all I need is just save set of
> data in Tab2. This could be a performance hit.
>
> Thanks
>
>
>
>
> Paweł Wielgus wrote:
>>
>> Hi all,
>> consider a story like this:
>> lets say i'm the user, i'm loading this page,
>> then i select tab1 and look at the data,
>> then i select tab2 and change the data tab2_d1,
>> then i select tab1 and change the data tab1_d1,
>> then again select tab2 and change data tab2_d1 to it's original value,
>> and i click "save".
>> Now what would You like to save?
>> In general, what is the benefit of savin only partial data?
>> I claim there is none or very little,
>> just look how much work You have to do
>> to make it hapen versus normal way.
>>
>> Best greetings,
>> Paweł Wielgus.
>>
>>
>> 2009/10/6 Paul Benedict <pbened...@apache.org>:
>>> It could be a character that represents which tab is selected. A, B, C,
>>> etc.
>>>
>>> On Mon, Oct 5, 2009 at 9:40 PM, SanJ.SANJAY <girish...@gmail.com> wrote:
>>>>
>>>> Paul,
>>>>
>>>> I will try that..hidden field will be a java variable. So it should be
>>>> like
>>>> a boolean which toggles every user select Tab?
>>>>
>>>> Thanks ..
>>>>
>>>>
>>>>
>>>> Paul Benedict-2 wrote:
>>>>>
>>>>> SanJ,
>>>>>
>>>>> When a user selects the tab, modify a hidden form field that indicates
>>>>> the tab selected. Do you know javascript? That's what you would use.
>>>>>
>>>>> Paul
>>>>>
>>>>> On Mon, Oct 5, 2009 at 9:15 PM, SanJ.SANJAY <girish...@gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> Thanks Paul,
>>>>>>
>>>>>>                 I thought about that also but selecting a tab isn't
>>>>>> always
>>>>>> mean that I change the data inside that tab.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Paul Benedict-2 wrote:
>>>>>>>
>>>>>>> SanJ,
>>>>>>>
>>>>>>> Can you track which tab the user selected? Perhaps you can set a
>>>>>>> javascript variable when one is selected. The only down side here is
>>>>>>> that you'll have to hardcode which fields belong to which tab. Once
>>>>>>> you do that, you can do what you want.
>>>>>>>
>>>>>>> Paul
>>>>>>>
>>>>>>> On Mon, Oct 5, 2009 at 7:42 PM, SanJ.SANJAY <girish...@gmail.com>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> I am using struts 1. I have Adobe SPRY tabs in my JSP.
>>>>>>>>
>>>>>>>> There are two separate set of fields/ data in each tab. So suppose
>>>>>>>> someone
>>>>>>>> changes fields in Tab 2 only and save the JSP, I do not want to save
>>>>>>>> the
>>>>>>>> tab
>>>>>>>> 1 fields also because those fields are not changed.
>>>>>>>>
>>>>>>>> I was wondering if there is any way I can distinguish that only TAB
>>>>>>>> 2
>>>>>>>> fields
>>>>>>>> are changed so that I can process only those fields in action
>>>>>>>> instead
>>>>>>>> of
>>>>>>>> processing all the JSP form fields.
>>>>>>>>
>>>>>>>> I would appreciate some inputs!
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> View this message in context:
>>>>>>>> http://www.nabble.com/Struts-1-form-data-change-tp25758644p25758644.html
>>>>>>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>>>>>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>>>>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://www.nabble.com/Struts-1-form-data-change-tp25758644p25761964.html
>>>>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>>>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Struts-1-form-data-change-tp25758644p25762087.html
>>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Struts-1-form-data-change-tp25758644p25767781.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to