You're viewing an older version of Framework JavaDoc. Please see version 7.7.46 for the latest.
com.vaadin.client.metadata.

Class OnStateChangeMethod

  • public class OnStateChangeMethod
    extends Object

    Encapsulates the data that the widgetset compiler generates for supporting a connector method annotated with OnStateChange

    Since:

    7.2

    Author:

    Vaadin Ltd

    • Constructor Detail

      • OnStateChangeMethod

        public OnStateChangeMethod​(String methodName,
                                   String[] properties)

        Creates a new instance based on a method name, a list of parameters names and a list of properties to listen for.

        Parameters:

        methodName - the name of the method to call

        properties - an array of state property names to listen to

      • OnStateChangeMethod

        public OnStateChangeMethod​(Class<?> declaringClass,
                                   String methodName,
                                   String[] properties)

        Creates a new instance based on declaring class, a method name, a list of parameters names and a list of properties to listen for.

        If the declaring class is null, the method is found based on the type of the connector that fired the state change event.

        Parameters:

        declaringClass - the class in which the target method is declared, or null to use the class of the connector firing the event

        methodName - the name of the method to call

        properties - an array of state property names to listen to

    • Method Detail

      • invoke

        public void invoke​(StateChangeEvent stateChangeEvent)

        Invokes the listener method for a state change.

        Parameters:

        stateChangeEvent - the state change event

      • getProperties

        public List<String> getProperties()

        Gets the list of state property names to listen for.

        Returns:

        the list of state property names to listen for