title: Wicket - Update WebMarkupContainer with AjaxLink
body: <p>Im trying to update at PropertyListView after i have deleted an entry via Ajax, but for some reason it wont work.</p>
  
  <p>I have added the PropertyListView  to a WebMarkupContainer and added the List to this view.</p>
  
  <p>Can somebody help</p>
  
  <pre><code>import java.util.ArrayList;
  import java.util.List;
  
  import org.apache.wicket.ajax.AjaxEventBehavior;
  import org.apache.wicket.ajax.AjaxRequestTarget;
  import org.apache.wicket.ajax.markup.html.AjaxLink;
  import org.apache.wicket.ajax.markup.html.form.AjaxButton;
  import org.apache.wicket.markup.html.WebMarkupContainer;
  import org.apache.wicket.markup.html.basic.Label;
  import org.apache.wicket.markup.html.form.Button;
  import org.apache.wicket.markup.html.list.ListItem;
  import org.apache.wicket.markup.html.list.PropertyListView;
  import org.apache.wicket.markup.html.panel.Panel;
  import org.apache.wicket.model.IModel;
  import org.apache.wicket.model.LoadableDetachableModel;
  
  @SuppressWarnings("serial")
  public class StockViewPanel extends Panel{
  
      private WebMarkupContainer listContainer;
      @SuppressWarnings("rawtypes")
      private PropertyListView plw; 
  
      @SuppressWarnings({ "rawtypes", "unchecked" })
      public StockViewPanel(String id) {
          super(id);
  
          IModel model = new LoadableDetachableModel() { 
              @Override 
              protected Object load() { 
                  return WicketApplication.getStockEntrys();
              }};     
  
              plw = new PropertyListView("stockEntrys", model ) 
              { 
                  @Override
                  protected void populateItem(final ListItem item) 
                  { 
  
                      //StockEntry stockEntry = (StockEntry) item.getModelObject(); 
                      item.add(new Label("name"));
                      //SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy");
                      item.add(new Label("date"/*, formatter.format(stockEntry.getDate())*/)); 
                      //NumberFormat nf = NumberFormat.getInstance(new Locale("da", "dk"));
                      item.add(new Label("number"/*, nf.format(stockEntry.getNumber())*/)); 
                      item.add(new Label("price"/*, nf.format(stockEntry.getPrice())*/));
                      item.add(new AjaxLink("deleteEntryLink"){
  
                          @Override
                          public void onClick( AjaxRequestTarget target ) 
                          {
                              List list = new ArrayList(WicketApplication.getStockEntrys());
                              Object ob = item.getModelObject();
                              list.remove(ob);
                              WicketApplication.setEntrys(list);
                              target.add(listContainer);
                          }
                      });
                  }
  
  
              };
              listContainer = new WebMarkupContainer("listContainer");
              listContainer.setOutputMarkupId(true);
              listContainer.add(plw);
              add(listContainer);
      }
  }
  
  &lt;html&gt;
  &lt;body&gt;
      &lt;wicket:panel&gt;
          &lt;table wicket:id="listContainer"&gt;
              &lt;thead&gt;
                  &lt;th&gt;Navn&lt;/th&gt;
                  &lt;th&gt;Dato&lt;/th&gt;
                  &lt;th&gt;Antal&lt;/th&gt;
                  &lt;th&gt;Pris&lt;/th&gt;
                  &lt;th&gt;&lt;/th&gt;
              &lt;/thead&gt;
              &lt;tbody&gt;
                  &lt;tr wicket:id="stockEntrys" class="stockEntry"&gt;
                      &lt;td wicket:id="name"&gt;name&lt;/td&gt;
                      &lt;td wicket:id="date"&gt;date&lt;/td&gt;
                      &lt;td wicket:id="number"&gt;number&lt;/td&gt;
                      &lt;td wicket:id="price"&gt;price&lt;/td&gt;
                      &lt;td&gt; &lt;a href="#" wicket:id="deleteEntryLink"&gt;DELETE&lt;/a&gt; &lt;/td&gt; 
                  &lt;/tr&gt;
              &lt;/tbody&gt;
          &lt;/table&gt;
      &lt;/wicket:panel&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>