Re: List pages with editable data (newbie)
Martin, I found this page searching elsewhere, since I found no help on this message board: http://www.manning.com/ao/readforum.html?forum=siaao&readthread=322 which references: http://jguru.com/faq/view.jsp?EID=915898 It kind of outlines how you might have a list page with editable data. I think it's kind of hokey, however I haven't tried it yet. It might work just fine. I hope that helps. --- Greg "Martin Kuypers" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Greg do you have already a solution > If yes can you share it with me ?? > > Thanks > - Original Message - > From: "Greg Blomqusit" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, May 06, 2003 3:30 AM > Subject: List pages with editable data (newbie) > > > > Suppose I have a "list page" that lists the users of a system. And on > that > > page I want to allow > > a logged in user (admin level) to change the "enabled" property of every > > user in one swoop. > > > > How do I do this using struts? It seems like I would create an Action > Form > > Bean that contains > > a collection of User Beans where one User Bean represents one row of data > > (one user). I've > > managed to populate a screen with a list of data, but how do I submit back > > to the Action? > > Or better yet, how does the framework know how to populate that collection > > in the Action Form > > Bean? > > > > When I try this now, I get a NullPointerException before control actually > > reaches the Action class. > > > > I'm doing the following in the JSP: > > > > ... > > > > ... > > > > > > I can see that the reason I'm probably getting the NullPointerException is > > that there is no bean actually > > called "user" when I submit. However, I can't see another way of doing > this > > in the iterate tag. > > > > If there is some documentation or samples that describe this, please let > me > > know and I'll look there. > > > > Thanks in advance! > > > > --- > > Greg Blomquist > > > > > > > > > > - > > 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]
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 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 begin 666 orderPrototype.gif M1TE&.#=A+ /C!/T``.V5E?;[___=W?___P`` M M M M M M M M M M M M M M M M`"'Y! ``+ `L`^,$``C_`"$('$BPH, M"!,J7,BPH<.'$"-*G$BQHL6+-JW,BQH\>/($.*'$FRI,F3*%.J7,FRIV,FSI\^?0(,*'4JTZ $`!(TJ7O8,.*'4NVK-FS4 5R///J-;@6KM^_ [EMAIL PROTECTED]&&R/'D!$2/DR9\N#*F"U'WLRYL^?/H$].SDSZ[>72 MJ$V'7LVZM>O7G4>G]BL0\.G99&[EMAIL PROTECTED](.[E"VVH%?=?Y&'5:YZ(/&O M!BLS/PZA,&_AV+-KW\X]X7.PNJ@?ET=Z*"":,TGX8045CA7?=1EF-]] M_#7(88?(&4A>>V&A5U:((P:8HH<[EMAIL PROTECTED]:-9U%M9HXXTXDH0ABRQNR&"+ MQJ%H'X]MF9C;?=']"*.+'B:(I( SYBCEE%16*=&.,B[9'X-:;%6*I)(=:HLDDD4!^&*68; E9YHIFFHEGF' 6:NBA M\MS)>:"[EMAIL PROTECTED]>6*C,X):8H0EL4FHJ"&*NIF6,)%(FY&HG8J [EMAIL PROTECTED]::M6UFJLO/;JZTREUIK9K<*B^NNQR"8[7+',>D5L MLZ7MJNRTU%8K$0#89JOMMMQVZ^VWX(8K+K8$C6ONN>BFNZVU[+;K[KOPQBOO MO/36:^^]^.:K[[[\]NOOOP`'+/# !!=L\,$()[EMAIL PROTECTED],`T0L\<045VSQ MQ1AGK/'&''?L\<<@ARSRR"27;/+)**>L\LHLM^SRRS#'+//,[EMAIL PROTECTED]:SS MSCSW[///0 M]MILMTUU0F['+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5+;^M9#,[6E M4:UJ;[%Z8Y^N':R!+;SCB8_8(,2ULI=M,UU7FM<)`,"FI9V 3A/[(!AC8 AO M9\)NR^_%XG,?"N,'P!(66X7,3K>Z-^;L2V[EMAIL PROTECTED];9'1L'U%;)7WMLN><7]_>&-NWSC!J\VPN-=;9'/&F0.C_B_&RCK M8H=:XK5^N= U3FEN/[EMAIL PROTECTED]:TU[W4$[UG[?OXE-O^M6I/O2N MQ[GHVSIZJJ/MZYHO_SV)[EMAIL PROTECTED]'L^Y[8A54CNGENJ]-OK5N_[U0=.;FV=/>ZID$P(%R+WN=\_[WOO^ M]\ /OO"'3_SB&W_WN#^^\I?/_.;K/OG.C[[TIT]]X$._^MC/OO:WO_SK<__[ MW/<^^,^//_'[EMAIL PROTECTED] MAW\`.'[J9T@".( (&'P'F(#:MX ,^(#(!X$2V'\..('55X$6V'P8F('==Z![ M'/B!!;"!(%A\(CB"`6B"*+A])9B"P[>"+-A[+OB"R.>!,IB ,5B#(8B##'B# M.FB"/-B#/_B"0$3 [EMAIL PROTECTED]>%S$>%\6>% M'UB$HY-_6$B"6GB!X2> 7_B%[Q>&([EMAIL PROTECTED]>&&GA]:&A]`:B&OL>&5^B&,IB$ M92'B[A'BWTHB[[8BSF(?):HB[\HAICXBL58 MC,C(C(@XC+Q7BZAHC+L(BY&XAI
Re: Order Detail page with editable line items
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 > 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]