The State Object

MetalJS’s component class, which your view component extends, extends MetalJS’s state class. The state class provides a STATE object that contains state properties, as well as watches these properties for changes. Any template parameters defined in your portlet classes are automatically added as properties to the portlet’s STATE object. The component class provides additional rendering logic, such as automatically re-rendering the component when the state class detects a change in a state property. This means that you can change a state property on the client-side and automatically see that change reflected in the component’s UI!

This section of tutorials covers how to configure and use your Soy portlet’s STATE object.

Was this article helpful?
0 out of 0 found this helpful