use of com.evolveum.midpoint.web.component.BootstrapLabel in project midpoint by Evolveum.
the class H3Header method initLayout.
@Override
protected void initLayout() {
Label title = new Label(ID_TITLE, new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
return getDisplayName();
}
});
add(title);
final IModel<List<InlineMenuItem>> items = new Model((Serializable) createMenuItems());
BootstrapLabel status = new BootstrapLabel(ID_STATUS, createStringResource("H3Header.label.error"), new Model(BootstrapLabel.State.DANGER));
status.add(createFetchErrorVisibleBehaviour());
add(status);
AjaxLink showMore = new AjaxLink(ID_SHOW_MORE) {
@Override
public void onClick(AjaxRequestTarget target) {
onShowMorePerformed(target);
}
};
showMore.add(createFetchErrorVisibleBehaviour());
add(showMore);
}
use of com.evolveum.midpoint.web.component.BootstrapLabel in project midpoint by Evolveum.
the class CheckTableHeader method initLayout.
private void initLayout() {
AjaxCheckBox check = new AjaxCheckBox(ID_CHECK, new PropertyModel<Boolean>(getModel(), ObjectWrapper.F_SELECTED)) {
private static final long serialVersionUID = 1L;
@Override
protected void onUpdate(AjaxRequestTarget target) {
}
};
add(check);
Label icon = new Label(ID_ICON);
icon.add(AttributeModifier.replace("class", new AbstractReadOnlyModel<String>() {
private static final long serialVersionUID = 1L;
@Override
public String getObject() {
return "check-table-header-icon " + createAccountIcon();
}
}));
add(icon);
Label trigger = new Label(ID_TRIGGER);
trigger.add(AttributeModifier.replace("title", new AbstractReadOnlyModel<String>() {
private static final long serialVersionUID = 1L;
@Override
public String getObject() {
return createTriggerTooltip();
}
}));
trigger.add(new TooltipBehavior());
trigger.add(new VisibleEnableBehaviour() {
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible() {
return hasTriggers();
}
});
add(trigger);
BootstrapLabel status = new BootstrapLabel(ID_STATUS, createStringResource("CheckTableHeader.label.error"), new Model<>(BootstrapLabel.State.DANGER));
status.add(createFetchErrorVisibleBehaviour());
add(status);
AjaxLink showMore = new AjaxLink(ID_SHOW_MORE) {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
onShowMorePerformed(target);
}
};
showMore.add(createFetchErrorVisibleBehaviour());
add(showMore);
AjaxLink link = new AjaxLink(ID_LINK) {
@Override
public void onClick(AjaxRequestTarget target) {
onClickPerformed(target);
}
};
add(link);
Label name = new Label(ID_NAME, new AbstractReadOnlyModel<String>() {
private static final long serialVersionUID = 1L;
@Override
public String getObject() {
return getDisplayName();
}
});
link.add(name);
Label description = new Label(ID_DESCRIPTION, new AbstractReadOnlyModel<String>() {
private static final long serialVersionUID = 1L;
@Override
public String getObject() {
return getDescription();
}
});
add(description);
ToggleIconButton expandButton = new ToggleIconButton(ID_EXPAND, GuiStyleConstants.CLASS_ICON_EXPAND, GuiStyleConstants.CLASS_ICON_COLLAPSE) {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
onClickPerformed(target);
}
@Override
public boolean isOn() {
return !CheckTableHeader.this.getModelObject().isMinimalized();
}
};
add(expandButton);
}
Aggregations