|
@@ -445,6 +445,12 @@ export default class View {
|
|
|
* @return {Function}
|
|
* @return {Function}
|
|
|
*/
|
|
*/
|
|
|
_getModelBinder( valueSchema ) {
|
|
_getModelBinder( valueSchema ) {
|
|
|
|
|
+ // Normalize attributes with additional data like namespace:
|
|
|
|
|
+ // class: { ns: 'abc', value: [ ... ] }
|
|
|
|
|
+ if ( valueSchema.value ) {
|
|
|
|
|
+ valueSchema = valueSchema.value;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
valueSchema = normalizeBinderValueSchema( valueSchema );
|
|
valueSchema = normalizeBinderValueSchema( valueSchema );
|
|
|
|
|
|
|
|
// Assembles the value using {@link ui.TemplateValueSchema} and stores it in a form of
|
|
// Assembles the value using {@link ui.TemplateValueSchema} and stores it in a form of
|
|
@@ -677,6 +683,12 @@ function normalizeBinderValueSchema( valueSchema ) {
|
|
|
* @returns {Boolean}
|
|
* @returns {Boolean}
|
|
|
*/
|
|
*/
|
|
|
function hasModelBinding( valueSchema ) {
|
|
function hasModelBinding( valueSchema ) {
|
|
|
|
|
+ // Normalize attributes with additional data like namespace:
|
|
|
|
|
+ // class: { ns: 'abc', value: [ ... ] }
|
|
|
|
|
+ if ( valueSchema.value ) {
|
|
|
|
|
+ valueSchema = valueSchema.value;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if ( Array.isArray( valueSchema ) ) {
|
|
if ( Array.isArray( valueSchema ) ) {
|
|
|
return valueSchema.some( hasModelBinding );
|
|
return valueSchema.some( hasModelBinding );
|
|
|
} else if ( valueSchema.model ) {
|
|
} else if ( valueSchema.model ) {
|