title: Wicket add method after the button click
body: <p>I have the question, how to "reload" add method after the button click? for example:</p>
  
  <pre><code>ArrayList list = new ArrayList();
  DataView dataView = new DataView("listview", new ListDataProvider(list)) {
      public void populateItem(final Item item) {
              final DBUser user = (DBUser) item.getModelObject();
              item.add(new Label("id", String.valueOf(user.getid())));
       }
  };
  final Load load = new Load(dataView);
      Form&lt;?&gt; form2 = new Form&lt;Void&gt;("form2") {
          @Override
          protected void onSubmit() {
  
              load.tick();
          }
  };
  add(dataView);
  </code></pre>
  
  <p>Now the load class:</p>
  
  <pre><code>public class Load {
  private DataView dataView;
  
  public Load(DataView dataView)
  {
      this.dataView = dataView;
  }
  
  public DataView tick()
  {
      Session session = HibernateUtil.getSessionFactory().openSession();//getCurrentSession();
      session.beginTransaction();
      Query query = session.createQuery(
              "from DBUser");
      ArrayList list = new ArrayList();
      for (Iterator it=query.iterate();it.hasNext();) {
          DBUser row = (DBUser) it.next();
          DBUser dbuser = new DBUser(row.getid());
          list.add(dbuser);
      }
  
      dataView = new DataView("listview", new ListDataProvider(list)) {
          public void populateItem(final Item item) {
              final DBUser user = (DBUser) item.getModelObject();
              item.add(new Label("id", String.valueOf(user.getid())));
          }
      };
      session.close();
      return dataView;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Right now add(line) method was called just once, how to call it after every button click?</p>
  
  <p>here is my .html</p>
  
  <pre><code>&lt;table frame="below" border=1&gt;
      &lt;tr wicket:id="listview"&gt;
           &lt;td align="center" width="40"&gt;&lt;span wicket:id="id"&gt;&lt;/span&gt;&lt;/td&gt;
       &lt;/tr&gt;
   &lt;/table&gt;
  </code></pre>