Search in sources :

Example 11 with CCCheckBox

use of com.sun.web.ui.view.html.CCCheckBox in project OpenAM by OpenRock.

the class ActionTiledView method displayBooleanAction.

private boolean displayBooleanAction(ActionSchema actionSchema, String childName, int type, int syntax) {
    boolean display = (type == AMDisplayType.TYPE_SINGLE) && (syntax == AMDisplayType.SYNTAX_BOOLEAN);
    if (display) {
        RuleOpViewBeanBase parentVB = (RuleOpViewBeanBase) getParentViewBean();
        Set set = (!parentVB.isSubmitCycle()) ? parentVB.getCurrentActionValues(actionSchema) : parentVB.getDefaultActionValues(actionSchema);
        String value = ((set != null) && !set.isEmpty()) ? (String) set.iterator().next() : "false";
        CCCheckBox cb = (CCCheckBox) getChild(childName);
        cb.setValue(value.equals("true") ? "true" : "false");
    }
    return display;
}
Also used : Set(java.util.Set) CCCheckBox(com.sun.web.ui.view.html.CCCheckBox)

Aggregations

CCCheckBox (com.sun.web.ui.view.html.CCCheckBox)11 Set (java.util.Set)6 HashMap (java.util.HashMap)5 Map (java.util.Map)4 View (com.iplanet.jato.view.View)3 CCEditableList (com.sun.web.ui.view.editablelist.CCEditableList)3 HashSet (java.util.HashSet)3 OptionList (com.iplanet.jato.view.html.OptionList)2 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)2 UMUserPasswordResetOptionsModel (com.sun.identity.console.user.model.UMUserPasswordResetOptionsModel)2 Iterator (java.util.Iterator)2 List (java.util.List)2 ContainerView (com.iplanet.jato.view.ContainerView)1 TaskModel (com.sun.identity.console.task.model.TaskModel)1 EncodeAction (com.sun.identity.security.EncodeAction)1 OrderedSet (com.sun.identity.shared.datastruct.OrderedSet)1 CCDropDownMenu (com.sun.web.ui.view.html.CCDropDownMenu)1 CCPassword (com.sun.web.ui.view.html.CCPassword)1 CCSelectableList (com.sun.web.ui.view.html.CCSelectableList)1 CCStaticTextField (com.sun.web.ui.view.html.CCStaticTextField)1