Re: best practice: how to handle two related jsp pages, with one having an ArrayList, the other input details

2004-08-17 Thread lixin chu
thanks. 

i saw some discussion earlier (search for "request
against session"). It seems that people recommond not
to use session scope forms. 
so out of these three, which is my best choice then:

- Struts workflow extension
- hidden field
- session scope form

many thanks !


--- Erik Weber <[EMAIL PROTECTED]> wrote:

> Session scoped forms are one of my favorite things
> about Struts. Seems 
> like you have a situation for them.
> 
> Make sure you keep all session-scoped form fields
> Serializable or mark 
> them as transient if they are not.
> 
> Clever implementations of ActionForm.reset can make
> memory management 
> easier. The "complication" is simply that you might
> hold on to 
> references to objects that should have been garbage
> once processing is 
> complete.
> 
> If you don't use session scoped forms, you will
> probably have to manage 
> objects using session scope one way or another,
> unless you somehow use 
> hidden variables to specify "running" objects that
> get recreated for 
> each request.
> 
> Erik
> 
> lixin chu wrote:
> 
> >solution 1. persisting data may cause some
> problems,
> >for example performance, as users may need to
> create a
> >few detail objects. I prefer to keep these objects
> in
> >View and provide a 'Done' button, which will then
> let
> >Action to do the persistence.
> >
> >Another problem is that in my Use Case, the detail
> >objects are associated to the parent object, which
> >might not be persisted at this moment (because we
> go
> >to B.JSP before saving data in A.JSP). So i can not
> >persist detail object first.
> >
> >some work needed to solve these.
> >
> >solution 2. I am not sure if Struts Workflow
> extension
> >is a good choice. It seems that it uses Session
> scope
> >for sharing data among a few JSP pages.
> >What complication will it have ?
> >
> >thanks !
> >
> >
> >
> >--- "Kataria, Satish" <[EMAIL PROTECTED]>
> wrote:
> >
> >  
> >
> >>It depends upon the architecture you want to
> follow.
> >>There are multiple
> >>ways this can be done
> >>
> >>1. Create the 2 jsp as independent jsp. Thus the
> >>list jsp jsp always
> >>fetches from DB when we bring control to that.
> >>   Clicking add on the list jsp leads to the
> >>adddetails jsp which submit
> >>data to DB.
> >>   This is the most commonly used and I have seen
> >>this being used
> >>successfully in multiple applications
> >>2. Create the 2 jsp as a wizard using struts
> session
> >>scope strategy.
> >>   This strategy has certain complications and is
> >>generally
> >>disadvantageous.
> >>
> >>Thanks,
> >>Satish Kataria
> >>
> >>  
> >>
> >>-Original Message-
> >>From: lixin chu [mailto:[EMAIL PROTECTED] 
> >>Sent: Monday, August 16, 2004 4:59 AM
> >>To: [EMAIL PROTECTED]
> >>Subject: best practice: how to handle two related
> >>jsp pages, with one
> >>having an ArrayList, the other input details
> >>
> >>
> >>Hi,
> >>How should I handle this:
> >>
> >>I have 2 jsp, in a.JSP, I need to display an
> >>ArrayList. When users click 'Add', B.JSP is
> >>displayed
> >>which allows users to fill in the details of a new
> >>object. When users click 'Done', I need to return
> >>back
> >>to A.JSP, display the newly added object, and
> >>ArrayList should be updated as well.
> >>
> >>What do I need to do to support this ?
> >>
> >>thank you very much
> >>li xin
> >>
> >>
> >>
> >>__
> >>Do you Yahoo!?
> >>New and Improved Yahoo! Mail - Send 10MB messages!
> >>http://promotions.yahoo.com/new_mail 
> >>
> >>
> >>
> >>
>
>-
> >  
> >
> >>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]
> >>
> >>
> >>
> >>
> >
> >
> >
> > 
> >__
> >Do you Yahoo!?
> >Take Yahoo! Mail with you! Get it on your mobile
> phone.
> >http://mobile.yahoo.com/maildemo 
> >
>
>-
> >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]
> 
> 




__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

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



Re: best practice: how to handle two related jsp pages, with one having an ArrayList, the other input details

2004-08-17 Thread Erik Weber
Session scoped forms are one of my favorite things about Struts. Seems 
like you have a situation for them.

Make sure you keep all session-scoped form fields Serializable or mark 
them as transient if they are not.

Clever implementations of ActionForm.reset can make memory management 
easier. The "complication" is simply that you might hold on to 
references to objects that should have been garbage once processing is 
complete.

If you don't use session scoped forms, you will probably have to manage 
objects using session scope one way or another, unless you somehow use 
hidden variables to specify "running" objects that get recreated for 
each request.

Erik
lixin chu wrote:
solution 1. persisting data may cause some problems,
for example performance, as users may need to create a
few detail objects. I prefer to keep these objects in
View and provide a 'Done' button, which will then let
Action to do the persistence.
Another problem is that in my Use Case, the detail
objects are associated to the parent object, which
might not be persisted at this moment (because we go
to B.JSP before saving data in A.JSP). So i can not
persist detail object first.
some work needed to solve these.
solution 2. I am not sure if Struts Workflow extension
is a good choice. It seems that it uses Session scope
for sharing data among a few JSP pages.
What complication will it have ?
thanks !

