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.
Solved! Go to Solution.
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.
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.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.