Class ThrottlingSettings

    • Constructor Detail

      • ThrottlingSettings

        public ThrottlingSettings​(Duration delay)
        Construct without id (will default to the component's markup ID) and postponeTimerOnUpdate set to false.
        Parameters:
        delay - throttle delay
      • ThrottlingSettings

        public ThrottlingSettings​(Duration delay,
                                  boolean postponeTimerOnUpdate)
        Construct without id (will default to the component's markup ID).
        Parameters:
        delay - throttle delay
        postponeTimerOnUpdate - postpone timer
      • ThrottlingSettings

        public ThrottlingSettings​(String id,
                                  Duration delay,
                                  boolean postponeTimerOnUpdate)
        Construct.
        Parameters:
        id - throttle id
        delay - the amount of time the action should be postponed
    • Method Detail

      • getDelay

        public Duration getDelay()
        Returns:
        the amount of time the action should be postponed
      • getId

        public String getId()
        This id is used by the client-side throttling code to keep track of the various event throttles. Normally you can just use any unique ID here, such as the component's markupId ( Component.getMarkupId()). To unite several different events with one throttle, give them the same ID. If this is null, it will (on the client only) default to the component's markupId.
        Returns:
        throttle id
      • getPostponeTimerOnUpdate

        public boolean getPostponeTimerOnUpdate()
        If it is set to true, then the timer is reset each time the throttle function gets called. Use this behaviour if you want something to happen at X milliseconds after the last call to throttle. If the parameter is not set, or set to false, then the timer is not reset.