public void addViewListener(final YController controller) {
        this.addItemListener(new ItemListener() {
	        public void itemStateChanged(ItemEvent ev) {
	            if (ev.getStateChange() == ItemEvent.SELECTED) {
//	                checking if event is really triggered by user...
	                if (!settingModelValue) {
	                    // if combo is in "forceListItem" mode and the field is not editable, 
	                    // we return the last valid value so that the selection is cancelled:
	                    if (!isEditable() && forceListItem) {
	                        try {
	                            setModelValue(validValue);
	                        } catch (YException ex) {
	                            controller.handleException(ex);
	                        }
	                    } else {
                            // updating model only if editing has truly stopped (focus is lost from editor):
                            if (!updateModelOnlyWhenFocusLost) {
                                controller.updateModelAndController(YComboBox.this);
                                if (moveCaretInSelection) editorField.setCaretPosition(0);
                            }    
	                    }
	                }
	            }
	        }
	    });
        this.editorField.addFocusListener(new FocusAdapter() {
            public void focusLost(FocusEvent e) {
                if (updateModelOnlyWhenFocusLost) {
                    controller.updateModelAndController(YComboBox.this);
                }
            }
            
        });
	}