Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webix Form half-works #28

Open
yorgodillo opened this issue Sep 30, 2015 · 1 comment
Open

Webix Form half-works #28

yorgodillo opened this issue Sep 30, 2015 · 1 comment

Comments

@yorgodillo
Copy link

I have the following webix form submit code

{ view: 'button', label: 'Save', type: 'form', click: function(){
 var form = this.getFormView(); 
 var v = form.getValues(); 
 Meteor.call('updateUser', { name: v.name, surname: v.surname });
}}

This works. It does update the Meteor MongoDB. When I first load the page, it also fetches the form data and fills the form fields correctly.

But if I change the MongoDB manually from the back-end (via a shell), the expected change on my webix view does NOT happen ! An event is indeed triggered though (!), as I get a browser console error:

Stack:

Exception in queued task: TypeError: this._settings.store.attachEvent is not a function at Object.webix.DataProcessor.webix.proto._after_init_call (http://localhost:3000/packages/webix_webix.js?4da16d463223c73cab897d8cf6d4284ded156c15:28509:24) at Object.webix.proto.result (http://localhost:3000/packages/webix_webix.js?4da16d463223c73cab897d8cf6d4284ded156c15:261:19) at Object.webix.dp (http://localhost:3000/packages/webix_webix.js?4da16d463223c73cab897d8cf6d4284ded156c15:28438:11) at Object.webix.proxy.meteor.load.query.cursor.observe.changed (http://localhost:3000/packages/webix_webix.js?4da16d463223c73cab897d8cf6d4284ded156c15:31730:11) at LocalCollection._observeFromObserveChanges.observeChangesCallbacks.changed (http://localhost:3000/packages/minimongo.js?af9eb9d7447544ca9b839a3dcf7ed2da2209b56c:3928:28) at Object.LocalCollection._CachingChangeObserver.self.applyChange.changed (http://localhost:3000/packages/minimongo.js?af9eb9d7447544ca9b839a3dcf7ed2da2209b56c:3832:44) at http://localhost:3000/packages/minimongo.js?af9eb9d7447544ca9b839a3dcf7ed2da2209b56c:415:13 at _.extend.runTask (http://localhost:3000/packages/meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf:693:11) at _.extend.flush (http://localhost:3000/packages/meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf:721:10) at _.extend.drain (http://localhost:3000/packages/meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf:729:12)

Thank you for your time.

My webix view is defined as follows (I use ... for ommiting unecessary code):

{
 view: 'form', 
 url: webix.proxy('meteor', Meteor.users), 
 elements: [ 
    { id: '_id', view: 'text', name: '_id', label: 'ID', ...}, 
    { id: 'name', view: 'text', ...}, 
    { id: 'surname', ...}, 
    { view: 'button', label: 'Save', type: 'form', click: function(){ ... } } 
}
@awsp
Copy link

awsp commented Apr 28, 2016

+1
ran into the exact same problem too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants