02-08-2017 02:12 AM
Suppose we have "Checkbox" control, and I want to use it's "setValue(value)" method. How should I achieve it? Is it possible to use aikau widgets as classic objects in pages?
Your answer is very much appreciated.
02-18-2017 10:09 AM
I don't know if you have really understood the concept behind Aikau. You typically do not use widgets as instances directly in some arbitrary page context - instead you configure a page as a declarative JSON model of widget compositions which use their internal lifecycle operations and pubSub publication to setup and interoperate at runtime. Typically there should be no need for you to call the setValue() operation on any form control, as the enclosing alfresco/forms/Form widget will already handle pushing a complete view of all the form values onto the relevant consistuent controls.
If you really must set a value in a form control dynamically, the alfresco/forms/BaseFormControl (a super "class" of CheckBox) provides an autoSetConfig paramater to setup rules to react to other form controls, and the Form itself provides a setValueTopic that can be used to update the values of the form as a whole.
02-18-2017 10:09 AM
I don't know if you have really understood the concept behind Aikau. You typically do not use widgets as instances directly in some arbitrary page context - instead you configure a page as a declarative JSON model of widget compositions which use their internal lifecycle operations and pubSub publication to setup and interoperate at runtime. Typically there should be no need for you to call the setValue() operation on any form control, as the enclosing alfresco/forms/Form widget will already handle pushing a complete view of all the form values onto the relevant consistuent controls.
If you really must set a value in a form control dynamically, the alfresco/forms/BaseFormControl (a super "class" of CheckBox) provides an autoSetConfig paramater to setup rules to react to other form controls, and the Form itself provides a setValueTopic that can be used to update the values of the form as a whole.
Explore our Alfresco products with the links below. Use labels to filter content by product module.