Ups, wrong template url. This one is the correct one: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/app1/FormInjectorDemo.tml?view=markup
On Tue, Apr 15, 2008 at 4:20 PM, Igor Drobiazko <[EMAIL PROTECTED]> wrote: > Have a look at the FormInjector component. This component is what you > need. > http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry/corelib/components/FormInjector.html > > An example can be found here: > > http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/FormInjectorDemo.java?view=markup > > http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/app1/FormFragmentDemo.tml?view=markup > > > > On Tue, Apr 15, 2008 at 3:51 PM, Michael Dukaczewski < > [EMAIL PROTECTED]> wrote: > > > I am using Tapestry 5.0.11 and have a problem with a dynamic list of > > strings in a form. What I am trying, is the following: > > > > In the Page.java: > > > > @Persist > > private List<String> items; > > > > @Property > > private String item; > > > > public List<String> getItems() { > > if (items == null) { > > items = new LinkedList<String>(); > > } > > return items; > > } > > > > public void onSelectedFromAdd() { > > getItems().add(""); > > } > > > > And in the Page.tml: > > > > <t:form> > > <div t:type="loop" t:source="items" t:value="item"> > > <t:textfield value="item" /> > > </div> > > <div><t:submit t:id="add" value="more"/></div> > > <div><t:submit t:id="save" value="save"/></div> > > </t:form> > > > > > > I have a list of values, the user has to enter. The number of values, > > that have to be typed in, is dynamic, so the user has to extend the form. > > The add button works, but the values are not saved. Can someone tell me, > > that I am doing wrong? > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Best regards, > > Igor Drobiazko -- Best regards, Igor Drobiazko