cancel
Showing results for 
Search instead for 
Did you mean: 

How do we use Aikau widget functions?

munkh-itgel
Champ in-the-making
Champ in-the-making

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.

1 ACCEPTED ANSWER

afaust
Legendary Innovator
Legendary Innovator

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.

View answer in original post

1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator

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.