This sounds like you're objects are getting restored but you are not putting them back in the list.
Create getter/setter methods for your "value" object and set a breakpoint in the setter. You should see that setter get called for each item in that list. The PopupItem should also have it's "value" setter called, try setting a breakpoint there to see if the new value is stored. Josh On Tue, Aug 30, 2011 at 5:01 AM, bhorvat <horvat.z.bo...@gmail.com> wrote: > Hi all, > > I have one application where I have a bunch of forms inside a popup. The > best thing to would be to create a component out of those forms and then to > include that component all over the website. The problem is that I can > change the values in the form elements that way. > > So here is what I have so far. > > On lets say page Index I call the component > > <t:form t:id="formForgottenPassword"> > <t:Popup t:source="popupItems" /> > </t:form> > > This component accepts a list of Items that it needs to create and is > surrounded by the form element in order for Index page to handle the form > submission. > > In the Index page I have created this list and populated it. > > @Property > @Persist > private String usernameLostPassword; > @Property > @Persist > private PopupItem itemUser; > @Property > @Persist > private List<PopupItem> popupItems; > > @SetupRender > void initialize() { > usernameLostPassword = "test"; > popupItems = new LinkedList<PopupItem>(); > itemUser = new PopupItem("Forgotten password", > usernameLostPassword); > popupItems.add(itemUser); > } > > Once I submit this form it is handled by the Index page but the value that I > have enter in the text field is not change. It remains "test". In other > words usernameLostPassword, itemUser and popupItems all hold the original > value (test) and not the entered. > > The code for the component is simple at the moment > > Popup.tml > > <table border="0" width="100%" cellpadding="0" cellspacing="5"> > <t:loop t:source="source" t:value="value"> > <tr> > <td> > <div class="loginBar"> > <div class="barTextPopup > textSmall">${value.title}</div> > </div> > </td> > </tr> > <tr> > <td> > <input t:value="value.value" t:type="textfield" > type="text" class="fieldLogin" /> > </td> > </tr> > </t:loop> > # > *Submit* > > </table> > > Popup.java > > public class Popup { > > @Parameter(required = true) > @Property > private List<PopupItem> source; > @Property > private PopupItem value; > } > > So at the moment I have this component that is creating as many textfield > as I added items into the list with the values that I assign them but it is > not working in reverse. The input text is not received back to the fields > that I assigned them to. > > What am I missing? > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Form-elements-inside-a-component-tp4749774p4749774.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org