public void setModelValue(Object obj) throws YException {
	    if (obj == null) {
	        this.setSelectedIndex(-1);
	    } else {
	        // searching corresponding item in list:
	        if (items == null) {
	            throw new YException("List model for YList is not set.");
	        } else {
	            for (int i=0; i < this.items.length; i++) {
	                YListItem item = (YListItem)items[i];
	                if (this.modelField == null) {
	                    if (obj.equals(item.getItemModel())) {
	                        this.setSelectedValue(item, true);
	                    }
	                } else {
	                    Object value = YCoreToolkit.getBeanValue(item.getItemModel(), modelField);
	                    if (obj.equals(value)) {
	                        this.setSelectedValue(item, true);
	                    }
	                }
	            }

	        }
	    }
	}