Class ElementGuard


  • public class ElementGuard
    extends Object
    Helper class to process elements with constraints in their data-constraint attributes. Toggles the element's visibility depending on the AuthorisationDecision result.
    • Method Detail

      • toggle

        public static void toggle​(elemental2.dom.HTMLElement element,
                                  boolean condition)
        Adds the CSS.rbacHidden CSS class if condition == true, removes it otherwise.
      • processElements

        public static void processElements​(AuthorisationDecision authorisationDecision,
                                           elemental2.dom.HTMLElement element)