Hello,
the tab index may change according to page position that depend on the order
pages are being added.
So page label is more reliable. 

You need to hold an associative array with page names as keys and for each
item in the array, you need to add properties like saveCallback that will be
called each time save button in the toolbar is clicked.

So each time the save button is clicked, you need to get current page label
(as previousely shown) and use it to call the corresponding saveCallback.

another solution :
attach a saveCallback to each page using setUserData. For example:

save = function(){
  ///saving....
}

page.setUserData("saveCallback", save);

then later when save button is clicked, retrieve selected page (as shown in
the previous post)
and use save = selectedPage.getUserData("saveCallback") to retrieve your
save function and call it.

Regards


paragasu wrote
> 
> On Sun, Apr 8, 2012 at 1:04 PM, slah <slachtar@> wrote:
> 
>> Hi,
>> to get index:
>> var idx = tabview.indexOf(selectedPage);
>>
>>
>> Regards
>>
>> slah wrote
>> >
>> > Hi,
>> > you need to have the index or the label of the active tab view and then
>> > decide which save function will you exectue.
>> >
>> > var tabview = new qx.ui.tabview.Tabview();
>> > ....
>> >
>> > var selectedPage = tabView.getSelection()[0];
>> > var title = selectedPage.getLabel();
>> >
>> > Regards
>> >
>> >
>> > paragasu wrote
>> >>
>> >> Hi All,
>> >>
>> >> I have toolbars with action menu save & i have a tabview in which
>> contain
>> >> a
>> >> form (form inside each tab page)
>> >> i want to execute savedata  depending on which tabview page is active.
>> >>
>> >> How do accomplish this?
>> >>
>> >>
>> >> Thanks.
>> >>
>> >> Regards
>> >> paragasu
>> >>
>> >>
>> ------------------------------------------------------------------------------
>> >> For Developers, A Lot Can Happen In A Second.
>> >> Boundary is the first to Know...and Tell You.
>> >> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
>> >> http://p.sf.net/sfu/Boundary-d2dvs2
>> >> _______________________________________________
>> >> qooxdoo-devel mailing list
>> >> qooxdoo-devel@.sourceforge
>> >> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>> >>
>> >
>>
>> --
>> View this message in context:
>> http://qooxdoo.678.n2.nabble.com/execute-based-on-selected-tab-tp7447912p7448334.html
>> Sent from the qooxdoo mailing list archive at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> For Developers, A Lot Can Happen In A Second.
>> Boundary is the first to Know...and Tell You.
>> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
>> http://p.sf.net/sfu/Boundary-d2dvs2
>> _______________________________________________
>> qooxdoo-devel mailing list
>> qooxdoo-devel@.sourceforge
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
> 
> 
> Hi Sla,
> 
> Thank you for the reply.
> I think what you mean is for me to have and array of the form object with
> the tab index as key.
> 
> Regards,
> paragasu
> 
> ------------------------------------------------------------------------------
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> 
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel@.sourceforge
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 

--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/execute-based-on-selected-tab-tp7447912p7449346.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to