I have a web page that adds the panel as a component.  On the same page, I've
three ajax links.  

The goal is to clic on the links will add different components to the panel
then refresh the panel on the page.  It seems that I cannot do that.  Here's
my code:

public class MyWegPage extends WebPage {

   // MyPanel is a class that extends wicket Panel
   private MyPanel resultPanel;
 
    ....


   public MyWebPage() {
      addComponents();
   }

   private updatePanelComponent() {   
      // remove old panel, create new one, add it
      remove(resultPanel);
      resultPanel=new SearchResultPanel("searchResultPanel", list2));
      add(resultPanel);   
}

   private void addComponents() {

        add(resultPanel=new SearchResultPanel("searchResultPanel", list));


        // sort by poster
        add(sortByPoster = new AjaxLink("sortByPoster") {
                public void onClick(AjaxRequestTarget target) {

                               ...
                               updatePanelComponent();
                              
                               // refresh the result panel
                               // but it doesn't refresh :( 
                     target.addComponent(resultPanel);                          
                
                }
        });


   }

}
-- 
View this message in context: 
http://www.nabble.com/How-to-refresh-a-wicket.markup.html.panel.Panel-tf3849946.html#a10905569
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to