Please ignore the previous mail... accidentaly hit the Enter key...
Hi friends,
I have a UI with a couple of tabs. When the user clicks a tab, I want it to
add to the browser's history. Likewise, if the user navigates using the
browser navigation, I want the tabs to get selected correctly.
Here's what I did: (basically directly from the documentation)
I added a 'changeSelection' listener to the tabview:
this.tabView.addListener("changeSelection",
this._doUpdateHistoryWhenTabChanges, this);
and a 'request' listener to the history:
qx.bom.History.getInstance().addListener("request",
this._doUpdateTabWhenHistoryChanges, this);
Here's the implementation:
_doUpdateHistoryWhenTabChanges : function(e)
{
var tabIdx = this.tabView.indexOf(e.getData()[0]);
qx.bom.History.getInstance().addToHistory(x.Application.TAB_NAMES[tabIdx]);
},
_doUpdateTabWhenHistoryChanges : function(e)
{
var state = e.getData()[0];
var tabIdx = 0;
var c = this.tabView.getChildren();
if (state) {
tabIdx = x.Application.TAB_NAMES.indexOf(state);
}
if (c[tabIdx] != undefined)
this.tabView.setSelection(c[tabIdx]);
}
This used to work in 0.8.3, but now that I migrated to 1.2.1 it doesn't
work.
As soon as a tab is clicked, '_doUpdateHistoryWhenTabChanges ' is called,
which then adds to the history and calls: '_doUpdateTabWhenHistoryChanges ',
which then calls again '_doUpdateHistoryWhenTabChanges ' from a qooxdoo
timer, etc...
Could someone lead me into the right direction how this is supposed to work?
thx
andy
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel