instead of new PropertyModel(opdrachtVO,"opdrachtBod" )));
do new PropertyModel(item.getModel(),"opdrachtBod" ))); further, set the item reuse strategy on your dataview so if there is a form error you do not lose the state of the textfields. also show us your dataprovider#model() impl -igor On Tue, Dec 27, 2011 at 2:36 PM, lang <delan...@telfort.nl> wrote: > I made a dataview with a textfield. Whatever I do, the screen value is never > read. I looked for hours on the internet and it drives me crazy.. .. please > help. <br> > > dataView = new DataView<OpdrachtVO>("pageable", new > OpdrachtVOProvider()){ > private static final long serialVersionUID = 1L; > @Override > protected void populateItem(final Item<OpdrachtVO> item) { > final OpdrachtVO opdrachtVO = item.getModelObject(); > item.add(getSaveBod()); > item.add(getCancelBod()); > > item.add(new TextField ("opdrachtBod", new > PropertyModel(opdrachtVO,"opdrachtBod" ))); > System.out.println("===>"+"gevonden id = > "+opdrachtVO.getId()+" > "+opdrachtVO.getOpdrachtBod()); > item.add(new Label("id", "" + > opdrachtVO.getId())); > item.add(new > Label("korteOmschrijving",opdrachtVO.getKorteOmschrijving())); > //item.add(new Label("cat", "" + > getMsg(""+opdrachtVO.getCategorie().getId()))); > item.add(new > Label("omschrijvingKlus",opdrachtVO.getOmschrijvingKlus())); > item.add(new > Label("plaats",opdrachtVO.getPlaats() ) ); > item.add(new > Label("postcode",""+opdrachtVO.getPostcode())); > item.add(new > Label("gezien",""+opdrachtVO.getAantalKeerGezien())); > item.add(new > Label("geboden",""+opdrachtVO.getAantalKeerGeboden())); > item.add(AttributeModifier.replace("class", new > AbstractReadOnlyModel<String>(){ > private static final long serialVersionUID = 1L; > > @Override > public String getObject(){ > return (item.getIndex() % 2 == 1) ? "even" : "odd"; > } > })); > } > }; > > [dataview navigator]><br/> > > * > ["korteOmschrijving"] * > ["id"]><br/> > ["omschrijvingKlus"]<br/> > *Plaats *["plaats"] > *Postcode: *["postcode"] <br/> > Aantal keren gezien: ["gezien"] > Aantal keren geboden: ["geboden"] > > > Uw bod <input type="text" wicket:id="opdrachtBod" > class="inputLine"></input> > > > <input type="submit" wicket:id="cancelBod" value="Bod doen" /> > <input type="submit" wicket:id="saveBod" value="Bod verwijderen" /> > <br/> > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Dataview-TextField-problem-tp4238430p4238430.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org