]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/lib/form/Table.class.php
Refactoring - renamed a few things.
[timetracker.git] / WEB-INF / lib / form / Table.class.php
index 833bffac98a6873b8da27eceb210b70942371a3e..e0930095bc6e2637a5453aca16fedc5c46a42bab 100644 (file)
@@ -49,7 +49,7 @@ class Table extends FormElement {
        
   function __construct($name, $value='') {
     $this->name = $name;
-    $this->mValue = $value;
+    $this->value = $value;
   }
   
   function setKeyField($value) {
@@ -95,9 +95,9 @@ class Table extends FormElement {
   }
 
   function _process() {
-       $this->mProccessed = true;
+    $this->mProccessed = true;
        
-       if ($this->mInteractive) {
+    if ($this->mInteractive) {
       // Add a column of clickable checkboxes.
       $column = new TableColumn("","<input type=\"checkbox\" name=\"".$this->getName()."_all\" onclick=\"setAll(this.checked)\">");
       import('form.CheckboxCellRenderer');
@@ -115,7 +115,6 @@ class Table extends FormElement {
   }
   
   function toStringControl() {
-    if (!$this->isRenderable()) return "";
     if (!$this->mProccessed) $this->_process();
     
     $html = "";
@@ -160,8 +159,8 @@ class Table extends FormElement {
         if (0 == $col && strtolower(get_class($this->mColumns[$col]->getRenderer())) == 'checkboxcellrenderer') {
           // Checkbox for the row. Determine if selected.
           $selected = false;
-          if (is_array($this->mValue)) {
-            foreach ($this->mValue as $p) {
+          if (is_array($this->value)) {
+            foreach ($this->value as $p) {
               if ($p == $this->mData[$row][$this->mKeyField]) {
                $selected = true;
                break;