Yes, it did, thanks you very much :-) Finally I got rid of the delegate part (I was on a hotfix and this part was not really necessary).
Thank you ! On 01/09/2013 09:18 AM, Martin Wittemann wrote: > Hey, > I don't see a bug in that code but something that might need some > explanation. Here is, step by step, what the code does if you give the > delegate. > > Line 1-14 > You set up the data binding via controller and use the default binding for > the label. > > Line 15-19 > The Delegate will be set but the bindItem method is empty which means it > renews the bindings based on the given delegate method. During that, the old > binding will be removed, only the values of the widgets will not be reset (in > a regular case, they will be overridden anyway). This can be verified by > changing the original model and check if the label in the selectbox changes. > > Line 22-34 > You change the model and the binding will be set up once again, but with the > same result, nothing changes. > > > In the end, if you want to use the bindItem delegate and also want to have > the default binding for e.g. label, icon and model property, you have to call > the "bindDefaultProperty" method in the bindItem method. :) > > I hope that mad it a bit clearer, > Martin > > > > Am 20.12.2012 um 16:48 schrieb loremipsum <[email protected]>: > >> Hi folks, >> >> I've found a strange behavior. I'm trying to udpate a selectbox's model. >> >> *Steps :* >> Please have a look at this sample : [link] <http://tinyurl.com/bout5r5> >> >> - I instanciate a qx.ui.form.SelectBox >> - I instanciate a qx.data.controller.List (with a model, a selectbox and a >> labelfield) >> - I give it a delegate (with a bindItem function, I've not tried with a >> completely empty delegate) >> - I change the controller's model >> >> Giving or not a delegate to the controller makes all the difference. >> >> *Expected behavior :* >> The selectbox's items are updated. >> >> *Actual behavior :* >> The selectbox keeps its original items. >> >> *Workaround* >> I've ended up not using the delegate, which was not as necessary as the >> ability to change the selectbox's model. But I really wonder if this >> behavior is normal or if it is a bug. If so, please tell me, i'd be glad to >> file a bugreport ! :-) >> >> Cheers ! >> >> >> >> -- >> View this message in context: >> http://qooxdoo.678.n2.nabble.com/Strange-behavior-with-qx-ui-form-SelectBox-is-it-a-bug-tp7582346.html >> Sent from the qooxdoo mailing list archive at Nabble.com. >> >> ------------------------------------------------------------------------------ >> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial >> Remotely access PCs and mobile devices and provide instant support >> Improve your efficiency, and focus on delivering more value-add services >> Discover what IT Professionals Know. Rescue delivers >> http://p.sf.net/sfu/logmein_12329d2d >> _______________________________________________ >> qooxdoo-devel mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > > ------------------------------------------------------------------------------ > Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery > and much more. Keep your Java skills current with LearnJavaNow - > 200+ hours of step-by-step video tutorials by Java experts. > SALE $49.99 this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122612 > _______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > > ------------------------------------------------------------------------------ Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery and much more. Keep your Java skills current with LearnJavaNow - 200+ hours of step-by-step video tutorials by Java experts. SALE $49.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122612 _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
