Hi friends,
Is there any UI functonality in WDK framework to hide or unhide(visible) button based on role.
Regards,
Purushotham Chintireddy
Not sure if there is a configuration option, but you can definitely customize the JSP to query for the group and use if-else to include button or not.
Action Preconditions and Qualifiers do that stuff
Functionality: On click login button. The validation should be done and if the user belongs to the specific role than the button should be visible else the button should be disabled or hidden.
In this scenario can i use dmfx:actionbutton to enable and disable button.
Does not look like real-life example, login button could not know anything about user and roles
I would like to know can we use dmfx:actionbutton to enable and disbale button dynamically.
behaviour of actionbuttont tag depends on availability of corresponding action, action can be hidden completely using qualifier (WDK Dev Guide: The configuration service uses the user’s context to resolve the appropriate scoped definition and
deliver the application, action, or component that is defined for the scope. Scope is defined by a
qualifier class that implements the IQualifier interface.) or disabled by precondition (WDK Dev Guide: Action precondition classes are called to determine whether an action can be performed. The
precondition class determines whether to render an action control as enabled or disabled.
Preconditions are optional in the action definition. If no preconditions are defined, the action will
always execute.)