Hi Greg, I tried to run your code but this line:
list.setSelection(a.getItem(0)); threw an exception because the selection expects an instance of qx.data.Array but getItem returns a number. After replacing it with slice(0, 1), everything works as expected: http://tinyurl.com/ntuyyrp FYI, the list automatically applies a default selection when the model changes. In this case, since the selection mode isn't "one", that means no item will be selected. Regards, Daniel On 28.08.2013 21:46, Gregory Beaver wrote: > Hi, > > when I change the model of a qx.ui.list.List like: > > var list = new qx.ui.list.List(), a; > list.setModel(a = new qx.data.Array([1,2,3])); > list.setSelection(a.getItem(0)); > > list.setModel(new qx.data.Array([2,3,4])); > > the selection remains visually on item 0. How do I tell the list to > reset its selection, and why does this not automatically occur when the > model changes? > > Thanks, > Greg > > ------------------------------------------------------------------------------ > Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! > Discover the easy way to master current and previous Microsoft technologies > and advance your career. Get an incredible 1,500+ hours of step-by-step > tutorial videos with LearnDevNow. Subscribe today and save! > http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk > _______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > > ------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
