public class ElementGuard extends Object
data-constraint attributes. Toggles the
element's visibility depending on the AuthorisationDecision result.| Modifier and Type | Class and Description |
|---|---|
static class |
ElementGuard.Toggle
Toggle the CSS class
CSS.rbacHidden based on the element's constraints. |
static class |
ElementGuard.Visible
Predicate which returns only visible elements (elements which don't have the CSS class
CSS.hidden). |
| Modifier and Type | Method and Description |
|---|---|
static void |
processElements(AuthorisationDecision authorisationDecision,
elemental2.dom.HTMLElement element) |
static void |
processElements(AuthorisationDecision authorisationDecision,
String selector) |
static void |
toggle(elemental2.dom.HTMLElement element,
boolean condition)
Adds the
CSS.rbacHidden CSS class if condition == true, removes it
otherwise. |
public static void toggle(elemental2.dom.HTMLElement element,
boolean condition)
CSS.rbacHidden CSS class if condition == true, removes it
otherwise.public static void processElements(AuthorisationDecision authorisationDecision, String selector)
public static void processElements(AuthorisationDecision authorisationDecision, elemental2.dom.HTMLElement element)
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.