lmao, we cant be too serious here. musachy
On Thu, Dec 11, 2008 at 5:21 PM, Dave Newton <newton.d...@yahoo.com> wrote: > What is this, some sort of Norwegian revolt? > > > --- On Thu, 12/11/08, Ronny Løvtangen <ro...@lovtangen.com> wrote: > >> From: Ronny Løvtangen <ro...@lovtangen.com> >> Subject: Re: Nested-tag support >> To: "Struts Developers List" <dev@struts.apache.org> >> Date: Thursday, December 11, 2008, 5:18 PM >> On Dec 11, 2008, at 10:42 PM, Nils-Helge Garli Hegvik wrote: >> >> >> >> >> The s:form equivalent of the nested-example above >> should be something like: >> >> >> >> <s:form name="myForm"> >> >> <s:push >> value="person.address"> >> >> <s:textfield >> name="street"/> >> >> </s:push> >> >> </s:form> >> >> >> > >> > Wouldn't <s:textfield >> name="person.address.street"> to the trick? >> >> >> Yes, but what if you want to reuse code for the form fields >> for an address and include another jsp? Then you always have >> to be nested inside person.address, you cant reuse the code >> if you are inside lets say customer.address. >> >> When it really comes in handy is when you operate with >> collections. >> Take this example from Struts 1: >> >> <nested:nest property="foo"> >> <nested:iterate property="bars"> >> <nested:text property="baz"/> >> </nested:iterate> >> </nested:nest> >> >> to do the same ting in Struts 2 you have to write: >> >> <s:push value="foo"> >> <s:iterator value="bars" >> status="status"> >> <s:textfield >> name="foo.bars[%{#status.index}].baz" /> >> </s:iterator> >> </s:push> >> >> With some changes to the Struts 2 codebase you could write >> >> <s:push value="foo"> >> <s:iterator value="bars"> >> <s:textfield name="baz" /> >> </s:iterator> >> </s:push> >> >> Andreas and I have started to get the example above working >> on Struts 2. We have some working code, but not all details >> are figured out yet. >> >> >> >> -- >> Ronny Løvtangen >> Senior Consultant - Net Professionals AS >> ro...@net-pro.no >> +47 928 21 901 >> http://net-pro.no >> http://www.linkedin.com/in/ronnylovtangen > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org > For additional commands, e-mail: dev-h...@struts.apache.org > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org For additional commands, e-mail: dev-h...@struts.apache.org