Try BeanUtils.copyProperties(FormObject, DTO) maybe?

-----Original Message-----
From: Sudhakar G [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 20, 2004 10:04 PM
To: Struts Users Mailing List
Subject: RE: Add/Modify functionality in same jsp


Hi 
Can anyone help me in my modify jsp page how to populate the default
values from the Data Transfer Object.Is it something to do with index
properties in the jsp????


Regards
Sudhakar

-----Original Message-----
From: Sudhakar G 
Sent: Tuesday, January 20, 2004 7:09 PM
To: Struts Users Mailing List
Subject: RE: Add/Modify functionality in same jsp


Hi Nicholas,

Can you provide the sample code which will make me to understand how to
initialize the form thru action class.I know when the form getting
submitted it uses a Actionform to set the form fields data, so that we
can access form fields data from Actionform in Action class.


Sudhakar

-----Original Message-----
From: Nicholas L Mohler [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 20, 2004 6:25 PM
To: Struts Users Mailing List
Subject: Re: Add/Modify functionality in same jsp







Hi Sudhakar,

Your JSP should populate the form fields in the same way for both add
and modify actions.  Specifically, your action class should initialize
the form for the jsp.  When the page is rendered, it will be populated
the way that you want.

Nick



|---------+---------------------------->
|         |           "Sudhakar G"     |
|         |           <[EMAIL PROTECTED]|
|         |           ree.com>         |
|         |                            |
|         |           01/20/2004 06:55 |
|         |           AM               |
|         |           Please respond to|
|         |           "Struts Users    |
|         |           Mailing List"    |
|         |                            |
|---------+---------------------------->
 
>-----------------------------------------------------------------------
>-----
--------------------------------------------------|
  |
|
  |       To:       <[EMAIL PROTECTED]>
|
  |       cc:
|
  |       Subject:  Add/Modify functionality in same jsp
|
 
>-----------------------------------------------------------------------
>-----
--------------------------------------------------|




Hi All,
        I want to implement add/modify functionality in same jsp using
struts tag.I am having a hidden variable which says the current action
is add or modify. Can any one tell how the jsp will implement the modify
functionality?.My idea is put if..else conditions for each form field
and populate data in case of modify using the struts tag and don't
populate data for add functionality..If some one can provide me a sample
jsp thru that I will have the understanding before implementing the
functionality.

Thanks & Regards
Sudhakar



DISCLAIMER:
This message (including attachment if any) is confidential and may be
privileged. Before opening attachments please check them for viruses and
defects. MindTree Consulting Private Limited (MindTree) will not be
responsible for any viruses or defects or any forwarded attachments
emanating either from within MindTree or outside. If you have received
this message by mistake please notify the sender by return  e-mail and
delete this message from your system. Any unauthorized use or
dissemination of this message in whole or in part is strictly
prohibited.  Please note that e-mails are susceptible to change and
MindTree shall not be liable for any improper, untimely or incomplete
transmission.

---------------------------------------------------------------------
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]



DISCLAIMER:
This message (including attachment if any) is confidential and may be
privileged. Before opening attachments please check them for viruses and
defects. MindTree Consulting Private Limited (MindTree) will not be
responsible for any viruses or defects or any forwarded attachments
emanating either from within MindTree or outside. If you have received
this message by mistake please notify the sender by return  e-mail and
delete this message from your system. Any unauthorized use or
dissemination of this message in whole or in part is strictly
prohibited.  Please note that e-mails are susceptible to change and
MindTree shall not be liable for any improper, untimely or incomplete
transmission.

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



DISCLAIMER:
This message (including attachment if any) is confidential and may be
privileged. Before opening attachments please check them for viruses and
defects. MindTree Consulting Private Limited (MindTree) will not be
responsible for any viruses or defects or any forwarded attachments
emanating either from within MindTree or outside. If you have received
this message by mistake please notify the sender by return  e-mail and
delete this message from your system. Any unauthorized use or
dissemination of this message in whole or in part is strictly
prohibited.  Please note that e-mails are susceptible to change and
MindTree shall not be liable for any improper, untimely or incomplete
transmission.

---------------------------------------------------------------------
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]

Reply via email to