-
Notifications
You must be signed in to change notification settings - Fork 6
Upgrading to gaffa 1.5.0
Kory Nunn edited this page Apr 16, 2014
·
3 revisions
gaffa.[views/actions/behaviours].constructors should not be used. It has moved to gaffa.[views/actions/behaviours]._constructors, and this will be moved to be a private variable in a later release. DO NOT USE IT.
Gaffa.Property now supports .getTransform
This means you can bind to a model value, but transform the data that is there, via an expression, before the view displays it.
This is very useful in conjunction with .setTransform
example:
var textbox = new Textbox();
textbox.value.binding = '[prop]';
textbox.setTransform = '(split value " ")';
textbox.getTransform = '(apply join (concat (array " ") value))';
This will result in a textbox whos value is bound to an array of strings. It will display a joined string, and it will set an array.