Hey Eric, thanks for the feedback. :)
Best, Martin Am 01.05.2009 um 23:29 schrieb Dacquay, Eric: > Hi Martin, > > What I had in mind was that instead of automatically generating an > event > when a property changes, the class defines two events which can then > be > fired in the apply method for the property. By setting a flag before > hand when reloading the data, the apply method would know to fire the > event associated with the data reload. Otherwise, the regular > changeModel event could be fired. If necessary, the reload event > could > in turn also fire the changeModel event. > > I haven't yet had a chance to put all of this into practice but I > haven't encountered any problems so far. > > Thanks > > Eric > > -----Original Message----- > From: Martin Wittemann [mailto:[email protected]] > Sent: Friday, May 01, 2009 4:15 AM > To: qooxdoo Development > Subject: Re: [qooxdoo-devel] Binding custom list like objects > > Hello Eric, > > Offering such a functionality would surely be a benefit in a scenarios > as yours. I'll keep it in mind and see what I can do the next time I > lay hand on the data binding. > > Currently there is no difference between a reload of the store and a > update in the model itself. Models are just updated. Perhaps you could > share your thoughts on how to handle that? It could be interesting for > the further implementation of the data binding layer. > > Regards, > Martin > > > > Am 01.05.2009 um 00:24 schrieb Dacquay, Eric: > >> Hi Martin, >> >> I've decided to go ahead and simply remove and add the binding as >> shifting the data would not work in my case. Just a thought but a >> way >> to simply update the source property used in an existing binding >> could >> be useful for something like this. It would avoid having to remove >> and >> add the bindings continuously. >> >> On the topic of binding again, is there a way to tell if the change >> in >> model came from a reloaded data store or from a form element >> update? I >> have an idea on how to go about doing this but I don't want to >> re-implement something which has already been done. >> >> Thanks >> >> Eric >> >> -----Original Message----- >> From: Martin Wittemann [mailto:[email protected]] >> Sent: Thursday, April 30, 2009 3:07 AM >> To: qooxdoo Development >> Subject: Re: [qooxdoo-devel] Binding custom list like objects >> >> Hello Eric, >> >> now i'll get what you try to achieve. >> But i have to say the only way i see is also to add and remove the >> binding every time the record changes. The binding is based on event >> listeners and the missing capability of changing the source of a >> event >> listener does also apply to the data binding. >> But i just have another idea! If the order is not important in the >> arrays, you can bind on the first item of the array and just shift >> the >> whole array around. That way you can keep the binding. How about >> that? >> >> Best, >> Martin >> >> >> >> Am 29.04.2009 um 18:25 schrieb Dacquay, Eric: >> >>> Hi Martin, >>> >>> Let me try to describe what I'm trying to achieve. Here is the >>> general form of the data behind the store: >>> >>> { >>> text1: ["a", "b", "c", "d"], >>> text2: ["e", "f", "g", "h"] >>> } >>> >>> In this case, the view would have two controls (label, textfield, >>> etc...) to display the data. The view also has a next and previous >>> button to move through the records. What I am trying to do it this, >>> when the user clicks on next or previous, the controls should update >>> to show the associated data. For example, using the sample data >>> would give the following: >>> >>> a e >>> b f >>> c g >>> d h >>> >>> when moving through the records. It's as if the current record is a >>> selection into the arrays. The only thing I can think of would be >>> to rebind all the elements every time a record changes but this >>> seems wrong to me. >>> >>> Thanks >>> >>> Eric >>> >>> -----Original Message----- >>> Hello Eric, >>> >>> the kind of controller depends on your custom view. Is it more like >>> a list or more like a set of form elements? If its more like a list, >>> the list controller could work. If its more like a set of froms the >>> object controller in combination with a single value binding could >>> do the job. >>> Perhaps you could give me some more information on the kind of data >>> and the view? >>> >>> Best, >>> Martin >>> >>> >>> Am 29.04.2009 um 00:19 schrieb Dacquay, Eric: >>> >>> >>> Hi, >>> >>> I currently have an application which is used to present a custom >>> view of database records. The user can move either forward or >>> backward, looking at one record at a time. I also have a Json data >>> store which I would like to use to bind the controls in the record >>> viewer. The data is stored as arrays in the store which I would >>> like to bind to the controls so that the array elements would >>> correspond to the different records. However, I can't use a List >>> controller since the target is not one of the three supported >>> (SelectBox, List, ComboBox) and using an Object controller or >>> directly using the bind method doesn't seem to allow me to select >>> any element from an array (only the first or the last). Is there >>> any way that I can do what I want with the existing classes or do I >>> have to dig into the List controller to understand what it does and >>> then roll out my own? >>> >>> Thanks >>> >>> Eric >>> >>> >>> >>> >> > ------------------------------------------------------------------------ >> ------ >>> Register Now & Save for Velocity, the Web Performance & Operations >>> Conference from O'Reilly Media. Velocity features a full day of >>> expert-led, hands-on workshops and two days of sessions from >>> industry >>> leaders in dedicated Performance & Operations tracks. Use code >>> vel09scf >>> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf >>> _______________________________________________ >>> qooxdoo-devel mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel >>> >>> >> >> >> > ------------------------------------------------------------------------ >> ------ >> Register Now & Save for Velocity, the Web Performance & Operations >> Conference from O'Reilly Media. Velocity features a full day of >> expert-led, hands-on workshops and two days of sessions from industry >> leaders in dedicated Performance & Operations tracks. Use code >> vel09scf >> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf >> _______________________________________________ >> qooxdoo-devel mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel >> >> >> >> > ------------------------------------------------------------------------ > ------ >> Register Now & Save for Velocity, the Web Performance & Operations >> Conference from O'Reilly Media. Velocity features a full day of >> expert-led, hands-on workshops and two days of sessions from industry >> leaders in dedicated Performance & Operations tracks. Use code >> vel09scf >> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf >> _______________________________________________ >> qooxdoo-devel mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel >> >> > > > ------------------------------------------------------------------------ > ------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code > vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > > > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code > vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > > ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
