Re: [qooxdoo-devel] Binding custom list like objects
Brought to you by:
ecker,
martinwittemann
From: Martin W. <mar...@1u...> - 2009-04-30 07:07:12
|
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 > qoo...@li... > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > > |