You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by lizz <el...@bouvet.no> on 2007/11/14 13:18:30 UTC
Re: Keep inserted data on AjaxTabbedPanel tab switching.
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 <ig...@gmail.com> 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: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
--
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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Keep inserted data on AjaxTabbedPanel tab switching using a
LoadableDetachableModel
Posted by lizz <el...@bouvet.no>.
Hi,
I tried this but since I use a LoadableDetachableModel it gets detatched and
loaded every time I select a new tab.
Therefore the new information is still lost...
Any idea on how to use a LoadableDetachableModel in this scenario?
(In the tabs i create a new panel every time the getPanel methos is called.
I guess this is the correct way to do it.)
Kind regards,
Elisabeth
Fabio Fioretti wrote:
>
> 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 <el...@bouvet.no> 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 <ig...@gmail.com> 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: users-unsubscribe@wicket.apache.org
>> > For additional commands, e-mail: users-help@wicket.apache.org
>> >
>> >
>> >
>>
>> --
>> 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: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Keep-inserted-data-on-AjaxTabbedPanel-tab-switching.-tf4493055.html#a13749951
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Keep inserted data on AjaxTabbedPanel tab switching.
Posted by Fabio Fioretti <wi...@gmail.com>.
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 <el...@bouvet.no> 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 <ig...@gmail.com> 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: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
>
> --
> 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: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org