public function addCheckedList($items=array(), $masterItem=NULL, $values=array(),$notAllChecked=false,$name=null) {
		$count=$this->count();
		$identifier=$this->identifier . "-" . $count;
		if (isset($masterItem)) {
			if(\is_array($masterItem)){
				$masterO=new HtmlFormCheckbox("master-" . $identifier, @$masterItem[0],@$masterItem[1]);
				if(isset($name))
					$masterO->setName($name);
				if(isset($masterItem[1])){
					if(\array_search($masterItem[1], $values)!==false){
						$masterO->getDataField()->setProperty("checked", "");
					}
				}
			}else{
				$masterO=new HtmlFormCheckbox("master-" . $identifier, $masterItem);
			}
			if($notAllChecked){
				$masterO->getDataField()->addClass("_notAllChecked");
			}
			$masterO->getHtmlCk()->addToProperty("class", "master");
			$masterO->setClass("item");
			$this->addItem($masterO);
		}
		$fields=array ();
		$i=0;
		foreach ( $items as $val => $caption ) {
			$itemO=new HtmlFormCheckbox($identifier . "-" . $i++, $caption, $val, "child");
			if (\array_search($val, $values) !== false) {
				$itemO->getDataField()->setProperty("checked", "");
			}
			if(isset($name))
				$itemO->setName($name);
			$itemO->setClass("item");
			$fields[]=$itemO;
		}
		if (isset($masterO) === true) {
			$list=new HtmlList("", $fields);
			$list->setClass("list");
			$masterO->addContent($list);
		} else {
			$this->addList($fields);
		}
		$this->_hasCheckedList=true;
		return $this;
	}