Class LockDemandDetector


  • @Dependent
    public class LockDemandDetector
    extends Object
    • Constructor Detail

      • LockDemandDetector

        public LockDemandDetector()
    • Method Detail

      • isLockRequired

        public boolean isLockRequired​(com.google.gwt.user.client.Event event)
        Determines whether or not the provided event indicates a change and therefore demands a lock. The decision is based on:

        • An optional custom DOM attribute which can be placed on the target element or any of its parent elements (data-uf-lock="[true|false]")

        • A global default list of tag exclusions for click events (i.e. clicking on select element shouldn't cause a lock since the selection will later cause a change event) and a DOM attribute to override this default behavior for click events (data-uf-lock-on-click="[true|false]")
          Parameters:
          event - the DOM event
          Returns:
          true, if a lock is required, otherwise false.
        • getLockDemandEventTypes

          public int getLockDemandEventTypes()
          Returns the bitmask of all events that can potentially indicate a lock demand. The actually event should be passed to isLockRequired(Event) to account for fine-tuning (i.e. via custom configuration).