this.fieldName,
this.sce,
this.constraint,
!this.readOnly );
if ( !this.readOnly ) {
enumDropDown.setOnValueChangeCommand( new Command() {
public void execute() {
executeOnValueChangeCommand();
}
} );
}
return enumDropDown;
}
//Date picker
boolean isCEPOperator = false;
if ( this.constraint instanceof HasOperator ) {
isCEPOperator = SuggestionCompletionEngine.isCEPOperator( ((HasOperator) this.constraint).getOperator() );
}
if ( SuggestionCompletionEngine.TYPE_DATE.equals( this.fieldType ) || (SuggestionCompletionEngine.TYPE_THIS.equals( this.fieldType ) && isCEPOperator) ) {
DatePickerLabel datePicker = new DatePickerLabel( constraint.getValue() );
this.constraint.setValue( datePicker.getDateString() );
if ( !this.readOnly ) {
datePicker.addValueChanged( new ValueChanged() {
public void valueChanged(String newValue) {
executeOnValueChangeCommand();
constraint.setValue( newValue );
}
} );
return datePicker;
} else {
return new SmallLabel( this.constraint.getValue() );
}
}
//Default editor
if ( !this.readOnly ) {
DefaultLiteralEditor dle = new DefaultLiteralEditor( this.constraint,
this.isNumeric );
dle.setOnValueChangeCommand( new Command() {
public void execute() {
executeOnValueChangeCommand();
}
} );