public void onClick( ClickEvent event ) {
String id = customFormPopUp.getFormId();
String value = customFormPopUp.getFormValue();
btnCustomForm.setText( value );
selectedValue = new DSLComplexVariableValue( id,
value );
updateSentence();
makeDirty();
customFormPopUp.hide();
}
} );
//if selectedValue is an instance of DSLComplexVariableValue,
//then both id and value are passed to the custom form
//if not, only the value is passed and "" is passed as id
if ( selectedValue instanceof DSLComplexVariableValue ) {
DSLComplexVariableValue complexSelectedValue = (DSLComplexVariableValue) selectedValue;
customFormPopUp.show( complexSelectedValue.getId(),
complexSelectedValue.getValue() );
} else {
customFormPopUp.show( "",
selectedValue.getValue() );
}