Class SecuredButton

    • Constructor Detail

      • SecuredButton

        public SecuredButton​(String id,
                             String... roles)
        Constructor
        Parameters:
        id - the markup id
        roles - list of roles allowed to enable the button
      • SecuredButton

        public SecuredButton​(String id,
                             com.googlecode.wicket.jquery.core.IJQuerySecurityProvider provider,
                             String... roles)
        Constructor
        Parameters:
        id - the markup id
        provider - the IJQuerySecurityProvider that will check roles
        roles - list of roles allowed to enable the button
      • SecuredButton

        public SecuredButton​(String id,
                             IModel<String> model,
                             String... roles)
        Constructor
        Parameters:
        id - the markup id
        model - the IModel
        roles - list of roles allowed to enable the button
      • SecuredButton

        public SecuredButton​(String id,
                             IModel<String> model,
                             com.googlecode.wicket.jquery.core.IJQuerySecurityProvider provider,
                             String... roles)
        Constructor
        Parameters:
        id - the markup id
        model - the IModel
        provider - the IJQuerySecurityProvider
        roles - list of roles allowed to enable the button
    • Method Detail

      • setRoles

        public void setRoles​(String[] roles)
        Sets the roles allowed to enable the button
        Parameters:
        roles - list of roles allowed to enable the button
      • isLocked

        public final boolean isLocked()
        Indicates whether the button is locked.
        Returns:
        the result of IJQuerySecurityProvider.hasRole(String...)