public void valueChanged(String newText, String newValue) { //Prevent recursion once value change has been applied if (!newValue.equals(constraint.getValue())) { constraint.setValue(newValue); executeOnValueChangeCommand(); } } },
public void valueChanged(String newText, String newValue) { //Prevent recursion once value change has been applied if (!newValue.equals(constraint.getValue())) { constraint.setValue(newValue); executeOnValueChangeCommand(); } } },
public void onChange( ChangeEvent event ) { c.setValue( getText() ); } } );
public void onChange( ChangeEvent event ) { c.setValue( getText() ); } } );
@Override public void onValueChange(final ValueChangeEvent<Date> event) { final Date date = datePicker.getValue(); final String sDate = (date == null ? null : DATE_FORMATTER.format(datePicker.getValue())); boolean update = constraint.getValue() == null || !constraint.getValue().equals(sDate); constraint.setValue(sDate); if (update) { executeOnValueChangeCommand(); } } });
@Override public void onValueChange(final ValueChangeEvent<Date> event) { final Date date = datePicker.getValue(); final String sDate = (date == null ? null : DATE_FORMATTER.format(datePicker.getValue())); boolean update = constraint.getValue() == null || !constraint.getValue().equals(sDate); constraint.setValue(sDate); if (update) { executeOnValueChangeCommand(); } } });
void setUpTextBoxStyleAndHandlers(final TextBox box, final Command onChangeCommand) { box.setStyleName("constraint-value-Editor"); box.addValueChangeHandler((e) -> { constraint.setValue(e.getValue()); if (onChangeCommand != null) { onChangeCommand.execute(); } }); }
void setUpTextBoxStyleAndHandlers(final TextBox box, final Command onChangeCommand) { box.setStyleName("constraint-value-Editor"); box.addValueChangeHandler((e) -> { constraint.setValue(e.getValue()); if (onChangeCommand != null) { onChangeCommand.execute(); } }); }
if (value.contains("@{")) { con.setConstraintValueType(BaseSingleFieldConstraint.TYPE_TEMPLATE); con.setValue(unwrapTemplateKey(value)); } else if (value.startsWith("\"")) { con.setConstraintValueType(SingleFieldConstraint.TYPE_LITERAL); con.setValue(value.substring(1, value.length() - 1)); } else if (value.startsWith("(")) { if (operator != null && operator.contains("in")) { con.setConstraintValueType(SingleFieldConstraint.TYPE_LITERAL); con.setValue(unwrapParenthesis(value)); } else { con.setConstraintValueType(SingleFieldConstraint.TYPE_RET_VALUE); con.setValue(unwrapParenthesis(value)); con.setConstraintValueType(SingleFieldConstraint.TYPE_LITERAL); con.setValue(value);
public void onClick(ClickEvent event) { //Reset Constraint's value and value type if (Window.confirm(GuidedRuleEditorResources.CONSTANTS.RemoveConstraintValueDefinitionQuestion())) { constraint.setConstraintValueType(BaseSingleFieldConstraint.TYPE_UNDEFINED); constraint.setValue(null); constraint.clearParameters(); constraint.setExpressionValue(new ExpressionFormLine()); doTypeChosen(); } } });
public void onClick(ClickEvent event) { //Reset Constraint's value and value type if (Window.confirm(GuidedRuleEditorResources.CONSTANTS.RemoveConstraintValueDefinitionQuestion())) { constraint.setConstraintValueType(BaseSingleFieldConstraint.TYPE_UNDEFINED); constraint.setValue(null); constraint.clearParameters(); constraint.setExpressionValue(new ExpressionFormLine()); doTypeChosen(); } } });