Hi, the model is available via closure in your example. Just paste my code unter your code postet some mails ago and its working. It's a good question of how to handle such a mix of model data. I haven't thought of that because my mind was always using only "data models". Maybe i come up with a solution tomorrow. :) Best, Martin
panyasan wrote: > > Hi Martin, > > thank you very much for responding so quickly to my feature request!! Very > much appreciated! > > > MartinWittemann wrote: >> >> var model2target = {converter: function(data) { >> for (var i = 0; i < model.getLength(); i++) { >> var item = model.getItem(i); >> if (item.getValue() == data) { >> return item; >> } >> } >> return model.getItem(0); >> }}; >> > > Probably there is the "model" parameter missing in the handler function > signature, isn't it? Otherwise "model" would be undefined in the function > body. > > And as much as I now understand what you mean by "ui model" and "data > model" - I am curious as to how you would separate those two in the case > of a select box? isn't it the point that you have a "ui model" data which > is just a representation of the "real" data, i.e. a value that can be > processed by the backend? > > Thanks for your work - I look forward to trying it out. > > Best, > > Christian > > > -- View this message in context: http://n2.nabble.com/How-to-use-data-binding-for-a-SelectBox-which-is-intended-for-single-selection-tp3656721p3694135.html Sent from the Q&A (solved) mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel