Hi,
this is how I implemented it:

tabPanel = new AjaxTabbedPanel("tabs", tabs){
    @Override
    protected WebMarkupContainer newLink(String linkId, final int index) {
        return new AjaxSubmitLink(linkId, candidateForm) {
            private static final long serialVersionUID = 1L;

            @Override
            protected void onSubmit(AjaxRequestTarget target, Form form) {
                setSelectedTab(index);
                if (target != null) {
                    target.addComponent(tabPanel);
                }
                onAjaxUpdate(target);
            }

            @Override
            protected void onError(AjaxRequestTarget target, Form form){
                AjaxUtils.error(form);
            }
        };
    }
};


Kindest regards,

Fabio Fioretti - WindoM


On Nov 14, 2007 1:18 PM, lizz <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I tried implementing the submitLink but dont really understand what I do
> wrong as I still loose the data.
> Could you provide me with your code in the newlink metthod please...
> I am new to web development so I might have forgotten some obvious stuff ...
> Thanks :-)
>
>
>
> Fabio Fioretti wrote:
> >
> > On 9/21/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> >> you have to override newlink on the tabbedpanel and return a submitlink
> >> instead
> >
> > Nice, this worked just fine!
> >
> >> also, really, for situations like this it doesnt make sense to use a
> >> server-side panel. use client side tabs like what jquery provides instead
> >> -
> >> it works much better with forms.
> >
> > I agree, but this is not the case: I simplified the situation to frame
> > the question more easily, but it's more complex in reality.
> >
> >
> > Thanks a lot for your precious help,
> >
> > Fabio Fioretti - WindoM
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/Keep-inserted-data-on-AjaxTabbedPanel-tab-switching.-tf4493055.html#a13745653
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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

Reply via email to