Search in sources :

Example 1 with EvaluatedTriggerDto

use of com.evolveum.midpoint.web.page.admin.workflow.dto.EvaluatedTriggerDto in project midpoint by Evolveum.

the class EvaluatedTriggerPanel method initLayout.

protected void initLayout() {
    EvaluatedTriggerDto trigger = getModelObject();
    WebMarkupContainer frame = new WebMarkupContainer(ID_FRAME);
    if (trigger.isHighlighted()) {
        // TODO skin
        frame.add(new AttributeAppender("style", "background-color: #fcffd3"));
    }
    add(frame);
    frame.add(new Label(ID_MESSAGE, new LocalizableMessageModel(Model.of(trigger.getMessage()), this)));
    EvaluatedTriggerGroupDto children = trigger.getChildren();
    EvaluatedTriggerGroupPanel childrenPanel = new EvaluatedTriggerGroupPanel(ID_CHILDREN, Model.of(children));
    childrenPanel.setVisible(!children.getTriggers().isEmpty());
    frame.add(childrenPanel);
}
Also used : EvaluatedTriggerDto(com.evolveum.midpoint.web.page.admin.workflow.dto.EvaluatedTriggerDto) Label(org.apache.wicket.markup.html.basic.Label) EvaluatedTriggerGroupDto(com.evolveum.midpoint.web.page.admin.workflow.dto.EvaluatedTriggerGroupDto) LocalizableMessageModel(com.evolveum.midpoint.web.component.util.LocalizableMessageModel) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) AttributeAppender(org.apache.wicket.behavior.AttributeAppender)

Example 2 with EvaluatedTriggerDto

use of com.evolveum.midpoint.web.page.admin.workflow.dto.EvaluatedTriggerDto in project midpoint by Evolveum.

the class EvaluatedTriggerGroupPanel method initLayout.

private void initLayout() {
    ListView<EvaluatedTriggerDto> list = new ListView<EvaluatedTriggerDto>(ID_TRIGGERS, new PropertyModel<>(getModel(), EvaluatedTriggerGroupDto.F_TRIGGERS)) {

        @Override
        protected void populateItem(ListItem<EvaluatedTriggerDto> item) {
            EvaluatedTriggerDto trigger = item.getModelObject();
            item.add(new EvaluatedTriggerPanel(ID_TRIGGER, Model.of(trigger)));
        }
    };
    add(list);
}
Also used : ListView(org.apache.wicket.markup.html.list.ListView) EvaluatedTriggerDto(com.evolveum.midpoint.web.page.admin.workflow.dto.EvaluatedTriggerDto) ListItem(org.apache.wicket.markup.html.list.ListItem)

Aggregations

EvaluatedTriggerDto (com.evolveum.midpoint.web.page.admin.workflow.dto.EvaluatedTriggerDto)2 LocalizableMessageModel (com.evolveum.midpoint.web.component.util.LocalizableMessageModel)1 EvaluatedTriggerGroupDto (com.evolveum.midpoint.web.page.admin.workflow.dto.EvaluatedTriggerGroupDto)1 AttributeAppender (org.apache.wicket.behavior.AttributeAppender)1 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)1 Label (org.apache.wicket.markup.html.basic.Label)1 ListItem (org.apache.wicket.markup.html.list.ListItem)1 ListView (org.apache.wicket.markup.html.list.ListView)1