Ejemplo n.º 1
0
 public function renderAttributes(\blaze\web\application\BlazeContext $context, \blaze\web\component\UIComponent $component)
 {
     $messages = $context->getMessages($component->getFor());
     if (count($messages) > 0) {
         parent::renderAttributes($context, $component);
     }
 }
Ejemplo n.º 2
0
 public function renderAttributes(\blaze\web\application\BlazeContext $context, \blaze\web\component\UIComponent $component)
 {
     parent::renderAttributes($context, $component);
     $writer = $context->getResponse()->getWriter();
     $writer->write(' onclick="return commandLinkClick(this)" href="#"');
     $writer->write('>');
     $writer->write($component->getValue());
     $writer->write('</a>');
 }
Ejemplo n.º 3
0
 public function renderAttributes(\blaze\web\application\BlazeContext $context, \blaze\web\component\UIComponent $component)
 {
     parent::renderAttributes($context, $component);
     $writer = $context->getResponse()->getWriter();
     $dir = $component->getDir();
     if ($dir != null) {
         $writer->write(' dir="' . $dir . '"');
     }
     $writer->write('>');
 }
Ejemplo n.º 4
0
 public function renderChildren(\blaze\web\application\BlazeContext $context, \blaze\web\component\UIComponent $component)
 {
     if ($component->getUseMap() == true) {
         $writer = $context->getResponse()->getWriter();
         $writer->write('<map name="' . $component->getClientId($context) . 'Map">');
         parent::renderChildren($context, $component);
         $writer->write('</map>');
     } else {
         parent::renderChildren($context, $component);
     }
 }
 public function renderAttributes(\blaze\web\application\BlazeContext $context, \blaze\web\component\UIComponent $component)
 {
     parent::renderAttributes($context, $component);
     $writer = $context->getResponse()->getWriter();
     $disabled = $component->getDisabled();
     $writer->write(' type="submit" name="' . $component->getClientId($context) . '"');
     $writer->write(' value="' . $component->getValue() . '"');
     if ($disabled != null) {
         $writer->write(' disabled="' . $disabled . '"');
     }
     $writer->write('/>');
 }
Ejemplo n.º 6
0
 public function renderAttributes(\blaze\web\application\BlazeContext $context, \blaze\web\component\UIComponent $component)
 {
     parent::renderAttributes($context, $component);
     $writer = $context->getResponse()->getWriter();
     $writer->write('>');
     //        $rows = $component->getRows();
     //
     //        foreach($rows as $entry){
     //            $writer->write('<li>');
     //            $entry->processRender($context);
     //            $writer->write('</li>');
     //        }
     //
     //        $writer->write('</ul>');
 }
Ejemplo n.º 7
0
 public function renderAttributes(\blaze\web\application\BlazeContext $context, \blaze\web\component\UIComponent $component)
 {
     parent::renderAttributes($context, $component);
     $writer = $context->getResponse()->getWriter();
     $value = $component->getValue();
     $href = $component->getHref();
     $target = $component->getTarget();
     $rel = $component->getRel();
     if ($href != null) {
         $writer->write(' href="' . $href . '"');
     }
     if ($rel != null) {
         $writer->write(' rel="' . $rel . '"');
     }
     if ($target != null) {
         $writer->write(' target="' . $target . '"');
     }
     $writer->write('>');
     $writer->write($component->getValue());
 }
Ejemplo n.º 8
0
 public function renderAttributes(\blaze\web\application\BlazeContext $context, \blaze\web\component\UIComponent $component)
 {
     $tag = $this->getTypeTag($component);
     if ($tag != null) {
         parent::renderAttributes($context, $component);
     }
     $writer = $context->getResponse()->getWriter();
     $converter = $component->getConverter();
     if ($tag != null) {
         $writer->write('>');
     }
     $value = $component->getValue();
     if ($value === null) {
         $value = $component->getLocalValue();
     }
     if ($converter != null) {
         $writer->write($converter->asString($context, $value));
     } else {
         $writer->write($value);
     }
 }
