struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert S. Sfeir" <rob...@sfeir.net>
Subject Re: General Question
Date Mon, 10 Feb 2003 21:11:47 GMT

Well first you might find that updating all the fields is easier, but 
still if you want to do it your way, you have to have something to 
compare the old value to the new one, and in that case you use a hidden 
field.  So you'd have something like:

<input type="text" name="field1">
<input type="hidden" name="oldField1">

When the user hits submit you'll have to check to see if the values are 
the same, if they are ignore and don't update otherwise update.

You see you have to loop over all the fields anyway, it's a form submit 
thing, you can't tell it to submit a form partially.

R

On Monday, Feb 10, 2003, at 15:46 US/Eastern, Vinay Chandupatla wrote:

> That is exactly what I am trying to avoid. That is a  the real pain I 
> don't want to update all the fields , I just want to update that 
> particular value based upon it's key. In this case the database in 
> question is the a server socket connection which cannot take lengthy 
> query strings( i was just exemplifying with a normal database, ), and 
> I thought it is not efficient overriding the values which need not be 
> overridden.
>
> Infact I was thinking in the lines of what dave has suggested but even 
> that will still have a lot of comparisions. Has anybody encountered 
> these kind of situations with user editing lot of transactions and 
> posting them back to database. If so how did you deal with them
>
> Thanks Dave and Guptill for your replies,
>
> Vinay
>
>
> ---------- Original Message ----------------------------------
> From: "Guptill, Josh" <Josh.Guptill@brightpoint.com>
> Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> Date: Mon, 10 Feb 2003 15:42:14 -0500
>
>> No, just update your database table with all the fields that come 
>> back on
>> the form.  If a field has changed, that value will be updated.  
>> Otherwise,
>> the same value will be written to the table and you will be no worse 
>> off.
>>
>> Unless this is exactly what you are trying to avoid?
>>
>> -----Original Message-----
>> From: Vinay [mailto:vinay@mdp.net]
>> Sent: Monday, February 10, 2003 3:27 PM
>> To: Struts Users Mailing List
>> Subject: General Question
>>
>>
>> This is a very general question and not specifically related to 
>> struts or
>> tag libraries, may be naive,thought somebody could help me off the 
>> list on
>> the list.
>>
>> I have this very big form with list of 100's of transactions pulled 
>> from the
>> database base thru a select statement or a similar one.
>>
>> And this form has a lot of textfields where the user can edit the 
>> fields and
>> send it back to the database for updations.
>>
>> I need to get only those values which are being edited by the user for
>> updations in Action Class. If this looks vague , i can elaborate.
>>
>> Do i have to compare or check if user has edited.
>>
>> The solution might be very trivial , but couldn't get any idea.
>>
>> Thank you ,
>>
>> Help appreciated,
>>
>>
>> Vinay.
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
R

--
Robert S. Sfeir
Senior Java Engineer
National Institutes of Health
Center for Information Technology
Department of Enterprise Custom Applications
sfeir@mail.nih.gov

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message