Package org.uberfire.client.mvp
Class LockDemandDetector
- java.lang.Object
-
- org.uberfire.client.mvp.LockDemandDetector
-
@Dependent public class LockDemandDetector extends Object
-
-
Constructor Summary
Constructors Constructor Description LockDemandDetector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetLockDemandEventTypes()Returns the bitmask of all events that can potentially indicate a lock demand.booleanisLockRequired(com.google.gwt.user.client.Event event)Determines whether or not the provided event indicates a change and therefore demands a lock.
-
-
-
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.
- An optional custom DOM attribute which can be placed on the target
element or any of its parent elements (data-uf-lock="[true|false]")
-
getLockDemandEventTypes
public int getLockDemandEventTypes()
Returns the bitmask of all events that can potentially indicate a lock demand. The actually event should be passed toisLockRequired(Event)to account for fine-tuning (i.e. via custom configuration).
-
-