}
}
//Label if read-only
if ( this.readOnly ) {
return new SmallLabel( assertValue() );
}
//Enumeration (these support multi-select for "in" and "not in", so check before comma separated lists)
if ( this.dropDownData != null ) {
final String operator = constraint.getOperator();
final boolean multipleSelect = OperatorsOracle.operatorRequiresList( operator );
EnumDropDown enumDropDown = new EnumDropDown( constraint.getValue(),
new DropDownValueChanged() {
public void valueChanged( String newText,
String newValue ) {
//Prevent recursion once value change has been applied
if ( !newValue.equals( constraint.getValue() ) ) {
constraint.setValue( newValue );
executeOnValueChangeCommand();
makeDirty();
}
}
},
dropDownData,
multipleSelect,
modeller.getPath() );
return enumDropDown;
}
//Comma separated value list (this will become a dedicated Widget but for now a TextBox suffices)
String operator = null;
if ( this.constraint instanceof SingleFieldConstraint ) {
SingleFieldConstraint sfc = (SingleFieldConstraint) this.constraint;
operator = sfc.getOperator();
}
if ( OperatorsOracle.operatorRequiresList( operator ) ) {
final TextBox box = TextBoxFactory.getTextBox( DataType.TYPE_STRING );
box.setStyleName( "constraint-value-Editor" );
box.addValueChangeHandler( new ValueChangeHandler<String>() {
public void onValueChange( final ValueChangeEvent<String> event ) {
constraint.setValue( event.getValue() );
executeOnValueChangeCommand();
makeDirty();
}
} );
box.setText( assertValue() );
attachDisplayLengthHandler( box );
return box;
}
//Date picker
boolean isCEPOperator = CEPOracle.isCEPOperator( ( this.constraint ).getOperator() );
if ( DataType.TYPE_DATE.equals( this.fieldType ) || ( DataType.TYPE_THIS.equals( this.fieldName ) && isCEPOperator ) ) {
if ( this.readOnly ) {
return new SmallLabel( constraint.getValue() );
}
final PopupDatePicker dp = new PopupDatePicker( false );
// Wire up update handler