/**
  * Returns the HTML-Code for a single Item
  * 
  * @param QListItem $objItem
  * @return string resulting HTML
  */
 protected function GetItemHtml(QListItem $objItem)
 {
     // The Default Item Style
     if ($this->objItemStyle) {
         $objStyler = clone $this->objItemStyle;
     } else {
         $objStyler = new QListItemStyle();
     }
     // Apply any Style Override (if applicable)
     if ($objStyle = $objItem->ItemStyle) {
         $objStyler->Override($objStyle);
     }
     $objStyler->SetHtmlAttribute('value', $objItem->Empty ? '' : $objItem->Id);
     if ($objItem->Selected) {
         $objStyler->SetHtmlAttribute('selected', 'selected');
     }
     $strHtml = QHtml::RenderTag('option', $objStyler->RenderHtmlAttributes(), QApplication::HtmlEntities($objItem->Name), false, true) . _nl();
     return $strHtml;
 }
 /**
  * Return the item styler for the given item. Combines the generic item styles found in this class with
  * any specific item styles found in the item.
  *
  * @param mixed $objItem
  * @return QListItemStyle
  */
 protected function GetItemStyler($objItem)
 {
     if ($this->objItemStyle) {
         $objStyler = clone $this->objItemStyle;
     } else {
         $objStyler = new QListItemStyle();
     }
     $objStyler->SetHtmlAttribute('id', $objItem->Id);
     // since we are going to embed the value in the tag, we are going to encrypt it in case its a database record id.
     if ($objItem->Value) {
         if ($this->blnEncryptValues) {
             $strValue = $this->EncryptValue($objItem->Value);
         } else {
             $strValue = $objItem->Value;
         }
         $objStyler->SetDataAttribute('value', $strValue);
     }
     if ($objStyle = $objItem->ItemStyle) {
         $objStyler->Override($objStyle);
     }
     return $objStyler;
 }