Hi Tobi ; I cant see any Validation code..
Josh. On Tue, Jul 17, 2012 at 12:01 PM, Tobias Knierim < [email protected]> wrote: > Hi Josh, > > I just created a little example of how my application is working: > I want to compare value2 from Entry1 with value1 from Entry2 and so on. > > Any ideas? > > > Form<Values> form = new Form<Values>("form"); > add(form); > > RefreshingView<Entry> refreshingView = new > RefreshingView<Entry>("list", values) { > > @Override > protected Iterator<IModel<Entry>> getItemModels() { > List<Entry> entryList = > values.getObject().getEntryList(); > > ModelIteratorAdapter<Entry> mia = new > ModelIteratorAdapter<Entry>(entryList.iterator()) { > > @Override > protected IModel<Entry> > model(Entry object) { > return new > CompoundPropertyModel<Entry>(object); > } > }; > return mia; > } > > @Override > protected void populateItem(Item<Entry> item) { > IModel<Entry> model = item.getModel(); > > item.add(new TextField<String>("textOne", > new > PropertyModel<String>(model, "value1"))); > item.add(new TextField<String>("textTwo", > new > PropertyModel<String>(model, "value2"))); > } > > }; > > form.add(refreshingView); > > Tobi > > > 2012/7/17 Josh Kamau <[email protected]>: > > Tobi ; > > > > May be you can paste some code to show how you are constructing the > > forms... > > > > I believe if you just add the validators to the components and then > submit > > the forms, it just works.. > > > > Josh. > > > > On Tue, Jul 17, 2012 at 10:22 AM, Tobias Knierim < > > [email protected]> wrote: > > > >> Hi Josh, > >> > >> The whole view is wrapped in one form. > >> > >> Greetings > >> Tobi > >> > >> Am 17.07.2012 um 09:04 schrieb Josh Kamau <[email protected]>: > >> > >> > Hi ; > >> > > >> > Is the whole listview wrapped in 1 form or there is a form for each > row? > >> > > >> > Josh. > >> > > >> > On Tue, Jul 17, 2012 at 10:02 AM, Tobias Knierim < > >> > [email protected]> wrote: > >> > > >> >> Hi there, > >> >> I'm new to wicket and have a problem I can't find out for myself. > >> >> Maybe some of you can help me out with this. > >> >> > >> >> I have a refreshingview with input fields each row. I can add new > rows > >> >> on click of a button, but when I submit the form, I want to validate > 2 > >> >> input fields from different rows. Everything I tried so far hasn't > >> >> worked out, because I was only able to validate values from one row. > >> >> > >> >> Is it even possible to do something like this? > >> >> > >> >> > >> >> Greetings > >> >> Tobi > >> >> > >> >> --------------------------------------------------------------------- > >> >> 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] > >> > >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
