Search in sources :

Example 1 with AccessCertificationRemediationStyleType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.AccessCertificationRemediationStyleType in project midpoint by Evolveum.

the class DefinitionBasicPanel method initBasicInfoLayout.

private void initBasicInfoLayout() {
    final TextField nameField = new TextField(ID_NAME, new PropertyModel<>(getModel(), CertDefinitionDto.F_NAME));
    nameField.add(new VisibleEnableBehaviour() {

        @Override
        public boolean isEnabled() {
            return true;
        }
    });
    add(nameField);
    final TextArea descriptionField = new TextArea(ID_DESCRIPTION, new PropertyModel<>(getModel(), CertDefinitionDto.F_DESCRIPTION));
    descriptionField.add(new VisibleEnableBehaviour() {

        @Override
        public boolean isEnabled() {
            return true;
        }
    });
    add(descriptionField);
    final WebMarkupContainer ownerRefChooser = createOwnerRefChooser(ID_OWNER_REF_CHOOSER);
    ownerRefChooser.setOutputMarkupId(true);
    add(ownerRefChooser);
    DropDownChoice remediation = new DropDownChoice<>(ID_REMEDIATION, new Model<AccessCertificationRemediationStyleType>() {

        @Override
        public AccessCertificationRemediationStyleType getObject() {
            return getModel().getObject().getRemediationStyle();
        }

        @Override
        public void setObject(AccessCertificationRemediationStyleType object) {
            getModel().getObject().setRemediationStyle(object);
        }
    }, WebComponentUtil.createReadonlyModelFromEnum(AccessCertificationRemediationStyleType.class), new EnumChoiceRenderer<>(this));
    add(remediation);
    DropDownChoice outcomeStrategy = new DropDownChoice<>(ID_OUTCOME_STRATEGY, new PropertyModel<>(getModel(), CertDefinitionDto.F_OUTCOME_STRATEGY), WebComponentUtil.createReadonlyModelFromEnum(AccessCertificationCaseOutcomeStrategyType.class), new EnumChoiceRenderer<>(this));
    add(outcomeStrategy);
    add(WebComponentUtil.createHelp(ID_OUTCOME_STRATEGY_HELP));
    Label stopReviewOn = new Label(ID_STOP_REVIEW_ON, new AbstractReadOnlyModel<String>() {

        @Override
        public String getObject() {
            List<AccessCertificationResponseType> stopOn = getModel().getObject().getStopReviewOn();
            return CertMiscUtil.getStopReviewOnText(stopOn, getPageBase());
        }
    });
    add(stopReviewOn);
    //        add(new Label(ID_REVIEW_STAGE_CAMPAIGNS, new PropertyModel<>(getModel(), CertDefinitionDto.F_NUMBER_OF_STAGES)));
    //        add(new Label(ID_CAMPAIGNS_TOTAL, new PropertyModel<>(getModel(), CertDefinitionDto.F_NUMBER_OF_STAGES)));
    add(new Label(ID_LAST_STARTED, new PropertyModel<>(getModel(), CertDefinitionDto.F_LAST_STARTED)));
    add(new Label(ID_LAST_CLOSED, new PropertyModel<>(getModel(), CertDefinitionDto.F_LAST_CLOSED)));
    add(WebComponentUtil.createHelp(ID_LAST_STARTED_HELP));
    add(WebComponentUtil.createHelp(ID_LAST_CLOSED_HELP));
}
Also used : TextArea(org.apache.wicket.markup.html.form.TextArea) Label(org.apache.wicket.markup.html.basic.Label) PropertyModel(org.apache.wicket.model.PropertyModel) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) DropDownChoice(org.apache.wicket.markup.html.form.DropDownChoice) AccessCertificationRemediationStyleType(com.evolveum.midpoint.xml.ns._public.common.common_3.AccessCertificationRemediationStyleType) AccessCertificationCaseOutcomeStrategyType(com.evolveum.midpoint.xml.ns._public.common.common_3.AccessCertificationCaseOutcomeStrategyType) TextField(org.apache.wicket.markup.html.form.TextField) List(java.util.List) VisibleEnableBehaviour(com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)

Aggregations

VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)1 AccessCertificationCaseOutcomeStrategyType (com.evolveum.midpoint.xml.ns._public.common.common_3.AccessCertificationCaseOutcomeStrategyType)1 AccessCertificationRemediationStyleType (com.evolveum.midpoint.xml.ns._public.common.common_3.AccessCertificationRemediationStyleType)1 List (java.util.List)1 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)1 Label (org.apache.wicket.markup.html.basic.Label)1 DropDownChoice (org.apache.wicket.markup.html.form.DropDownChoice)1 TextArea (org.apache.wicket.markup.html.form.TextArea)1 TextField (org.apache.wicket.markup.html.form.TextField)1 PropertyModel (org.apache.wicket.model.PropertyModel)1