<?php


class ViewAjax {

	protected $_tbl;
	protected $_label;
	protected $_zasobID;

	protected function generateHtmlID() {
		return $this->_tbl;//TODO: uniqid($this->_tbl);
	}

	public function setLabel($label) {
		$this->_label = $label;
		$this->_saveState('_label');
	}

	public function getHtmlID() {
		return $this->_htmlID;
	}

	public function getLabel() {
		if (!empty($this->_label)) {
			return V::strShortUtf8($this->_label, 20);
		}
		return "{$this->_tbl}";
	}

	public function getLabelHtml() {
		if (!empty($this->_label)) {
			return V::strShortUtf8($this->_label, 20) . " <em>({$this->_tbl})</em>";
		}
		return "{$this->_tbl}";
	}

	protected function _saveState($key = null) {
	}

}
