Hi Stefan, If you can come up with a test page that would be nice (I will add ti to a demo project). On the mean time I think I have spotted (and hopefully fixed) a JavaScript error from your code bellow. Can you please try with latest 1.5.x branch?
On Tue, Nov 27, 2012 at 1:04 PM, Stefan Renz <s.r...@efonds.com> wrote: > Hi Ernesto, > > I'm getting a "Uncaught SyntaxError: Unexpected identifier" in the > JavaScript console as soon as I use the Tabs#setAjaxSelectEvent() call. > What can I do to help narrowing down the problem? > > I'm using Wicket 1.5.7, and WiQuery branch origin/1.5 with your commit > cherrypicked. I can see that WiQuery references JQuery UI tabs 1.8.16. > > OnReady-Javascript for the tab: > $('#tabs11').tabs({select: function(event, ui) { > var url = > > './demo_tab?0-1.IBehaviorListener.0-tabs&tabEvent=select&tabIndex='+ui.index+';var > wcall=wicketAjaxGet(url,function() { }.bind(this),function() { > }.bind(this), function() {return Wicket.$('tabs11') != null;}.bind(this)); > return true; > }}); > > I'm no JavaScript programmer, so I can't spot the error. > > The same thing happens if I use another event handler -- I tried the > AjaxLoadEvent... > > Any ideas? What can _I_ do? Come up with a demo page? > > Bye > Stefan > > Ernesto Reinaldo Barreiro wrote: > > Stefan, > > > > Yes it will make it into the next 1.5.x release. It will be good if you > can > > test it before that, so that we can fix/add anything else you need. > > > > On Mon, Nov 26, 2012 at 10:58 PM, Stefan Renz <s.r...@efonds.com> wrote: > > > >> Hi Ernesto, > >> > >> fabulous, thanks for the quick solution. I'll try that as soon as I can. > >> Will your commit make it into next official release of WiQuery? > >> > >> Thank you very much for your support. > >> > >> Bye > >> Stefan > >> > >> Ernesto Reinaldo Barreiro wrote: > >>> Stefan, > >>> > >>> I have added support for AJAX events > >>> > >>> > >> > https://github.com/WiQuery/wiquery/commit/cd1fa658a6bd8bd896b1f46c7750ecb04ee2e034 > >>> You can use them to track selected index at server side as > >>> > >>> tabs.setAjaxSelectEvent(new ITabsAjaxEvent() > >>> { > >>> private static final long serialVersionUID = 1L; > >>> > >>> public void onEvent(AjaxRequestTarget target, Tabs tabs, int index) > >>> { > >>> // store the index on sever side > >>> } > >>> }); > >>> > >>> Conversely you can use methods Tabs#select(int index) > >>> and Tabs#select(AjaxRequestTarget ajaxRequestTarget, int index) to set > >> back > >>> the selected tab. > >>> > >>> P.S. See also the Tabs#setCookie method (to store selected index in > >>> cookie). > >>> > >>> On Mon, Nov 26, 2012 at 1:51 PM, Ernesto Reinaldo Barreiro < > >>> reier...@gmail.com> wrote: > >>> > >>>> Let me see if I can add those features today or tomorrow. > >>>> > >>>> > >>>> On Mon, Nov 26, 2012 at 1:24 PM, Stefan Renz <s.r...@efonds.com> > wrote: > >>>> > >>>>> Hi Ernesto, > >>>>> > >>>>> thanks for the quick feedback. > >>>>> > >>>>> We're working on top of Wicket/WiQuery 1.5.7. > >>>>> > >>>>> Ciao > >>>>> Stefan > >>>>> > >>>>> Ernesto Reinaldo Barreiro wrote: > >>>>>> I see there is a > >>>>>> > >>>>>> http://api.jqueryui.com/tabs/#option-active > >>>>>> > >>>>>> which does not seem to be implemented on wiquery (I will add it). > So, > >>>>> what > >>>>>> you will need is some sort of AJAX version for > >>>>>> > >>>>>> http://api.jqueryui.com/tabs/#event-activate > >>>>>> > >>>>>> and on server side record this number (that you will pass as an > extra > >>>>>> parameter to AJAX request). Which wicket version are you using? > >>>>>> > >>>>>> > >>>>>> On Mon, Nov 26, 2012 at 1:07 PM, Stefan Renz <s.r...@efonds.com> > >> wrote: > >>>>>>> In principle, yes, that's one part of the solution. However, I need > >> to > >>>>>>> know which index the page currently displays. How can I get the > >>>>>>> information, which tab is selected? > >>>>>>> > >>>>>>> Ernesto Reinaldo Barreiro wrote: > >>>>>>>> Can you try setDefaultSelectedTabIndex? > >>>>>>>> > >>>>>>>> On Mon, Nov 26, 2012 at 12:55 PM, Stefan Renz <s.r...@efonds.com> > >>>>> wrote: > >>>>>>>>> Hi, > >>>>>>>>> > >>>>>>>>> we're using WiQuery tabs in our web application to divide > >> information > >>>>>>>>> into smaller, logically grouped chunks. > >>>>>>>>> > >>>>>>>>> Often times, our users will select a few items in a list in order > >> to > >>>>>>>>> browse through information. For each of those selected items we > >>>>> present > >>>>>>>>> a detail page with WiQuery tabs on them, along with a navigation > >>>>> toolbar > >>>>>>>>> to quickly flip through the selected items. > >>>>>>>>> > >>>>>>>>> Now, when clicking Prev or Next on the navigation toolbar, we > swap > >>>>> the > >>>>>>>>> information panels with Ajax, but the selected WiQuery tab will > of > >>>>>>>>> course by default reset itself to the first tab. > >>>>>>>>> > >>>>>>>>> How can I make the selected tab remain "sticky"? Is there a way > to > >>>>>>>>> register for a "tab selected" event, so that I can manage the > >>>>> selection > >>>>>>>>> on the server? > >>>>>>>>> > >>>>>>>>> Thanks for your help, > >>>>>>>>> bye > >>>>>>>>> Stefan > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >> --------------------------------------------------------------------- > >>>>>>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >>>>>>>>> For additional commands, e-mail: users-h...@wicket.apache.org > >>>>>>>>> > >>>>>>>>> > >>>>>>> -- > >>>>>>> im Auftrag der eFonds Solutions AG, +49-89-579494-3417 > >>>>>>> > >>>>>>> > >>>>>>> > --------------------------------------------------------------------- > >>>>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >>>>>>> For additional commands, e-mail: users-h...@wicket.apache.org > >>>>>>> > >>>>>>> > >>>>> -- > >>>>> im Auftrag der eFonds Solutions AG, +49-89-579494-3417 > >>>>> > >>>>> > >>>>> --------------------------------------------------------------------- > >>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >>>>> For additional commands, e-mail: users-h...@wicket.apache.org > >>>>> > >>>>> > >>>> -- > >>>> Regards - Ernesto Reinaldo Barreiro > >>>> Antilia Soft > >>>> http://antiliasoft.com/ <http://antiliasoft.com/antilia> > >>>> > >>>> > >>> > >> -- > >> im Auftrag der eFonds Solutions AG, +49-89-579494-3417 > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >> For additional commands, e-mail: users-h...@wicket.apache.org > >> > >> > > > > > > -- > im Auftrag der eFonds Solutions AG, +49-89-579494-3417 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Regards - Ernesto Reinaldo Barreiro Antilia Soft http://antiliasoft.com/ <http://antiliasoft.com/antilia>