RE: General Question

2003-02-10 Thread Durham David Cntr 805CSS/SCBE
Since you are more than likely retrieving a data access object to set up the form 
object, why not just keep it hanging around in some kind of cache (application scope 
should do), and then compare it with the values that user submits to see what they 
changed.

-Dave



 -Original Message-
 From: Vinay [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 10, 2003 2: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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: General Question

2003-02-10 Thread Guptill, Josh
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:[EMAIL PROTECTED]]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: General Question

2003-02-10 Thread Jacob Hookom
You may need to elaborate; but I think you might want to double the fields
to compare the original against the editable if you want to keep the
transaction request based, otherwise you might want to use the Unit of Work
or Memento pattern in managing the transaction.  Check either Design
Patterns from GoF or Fowler's Patterns of Enterprise Application
Architecture.



| -Original Message-
| From: Vinay [mailto:[EMAIL PROTECTED]]
| Sent: Monday, February 10, 2003 2: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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: General Question

2003-02-10 Thread Vinay Chandupatla
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 [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
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:[EMAIL PROTECTED]]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: General Question

2003-02-10 Thread Robert S. Sfeir

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 [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
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:[EMAIL PROTECTED]]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


R

--
Robert S. Sfeir
Senior Java Engineer
National Institutes of Health
Center for Information Technology
Department of Enterprise Custom Applications
[EMAIL PROTECTED]



RE: General Question

2003-02-10 Thread Durham David Cntr 805CSS/SCBE
If you want to go client side, you could pass a list of fields that were modified by 
the user from the browser, as opposed to passing all the original values which you 
should already know.  Easy enough to put an onChange event handler into a field and it 
this field to list of changed fields, but what if they change it back?  Well, you can 
store the original values in an array and then onSubmit do the comparisons, set up the 
hidden changedFields input and bingo, a cheap hack  ... ahem a solution to the problem.

I'm still partial to making the comparisons at the web tier.  It's cleaner and easier 
to maintain.  Plus a little reflection magicks could go a long way towards creating 
the:

public static List gimmeDifferent(Object dao, Object form) throws 
BiffDontConMeException

method.

-Dave


 -Original Message-
 From: Robert S. Sfeir [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 10, 2003 3:12 PM
 To: Struts Users Mailing List
 Subject: Re: General Question
 
 
 
 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 [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List 
 [EMAIL PROTECTED]
  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:[EMAIL PROTECTED]]
  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: [EMAIL PROTECTED]
  For additional commands, e-mail: 
 [EMAIL PROTECTED]
 
 
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 R
 
 --
 Robert S. Sfeir
 Senior Java Engineer
 National Institutes of Health
 Center for Information Technology
 Department of Enterprise Custom Applications
 [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: General Question

2003-02-10 Thread Vinay
Actually this might be an idea i might want to go for at this moment
without needing to  storing object in the application scope.
Thanks a lot Robert , but if there are still any ideas of doing this in
other ways would  be very helpful.

Vinay




- Original Message -
From: Robert S. Sfeir [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, February 10, 2003 4:11 PM
Subject: Re: General Question



 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 [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
  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:[EMAIL PROTECTED]]
  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: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 R

 --
 Robert S. Sfeir
 Senior Java Engineer
 National Institutes of Health
 Center for Information Technology
 Department of Enterprise Custom Applications
 [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: General Question

2003-02-10 Thread Vinay
Is this in J2ee   design patterns, I think I will have a look at it.It might
have something better






- Original Message -
From: Jacob Hookom [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Monday, February 10, 2003 3:45 PM
Subject: RE: General Question


You may need to elaborate; but I think you might want to double the fields
to compare the original against the editable if you want to keep the
transaction request based, otherwise you might want to use the Unit of Work
or Memento pattern in managing the transaction.  Check either Design
Patterns from GoF or Fowler's Patterns of Enterprise Application
Architecture.



| -Original Message-
| From: Vinay [mailto:[EMAIL PROTECTED]]
| Sent: Monday, February 10, 2003 2: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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: General question regarding transport-guarantee CONFIDENTIAL, can struts help?

2002-02-27 Thread Max Cooper

Alex,

A group of developers (including me) have done some work in this area. The
basic idea is that you indicate which Struts action mappings should be
accessed securely, and then use our extensions to various Struts tags when
you link or submit forms to them. Our extended tags recognize that the
specified action should be secure, and write out an absolute URL with the
appropriate protocol (HTTP or HTTPS) and port number. Our extended tags will
also get you back to HTTP when you return to a non-secure action.

You can download the extension here:
http://struts.ditlinger.com/

-Max

- Original Message -
From: Alex Paransky [EMAIL PROTECTED]
To: 'Struts Users' [EMAIL PROTECTED]
Sent: Wednesday, February 27, 2002 10:16 PM
Subject: General question regarding transport-guarantee CONFIDENTIAL, can
struts help?


 Dear Struts Users:

 We have used the transport-guarantee CONFIDENTIAL in our web.xml to force
 certain pages to be accessed using https.  Now, these pages cannot be
 accessed using http unless we hardcode https://www.server... in our URLs.
 However, we are trying to keep our URLs relative and not absolute.

 Is there anything in STRUTS that could help us automatically switch in to
 https for those pages marked with transport-guarantee CONFIDENTIAL
 configuration?  Is this a specific server issue or do most WEB containers
 handle this in similar fashion?

 Thanks.

 -AP_
 http://www.alexparansky.com


 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]