• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List

E:/E/GEAMP/www/openbiz/openbiz/bin/easy/element/RowCheckbox.php

00001 <?php
00017 include_once("Element.php");
00018 
00027 class RowCheckbox extends InputElement
00028 {
00029        protected  $m_CheckStatus;
00030        
00031     protected function readMetaData(&$xmlArr)
00032     {
00033         parent::readMetaData($xmlArr);
00034         $this->m_CheckStatus = isset($xmlArr["ATTRIBUTES"]["CHECKSTATUS"]) ? $xmlArr["ATTRIBUTES"]["CHECKSTATUS"] : null;
00035     }
00041     public function renderLabel()
00042     {
00043         $formName = $this->m_FormName;
00044         $name = $this->m_Name.'[]';        
00045         $sHTML = "<INPUT TYPE=\"CHECKBOX\"  onclick=\"Openbiz.Util.checkAll(this, $('$formName').select('input[name=\'$name\']'));\"/>";
00046         return $sHTML;
00047     }
00048 
00054     public function render()
00055     {
00056         $value = $this->m_Value;
00057         $name = $this->m_Name.'[]';
00058                 
00059         if($this->m_CheckStatus)
00060         {
00061               $formObj = $this->getFormObj();
00062               $testResult = Expression::evaluateExpression($this->m_CheckStatus, $formObj);              
00063               if($testResult)
00064               {
00065                      $checkStatus = " checked=\"checked\" ";
00066               }
00067               else
00068               {
00069                      $checkStatus = "";
00070               }
00071         }
00072         else
00073         {
00074               $checkStatus = "";
00075         }
00076         $sHTML = "<INPUT TYPE=\"CHECKBOX\" $checkStatus NAME=\"$name\" VALUE='$value' onclick=\"event.cancelBubble=true;\"/>";
00077         return $sHTML;
00078     }
00079 }
00080 
00081 ?>

Generated on Thu Apr 19 2012 17:09:13 for openbiz by  doxygen 1.7.2