Hi Friends,
Please any help on how we can separate the data view code and populate the
Provider value on submit the form .

public class DemoHomePage extends WebPage { 
        
        public ListDataProvider<DemoBean> listDataProvider; 
        List<DemoBean> list = new ArrayList(); 
        
        
public DemoHomePage () 
{ 
        
          Form form=new Form("homePageForm"){ 
           public void submit(){ 
                   list.add(new DemoBean("1","ram")); 
                   list.add(new DemoBean("2","sam")); 
                   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); 
} 

* the error am getting is "unable to find wicket Id : row " *

Thanks,
Kumar Ramanathan

--
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-tp4666025p4666056.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]

Reply via email to