javascript - Backbone Forms: pass event between different subviews -



javascript - Backbone Forms: pass event between different subviews -

brief:

backbone forms framework achieved subviews totally unbind , don't know each other @ all. question appears - how pass event between different subviews?

in other words:

suppose have parent form object extends backbone.form , contains lot of fields. have can pass event parent specific field (subview) of form?

you can communicate straight form field doing:

var form = new backbone.form({ schema: schema }); var field = form.getfield('firstname');

here's illustration communicating between 2 different fields using events. in case, changing options in city based on value selected in country .

http://jsfiddle.net/evilcelery/c5qhr/

javascript backbone.js backbone-forms

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -