Hi there.

I've loaded some data via qx.data.store.Json and have setup a controller
that binds the data to a list with custom bindings. It works great. However,
I would like to dynamically add data to the model when clicking on a button.
I've tried to push the data to both the  store and the controller model but
it says "No event could be found for the property name", is this because I
using a custom ListItem with custom bindings?

I'm also wondering if the dynamically added data should be pushed to the
store or the controllers model?

The loaded Json data looks like this:

{ 'items' : 
[
    {
        "id":"1",
        "name":"Item 1",
    },
    {
        "id":"2",
        "name":"Item 2",
    }
]}


And the button event looks like this:

...
button.addListener("execute", function(e)
{
  var model = controller.getModel();

  var data = {"id":"3","name":"Item 3"}

  model.push(data);  
}, this);
...

Any help is highly appreciated! Thanks a lot! :)

-- 
View this message in context: 
http://old.nabble.com/Dynamically-add-data-to-model--tp28433005p28433005.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to