Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

table-layout.inc.php

Go to the documentation of this file.
00001 <?php
00010 class TableLayout extends BaseLayout
00011 {
00017     public function drawBeginning()
00018     {
00019         echo "\n\n<table class=\"BaseForm\">\n";
00020     }
00021 
00025     public function drawEnd()
00026     {
00027         echo "</table>\n\n";
00028         
00029         $this->drawHiddenFields();
00030     }
00031 
00036     public function drawField($field)
00037     {
00038         if($field instanceof HiddenField)
00039         {
00040             $this->hiddenFields[] = $field;
00041             return;
00042         }
00043 
00044         echo "\t<tr>\n";
00045 
00046         if ($field instanceOf StaticField)
00047             echo "\t\t<td colspan=\"2\">";
00048         else if($field->title !== null && !($field instanceOf ButtonField))
00049             echo "\t\t<th>" . $field->getTitle() . "</th>\n\t\t<td>";
00050         else
00051             echo "\t\t<td>&nbsp;</td>\n\t\t<td>";
00052         
00053         if($js = $field->getJs())
00054             echo "\n\t\t\t<script type='text/javascript'>$js</script>";
00055         
00056         $field->drawInput();
00057         
00058         echo "</td>\n\t</tr>\n";
00059         try
00060         {
00061             if($field->hasError())
00062                 echo "\n\t<tr><td>&nbsp;</td><td><span class='FormError'>$field->errorMessage</span></td></tr>\n";
00063         }
00064         catch (NotValidatedException $e){};
00065     }
00066 }
00067 ?>

Generated on Fri Oct 27 12:26:40 2006 for BaseJumper by doxygen 1.3.9.1