How do we use Aikau widget functions?

cancel
Showing results for 
Search instead for 
Did you mean: 
munkh-itgel
Member II

How do we use Aikau widget functions?

Jump to solution

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 Solution

Accepted Solutions
afaust
Master

Re: How do we use Aikau widget functions?

Jump 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.

View solution in original post

1 Reply
afaust
Master

Re: How do we use Aikau widget functions?

Jump 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.