Thanks for reply,

If you want to refresh the panel, call setOutputMarkupId(true)  on the panel
> , then add the panel to the target.
>

Does it mean I should call setOutputMarkUpId(true) in the constructor of the
panel? If I do so, the layout of the panel is destroyed.


> If the Ajax Link  is on the same panel, you can call
> this.setOutputMarkupId(true) , and you can also add MyPanel.this to the
> target.
>

No, the link is not on the same panel. This is actually the point that I
don't really understand. What should I add, if the link not on the panel.


> The point is , what ever you want to refresh via ajax must have
> outputMarkupId set to true.
>
> Hope that helps.
>
> Josh.
>
> On Tue, Mar 1, 2011 at 11:51 AM, Dmitriy Neretin <
> dmitriy.nere...@googlemail.com> wrote:
>
> > Hello everybody!
> >
> > Hope someone can help me. I don't really understand, what I should add as
> > ajax target :(
> >
> > So, I have an abstract class Index where I add all my panels (3) and it
> is
> > my "masterlayout". I add the panels in the index class like this:
> >
> > add(new ShoppingCartPanel("id", "anotherMehod");
> >
> > The appropriate Markup has just following tags (ShoppingCartPanel.html):
> > <wicket:panel>
> >  Content
> > </wicketpanel>
> >
> > In the other Page (that inherits from Index) I have implemented the
> > AjaxSubmitLink:
> >
> > add(new AjaxSubmitLink("addtocart") {
> >            @Override
> >            protected void onSubmit(AjaxRequestTarget target, Form form) {
> >                target.addComponent(?????????????????);
> >
> > What I want is, when the link is activated the panel should be updated...
> >
> > First: I don't really understand what I have add to the addComponent()
> > method ?
> > Second: Where schould I set setOutputMarupId(true) ?
> >
> > Thank You!
> >
>

Reply via email to