Ejemplo n.º 1
0
 /**
  * On callback response, the inner HTMl of the label is updated.
  * @param string the text value of the label
  */
 public function setText($value)
 {
     parent::setText($value);
     if ($this->getActiveControl()->canUpdateClientSide()) {
         $this->getPage()->getCallbackClient()->update($this, $value);
     }
 }
Ejemplo n.º 2
0
 public function render($writer)
 {
     if ($this->getVisible()) {
         $writer->writeLine("<table><tr><td>");
         $hplnk = new THyperLink();
         if ($this->getNavigateUrl() !== '') {
             $hplnk->setNavigateUrl($this->getURl());
         } else {
             $hplnk->setNavigateUrl($this->getFirstSubLnk());
         }
         $hplnk->setText($this->getText());
         if ($this->isInPage()) {
             $hplnk->setCssClass($this->getActCss());
         } else {
             $hplnk->setCssClass($this->getIActCss());
         }
         $hplnk->render($writer);
         if (!$this->getColapse() || $this->isInPage()) {
             $writer->writeLine("<table>");
             foreach ($this->getControls() as $item) {
                 if ($item instanceof AxListMenuItem || $item instanceof AxListMenuColl) {
                     $item->render($writer);
                 }
             }
             $writer->writeLine("</table>");
             $writer->writeLine("</td></tr></table>");
         }
     }
 }
Ejemplo n.º 3
0
 /**
  * Initializes the specified cell to its initial values.
  * This method overrides the parent implementation.
  * It creates a hyperlink within the cell.
  * @param TTableCell the cell to be initialized.
  * @param integer the index to the Columns property that the cell resides in.
  * @param string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem)
  */
 public function initializeCell($cell, $columnIndex, $itemType)
 {
     if ($itemType === TListItemType::Item || $itemType === TListItemType::AlternatingItem || $itemType === TListItemType::SelectedItem || $itemType === TListItemType::EditItem) {
         $link = new THyperLink();
         if (($url = $this->getImageUrl()) !== '') {
             $link->setImageUrl($url);
             if (($width = $this->getImageWidth()) !== '') {
                 $link->setImageWidth($width);
             }
             if (($height = $this->getImageHeight()) !== '') {
                 $link->setImageHeight($height);
             }
         }
         $link->setText($this->getText());
         $link->setNavigateUrl($this->getNavigateUrl());
         $link->setTarget($this->getTarget());
         if ($this->getDataTextField() !== '' || $this->getDataNavigateUrlField() !== '') {
             $link->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn'));
         }
         $cell->getControls()->add($link);
         $cell->registerObject('HyperLink', $link);
     } else {
         parent::initializeCell($cell, $columnIndex, $itemType);
     }
 }