use of com.evolveum.midpoint.web.component.input.ExpressionEditorPanel in project midpoint by Evolveum.
the class ConditionalSearchFilterEditor method initLayout.
protected void initLayout(PageResourceWizard parentPage) {
ExpressionEditorPanel expressionEditor = new ExpressionEditorPanel(ID_EXPRESSION_PANEL, new PropertyModel<>(getModel(), ConditionalSearchFilterType.F_CONDITION.getLocalPart()), parentPage) {
@Override
public void performExpressionHook(AjaxRequestTarget target) {
if (getExpressionDtoModel().getObject() != null) {
ExpressionType expression = getExpressionDtoModel().getObject().getExpressionObject();
ConditionalSearchFilterEditor.this.getModel().getObject().setCondition(expression);
}
}
@Override
public String getTypeLabelKey() {
return "ConditionalSearchFilterEditor.condition.type.label";
}
@Override
public String getDescriptionLabelKey() {
return "ConditionalSearchFilterEditor.condition.description.label";
}
@Override
public String getUpdateLabelKey() {
return "ConditionalSearchFilterEditor.condition.update.label";
}
@Override
public String getExpressionLabelKey() {
return "ConditionalSearchFilterEditor.condition.label";
}
};
add(expressionEditor);
SearchFilterPanel filterClauseEditor = new SearchFilterPanel<>(ID_FILTER_CLAUSE_PANEL, (NonEmptyModel<ConditionalSearchFilterType>) getModel(), parentPage.getReadOnlyModel());
add(filterClauseEditor);
}
use of com.evolveum.midpoint.web.component.input.ExpressionEditorPanel in project midpoint by Evolveum.
the class SynchronizationExpressionEditor method initLayout.
protected void initLayout(PageResourceWizard parentPage) {
Label label = new Label(ID_LABEL, new IModel<String>() {
@Override
public String getObject() {
return getString(getLabel());
}
});
add(label);
ExpressionEditorPanel expressionEditor = new ExpressionEditorPanel(ID_EXPRESSION_EDITOR, getModel(), parentPage);
add(expressionEditor);
}
Aggregations