--- "Kataria, Satish" <[EMAIL PROTECTED]> wrote:
 

It depends upon the architecture you want to follow.
There are multiple
ways this can be done
1. Create the 2 jsp as independent jsp. Thus the
list jsp jsp always
fetches from DB when we bring control to that.
  Clicking add on the list jsp leads to the
adddetails jsp which submit
data to DB.
  This is the most commonly used and I have seen
this being used
successfully in multiple applications
2. Create the 2 jsp as a wizard using struts session
scope strategy.
  This strategy has certain complications and is
generally
disadvantageous.
Thanks,
Satish Kataria
 

-Original Message-
From: lixin chu [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 16, 2004 4:59 AM
To: [EMAIL PROTECTED]
Subject: best practice: how to handle two related
jsp pages, with one
having an ArrayList, the other input details

Hi,
How should I handle this:
I have 2 jsp, in a.JSP, I need to display an
ArrayList. When users click 'Add', B.JSP is
displayed
which allows users to fill in the details of a new
object. When users click 'Done', I need to return
back
to A.JSP, display the newly added object, and
ArrayList should be updated as well.
What do I need to do to support this ?
thank you very much
li xin
		
__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

   

-
 

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]
   


		
__
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo 

-
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: best practice: how to handle two related jsp pages, with one having an ArrayList, the other input details

2004-08-17 Thread lixin chu
solution 1. persisting data may cause some problems,
for example performance, as users may need to create a
few detail objects. I prefer to keep these objects in
View and provide a 'Done' button, which will then let
Action to do the persistence.

Another problem is that in my Use Case, the detail
objects are associated to the parent object, which
might not be persisted at this moment (because we go
to B.JSP before saving data in A.JSP). So i can not
persist detail object first.

some work needed to solve these.

solution 2. I am not sure if Struts Workflow extension
is a good choice. It seems that it uses Session scope
for sharing data among a few JSP pages.
What complication will it have ?

thanks !



--- "Kataria, Satish" <[EMAIL PROTECTED]> wrote:

> It depends upon the architecture you want to follow.
> There are multiple
> ways this can be done
> 
> 1. Create the 2 jsp as independent jsp. Thus the
> list jsp jsp always
> fetches from DB when we bring control to that.
>Clicking add on the list jsp leads to the
> adddetails jsp which submit
> data to DB.
>This is the most commonly used and I have seen
> this being used
> successfully in multiple applications
> 2. Create the 2 jsp as a wizard using struts session
> scope strategy.
>This strategy has certain complications and is
> generally
> disadvantageous.
> 
> Thanks,
> Satish Kataria
> 
>   
> 
> -Original Message-
> From: lixin chu [mailto:[EMAIL PROTECTED] 
> Sent: Monday, August 16, 2004 4:59 AM
> To: [EMAIL PROTECTED]
> Subject: best practice: how to handle two related
> jsp pages, with one
> having an ArrayList, the other input details
> 
> 
> Hi,
> How should I handle this:
> 
> I have 2 jsp, in a.JSP, I need to display an
> ArrayList. When users click 'Add', B.JSP is
> displayed
> which allows users to fill in the details of a new
> object. When users click 'Done', I need to return
> back
> to A.JSP, display the newly added object, and
> ArrayList should be updated as well.
> 
> What do I need to do to support this ?
> 
> thank you very much
> li xin
> 
> 
>   
> __
> Do you Yahoo!?
> New and Improved Yahoo! Mail - Send 10MB messages!
> http://promotions.yahoo.com/new_mail 
> 
>
-
> 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]
> 
> 




__
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo 

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



RE: best practice: how to handle two related jsp pages, with one having an ArrayList, the other input details

2004-08-15 Thread Kataria, Satish
It depends upon the architecture you want to follow. There are multiple
ways this can be done

1. Create the 2 jsp as independent jsp. Thus the list jsp jsp always
fetches from DB when we bring control to that.
   Clicking add on the list jsp leads to the adddetails jsp which submit
data to DB.
   This is the most commonly used and I have seen this being used
successfully in multiple applications
2. Create the 2 jsp as a wizard using struts session scope strategy.
   This strategy has certain complications and is generally
disadvantageous.

Thanks,
Satish Kataria

  

-Original Message-
From: lixin chu [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 16, 2004 4:59 AM
To: [EMAIL PROTECTED]
Subject: best practice: how to handle two related jsp pages, with one
having an ArrayList, the other input details


Hi,
How should I handle this:

I have 2 jsp, in a.JSP, I need to display an
ArrayList. When users click 'Add', B.JSP is displayed
which allows users to fill in the details of a new
object. When users click 'Done', I need to return back
to A.JSP, display the newly added object, and
ArrayList should be updated as well.

What do I need to do to support this ?

thank you very much
li xin



__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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