Apologize Martin.Please tell how to fix my problem. Code snap is below for
your reference,kindly help on what needs to modified in that.
public DemoHomePage ()
{
Form form=new Form("homePageForm"){
public void submit(){
List<DemoBean> list = new ArrayList();
list.add(new DemoBean("1","ram"));
list.add(new DemoBean("2","sam"));
ListDataProvider<DemoBean> listDataProvider = new
ListDataProvider<DemoBean>(list);
DataView<DemoBean> dataView = new
DataView<DemoBean>("row",listDataProvider){
/**
*
*/
private static final long serialVersionUID = 1L;
protected void populateItem(Item<DemoBean> item){
DemoBean bean=item.getModelObject();
RepeatingView repeatingView = new
RepeatingView("dataRow");
repeatingView.add(new
Label(repeatingView.newChildId(), bean.getId()));
repeatingView.add(new
Label(repeatingView.newChildId(),
bean.getName()));
item.add(repeatingView);
}
};
add(dataView);
}
};
add(form);
}
Html page:
<html>
<body>
<form wicket:id="homePageForm">
<input type="submit" value="ok">
</form>
Id
Name
</body>
</html>
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Errors-in-data-view-req-for-help-to-fix-the-error-in-code-tp4666025p4666039.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]