How do I replace a fragment with an AjaxLink ?

I am trying something like this.

Fragment orig = new Fragment("container","original",this);
orig.setOutputMarkupId(true);
add(orig);
add(new AjaxLink("link") {
    public void onClick(AjaxTarget target) {
       Fragment repl = new Fragment("container","replace",MyPage.this);
       repl.setOutputMarkupId(true);
       MyPage.this.replace(repl);
       target.add(repl);
    }
}
);

But I am getting ArrayIndexOutofBoundsExceptions, when the link is clicked.
-- 
View this message in context: 
http://www.nabble.com/Replace-a-fragment-with-AjaxLink-tp17799454p17799454.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to