Ejemplo n.º 9
0
 public function renderAttributes(\blaze\web\application\BlazeContext $context, \blaze\web\component\UIComponent $component)
 {
     parent::renderAttributes($context, $component);
     $writer = $context->getResponse()->getWriter();
     $alt = $component->getAlt();
     $href = $component->getHref();
     $coords = $component->getCoords();
     $shape = $component->getShape();
     if ($href != null) {
         $writer->write(' href="' . $href . '"');
     } else {
         $writer->write(' nohref="nohref"');
     }
     if ($alt != null) {
         $writer->write(' alt="' . $alt . '"');
     }
     if ($coords != null) {
         $writer->write(' coords="' . $coords . '"');
     }
     if ($shape != null) {
         $writer->write(' shape="' . $shape . '"');
     }
     $writer->write('/>');
 }
Ejemplo n.º 10
0
 public function renderAttributes(\blaze\web\application\BlazeContext $context, \blaze\web\component\UIComponent $component)
 {
     parent::renderAttributes($context, $component);
     $writer = $context->getResponse()->getWriter();
     $writer->write('>');
 }
Ejemplo n.º 11
0
 public function renderAttributes(\blaze\web\application\BlazeContext $context, \blaze\web\component\UIComponent $component)
 {
     parent::renderAttributes($context, $component);
     $writer = $context->getResponse()->getWriter();
     $writer->write(' method="post" action=""><div style="display: none;"><input type="hidden" name="BLAZE_FORM_IDENTIFIER" value="' . $component->getClientId($context) . '"/></div>');
 }
Ejemplo n.º 12
0
 public function renderAttributes(\blaze\web\application\BlazeContext $context, \blaze\web\component\UIComponent $component)
 {
     parent::renderAttributes($context, $component);
     $writer = $context->getResponse()->getWriter();
     $caption = $component->getCaption();
     $summary = $component->getSummary();
     if ($summary != null) {
         $writer->write(' summary="' . $summary . '"');
     }
     $writer->write('>');
     if ($caption != null) {
         $captionClass = $component->getCaptionClass();
         $captionStyle = $component->getCaptionStyle();
         $writer->write('<caption');
         if ($captionClass != null) {
             $writer->write(' class="' . $captionClass . '"');
         }
         if ($captionStyle != null) {
             $writer->write(' style="' . $captionStyle . '"');
         }
         $writer->write('>');
         $writer->write($caption);
         $writer->write('</caption>');
     }
     $header = false;
     $footer = false;
     foreach ($component->getColumns() as $column) {
         if (!$header && $column->hasHeader()) {
             $header = true;
         }
         if (!$footer && $column->hasFooter()) {
             $footer = true;
         }
         if ($header && $footer) {
             break;
         }
     }
     if ($header) {
         $this->renderOuterRow($context, $component, true);
     }
     $value = $component->getValue();
     //        if(!$value instanceof \blaze\util\ListI)
     //            throw new \blaze\lang\IllegalArgumentException('List must be given as value.');
     $writer->write('<tbody>');
     if ($value != null) {
         if ($component->getRowIdentifier() === null) {
             $rowId = 0;
         }
         foreach ($value as $tableEntry) {
             if ($component->getRowIdentifier() !== null) {
                 $component->setRowId($tableEntry->getClass()->getMethod('get' . ucfirst($component->getRowIdentifier()))->invoke($tableEntry));
             }
             $context->getELContext()->getContext(\blaze\web\el\ELContext::SCOPE_REQUEST)->set($context, $component->getRowVar(), $tableEntry);
             $this->renderTableRow($context, $component);
             if ($component->getRowIdentifier() === null) {
                 $component->setRowId($rowId++);
             }
         }
         $component->setRowId(-1);
     }
     $writer->write('</tbody>');
     if ($footer) {
         $this->renderOuterRow($context, $component, true);
     }
     $writer->write('</table>');
 }