/** @param array $objects of $type to derive the options from 
	 * @param string $type of the objects, must have a ClassDescriptor that supports ::getPeanutWithId
	 */
	function setOptionsFromObjects($objects, $type) {
		$options = array();
		$cnv = $this->getConverter();
		$this->optionsMaxLength = 0;
		$selectedIdInOptions = false;
		$clsDes = PntClassDescriptor::getInstance($type);
		$idProp = $clsDes->getPropertyDescriptor('id');
		$cnv->initFromProp($idProp);
		forEach($objects as $obj) 
			if ($this->addOptionFromObject($options, $obj, $type, $cnv, $idProp)) 
				$selectedIdInOptions = true;
				
		if ($this->getSelectedId() && !$selectedIdInOptions) {
			$selectedItem = $clsDes->getPeanutWithId($this->getSelectedId());
			if ($selectedItem) 
				$this->addOptionFromObject($options, $selectedItem, $type, $cnv, $idProp);
		}
		$this->setOptions($options);
	}