- function setLink(target, owner, data, property, immediate) {
- var direction = data.direction,
- formated = form(target, owner, data.property, property, direction),
- callback,
- value;
-
- owner = formated.owner;
- target = formated.target;
-
- callback = updateValue.bind(null, data, owner, target);
-
- owner.component.on(owner.property, callback, target.component.name);
-
- if (immediate) {
- value = getValue(owner);
-
- if (notEmpty(value)) {
- updateValue(data, owner, target, value);
- }
- }
- }