On Tue, Apr 10, 2012 at 1:19 AM, Mustafa Sak <mustafa....@1und1.de> wrote:
> Hi paragasu,
>
> like slah wrote, there are many ways. So let me put my two cents in:
>
> I would first extend qx.ui.tabview.Page and would implement a member
> function "save".
> Know you can execute explicit the function of selected page like this:
>
> tabview.getSelection()[0].save();
>
> regards Mustafa Sak
>
> -----Ursprüngliche Nachricht-----
> Von: slah [mailto:slach...@gmail.com]
> Gesendet: Montag, 9. April 2012 12:24
> An: qooxdoo-devel@lists.sourceforge.net
> Betreff: Re: [qooxdoo-devel] execute based on selected tab
>
> 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
>
>
> ------------------------------------------------------------------------------
> Better than sec? Nothing is better than sec when it comes to
> monitoring Big Data applications. Try Boundary one-second
> resolution app monitoring today. Free.
> http://p.sf.net/sfu/Boundary-dev2dev
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
Hi Sla,
Thank, that exactly what i am looking for! the easiest way is to save the
function using saveUserData()
and get the function of the selected page with getUserData().
Thanks everyone
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel