Re: Keep inserted data on AjaxTabbedPanel tab switching using a LoadableDetachableModel

2007-11-14 Thread lizz

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 <[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]
> 
> 
> 

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Keep inserted data on AjaxTabbedPanel tab switching.

2007-11-14 Thread Fabio Fioretti
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]



Re: Keep inserted data on AjaxTabbedPanel tab switching.

2007-11-14 Thread lizz

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]



Re: Keep inserted data on AjaxTabbedPanel tab switching.

2007-09-25 Thread Fabio Fioretti
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]



Re: Keep inserted data on AjaxTabbedPanel tab switching.

2007-09-21 Thread Igor Vaynberg
you have to override newlink on the tabbedpanel and return a submitlink
instead

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.

-igor


On 9/21/07, Fabio Fioretti <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I'm trying to build a data insertion page made up of a form containing
> an AjaxTabbedPanel with two panels. The submit button is global. I
> want to complete the fields in the two tabs and then submit them all
> in a single submit action.
>
> The problem is that, when I complete the first tab, switch to the
> second and then go back to the first, all inserted data are lost and
> all fields are blank again.
>
> All panels use compound property models over a single, page-global object.
>
> What am I doing wrong? What's the best way to keep inserted data when
> switching between tabs and then submit them all at once?
>
>
> Thanks for your time and suggestions,
>
> Fabio Fioretti - WindoM
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Keep inserted data on AjaxTabbedPanel tab switching.

2007-09-21 Thread Fabio Fioretti
Hi all,

I'm trying to build a data insertion page made up of a form containing
an AjaxTabbedPanel with two panels. The submit button is global. I
want to complete the fields in the two tabs and then submit them all
in a single submit action.

The problem is that, when I complete the first tab, switch to the
second and then go back to the first, all inserted data are lost and
all fields are blank again.

All panels use compound property models over a single, page-global object.

What am I doing wrong? What's the best way to keep inserted data when
switching between tabs and then submit them all at once?


Thanks for your time and suggestions,

Fabio Fioretti - WindoM

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