RE: Order Detail page with editable line items

2003-05-30 Thread Brandon Goodin
ListUtils.lazyList of the commons-collections comes in handy here. Mix in a
good dose of jstl and/or nested tags and it should suffice.

Brandon Goodin

-Original Message-
From: Greg Blomqusit [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 29, 2003 10:20 AM
To: [EMAIL PROTECTED]
Subject: Order Detail page with editable line items


I have a problem that I'm sure is quite common.  However, I have not seen
any decent examples
of how this might be implemented using Struts, so any suggestions would be
greatly appreciated.

The problem is this:  I have an order detail page that has a list of line
items with editable data
inside each line item.  The user is allowed to select which product they're
ordering and what quantity
of that product per line item.

I can figure out how to create an ActionForm bean that is able to convey the
values to the JSP
using a collection of line item beans inside the ActionForm.  And, I can
figure out how to code
the JSP to output the values into the form elements using the
logic:iterate tag.

However, what I'm having trouble with is submitting the values back to the
Action.  How can
Struts repopulate the collection inside the ActionForm?  Or, if I should not
be using a collection
to represent the line items, how else should I do it?  In the case of not
using a collection to
represent the line items, how do I get Struts taglib to populate the form
elements in the JSP?

I've attached a gif file that depicts the prototype of the screen I'm
talking about, for those of you
who are visual thinkers.

Any help is appreciated!

Thanks!

-
 Greg Blomquist




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



RE: Order Detail page with editable line items

2003-05-30 Thread Mark Galbreath
I wrote a very similar module last summer and still have the source.  It may
help, if you want it.

Mark

-Original Message-
From: Greg Blomqusit [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 29, 2003 12:20 PM
To: [EMAIL PROTECTED]
Subject: Order Detail page with editable line items


I have a problem that I'm sure is quite common.  However, I have not seen
any decent examples of how this might be implemented using Struts, so any
suggestions would be greatly appreciated.

The problem is this:  I have an order detail page that has a list of line
items with editable data inside each line item.  The user is allowed to
select which product they're ordering and what quantity of that product per
line item.

I can figure out how to create an ActionForm bean that is able to convey the
values to the JSP using a collection of line item beans inside the
ActionForm.  And, I can figure out how to code the JSP to output the values
into the form elements using the logic:iterate tag.

However, what I'm having trouble with is submitting the values back to the
Action.  How can Struts repopulate the collection inside the ActionForm?
Or, if I should not be using a collection to represent the line items, how
else should I do it?  In the case of not using a collection to represent the
line items, how do I get Struts taglib to populate the form elements in the
JSP?

I've attached a gif file that depicts the prototype of the screen I'm
talking about, for those of you who are visual thinkers.

Any help is appreciated!

Thanks!

-
 Greg Blomquist





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



Re: Order Detail page with editable line items

2003-05-30 Thread Hunter Hillegas
This was exactly my solution to a similar problem and it works great.

 From: Brandon Goodin [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 Date: Thu, 29 May 2003 10:29:08 -0600
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: RE: Order Detail page with editable line items
 
 ListUtils.lazyList of the commons-collections comes in handy here. Mix in a
 good dose of jstl and/or nested tags and it should suffice.


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



RE: Order Detail page with editable line items

2003-05-30 Thread Mark Galbreath
Numerous people have requested this, so I'll just send it to the list and
hope it passes the censors.  :-)

For reference, see the view cart page at http://shop.t-mobile.com.
Attached is the JSP.  I'm looking for the Action class now

Mark

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

Re: Order Detail page with editable line items

2003-05-30 Thread Greg Blomqusit
Can you elaborate?  Or, point me to a decent example?
Thanks Brandon (and Hunter).

-
 Greg


Brandon Goodin [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 ListUtils.lazyList of the commons-collections comes in handy here. Mix in
a
 good dose of jstl and/or nested tags and it should suffice.

 Brandon Goodin

 -Original Message-
 From: Greg Blomqusit [mailto:[EMAIL PROTECTED]
 Sent: Thursday, May 29, 2003 10:20 AM
 To: [EMAIL PROTECTED]
 Subject: Order Detail page with editable line items


 I have a problem that I'm sure is quite common.  However, I have not seen
 any decent examples
 of how this might be implemented using Struts, so any suggestions would be
 greatly appreciated.

 The problem is this:  I have an order detail page that has a list of line
 items with editable data
 inside each line item.  The user is allowed to select which product
they're
 ordering and what quantity
 of that product per line item.

 I can figure out how to create an ActionForm bean that is able to convey
the
 values to the JSP
 using a collection of line item beans inside the ActionForm.  And, I can
 figure out how to code
 the JSP to output the values into the form elements using the
 logic:iterate tag.

 However, what I'm having trouble with is submitting the values back to the
 Action.  How can
 Struts repopulate the collection inside the ActionForm?  Or, if I should
not
 be using a collection
 to represent the line items, how else should I do it?  In the case of not
 using a collection to
 represent the line items, how do I get Struts taglib to populate the form
 elements in the JSP?

 I've attached a gif file that depicts the prototype of the screen I'm
 talking about, for those of you
 who are visual thinkers.

 Any help is appreciated!

 Thanks!

 -
  Greg Blomquist




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



Re: Order Detail page with editable line items

2003-05-30 Thread Vic Cekvenich




Multi Row updates, nested or not are used often.
 Here is an working example:
 http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/basicportal/bP/WEB-INF/portlets/cms/ContentAprvMR.jsp
 
 You can check the nested multi row bean in source as well.
 .V


Greg Blomqusit wrote:

  I have a problem that I'm sure is quite common.  However, I have not seen
any decent examples
of how this might be implemented using Struts, so any suggestions would be
greatly appreciated.

The problem is this:  I have an order detail page that has a list of line
items with editable data
inside each line item.  The user is allowed to select which product they're
ordering and what quantity
of that product per line item.

I can figure out how to create an ActionForm bean that is able to convey the
values to the JSP
using a collection of line item beans inside the ActionForm.  And, I can
figure out how to code
the JSP to output the values into the form elements using the
logic:iterate tag.

However, what I'm having trouble with is submitting the values back to the
Action.  How can
Struts repopulate the collection inside the ActionForm?  Or, if I should not
be using a collection
to represent the line items, how else should I do it?  In the case of not
using a collection to
represent the line items, how do I get Struts taglib to populate the form
elements in the JSP?

I've attached a gif file that depicts the prototype of the screen I'm
talking about, for those of you
who are visual thinkers.

Any help is appreciated!

Thanks!

-
 Greg Blomquist


  
  
  


-- 
Vic Cekvenich,
Struts Instructor,
1-800-917-JAVA

Advanced a href =""Struts Training/a and project recovery in North East. 
Open Source a href =""Content Management/a  basicPortal sofware
Best practicea href =""Struts Support/a v.1.1 helper ScafflodingXPress




image/gif