Overview

Packages

  • alpha::controller
  • alpha::controller::front
  • alpha::exceptions
  • alpha::model
  • alpha::model::types
  • alpha::tasks
  • alpha::tests
  • alpha::util
  • alpha::util::cache
  • alpha::util::codehighlight
  • alpha::util::convertors
  • alpha::util::feeds
  • alpha::util::filters
  • alpha::util::graphs
  • alpha::util::helpers
  • alpha::util::metrics
  • alpha::util::search
  • alpha::view
  • alpha::view::renderers
  • alpha::view::widgets

Classes

  • Button
  • DateBox
  • Image
  • RecordSelector
  • StringBox
  • TagCloud
  • TextBox
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  1: <?php
  2: 
  3: /**
  4:  * Record selection HTML widget.
  5:  *
  6:  * @package alpha::view::widgets
  7:  * @since 1.0
  8:  * @author John Collins <dev@alphaframework.org>
  9:  * @version $Id: RecordSelector.inc 1816 2014-10-15 22:38:35Z alphadevx $
 10:  * @license http://www.opensource.org/licenses/bsd-license.php The BSD License
 11:  * @copyright Copyright (c) 2014, John Collins (founder of Alpha Framework).
 12:  * All rights reserved.
 13:  *
 14:  * <pre>
 15:  * Redistribution and use in source and binary forms, with or
 16:  * without modification, are permitted provided that the
 17:  * following conditions are met:
 18:  *
 19:  * * Redistributions of source code must retain the above
 20:  *   copyright notice, this list of conditions and the
 21:  *   following disclaimer.
 22:  * * Redistributions in binary form must reproduce the above
 23:  *   copyright notice, this list of conditions and the
 24:  *   following disclaimer in the documentation and/or other
 25:  *   materials provided with the distribution.
 26:  * * Neither the name of the Alpha Framework nor the names
 27:  *   of its contributors may be used to endorse or promote
 28:  *   products derived from this software without specific
 29:  *   prior written permission.
 30:  *
 31:  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
 32:  * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
 33:  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 34:  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 35:  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
 36:  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 37:  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 38:  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 39:  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 40:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 41:  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
 42:  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 43:  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 44:  * </pre>
 45:  *
 46:  */
 47: class RecordSelector {
 48:     /**
 49:      * The relation object that we are going to render a view for.
 50:      *
 51:      * @var Relation
 52:      * @since 1.0
 53:      */
 54:     private $relationObject = null;
 55: 
 56:     /**
 57:      * The label text to use where required.
 58:      *
 59:      * @var string
 60:      * @since 1.0
 61:      */
 62:     private $label;
 63: 
 64:     /**
 65:      * Used to indicate the reading side when accessing from MANY-TO-MANY relation
 66:      * (leave blank for other relation types).
 67:      *
 68:      * @var string
 69:      * @since 1.0
 70:      */
 71:     private $accessingClassName;
 72: 
 73:     /**
 74:      * Javascript to run when the widget opens in a new window.
 75:      *
 76:      * @var string
 77:      * @since 1.0
 78:      */
 79:     private $onloadJS = '';
 80: 
 81:     /**
 82:      * The name of the HTML input box for storing the hidden and display values.
 83:      *
 84:      * @var string
 85:      * @since 1.0
 86:      */
 87:     private $name;
 88: 
 89:     /**
 90:      * Trace logger
 91:      *
 92:      * @var Logger
 93:      * @since 1.0
 94:      */
 95:     private static $logger = null;
 96: 
 97:     /**
 98:      * The constructor.
 99:      *
100:      * @param Relation $relation
101:      * @param string $label
102:      * @param string $name
103:      * @param string $accessingClassName
104:      * @since 1.0
105:      * @throws IllegalArguementException
106:      */
107:     public function __construct($relation, $label='', $name='', $accessingClassName='') {
108:         self::$logger = new Logger('RecordSelector');
109:         self::$logger->debug('>>__construct(relation=['.$relation.'], label=['.$label.'], name=['.$name.'], accessingClassName=['.$accessingClassName.'])');
110: 
111:         if(!$relation instanceof Relation)
112:             throw new IllegalArguementException('Invalid Relation object provided to the RecordSelector constructor!');
113: 
114:         $this->relationObject = $relation;
115:         $this->label = $label;
116:         $this->name = $name;
117:         $this->accessingClassName = $accessingClassName;
118: 
119:         self::$logger->debug('<<__construct');
120:     }
121: 
122:     /**
123:      * Renders the text boxes and buttons for the widget, that will appear in user forms.
124:      *
125:      * @param bool $expanded Render the related fields in expanded format or not (optional)
126:      * @param bool $buttons Render buttons for expanding/contacting the related fields (optional)
127:      * @return string
128:      * @since 1.0
129:      */
130:     public function render($expanded=false, $buttons=true) {
131:         self::$logger->debug('>>render(expanded=['.$expanded.'], buttons=['.$buttons.'])');
132: 
133:         global $config;
134: 
135:         $fieldname = ($config->get('security.encrypt.http.fieldnames') ? base64_encode(AlphaSecurityUtils::encrypt($this->name)) : $this->name);
136: 
137:         $html = '';
138: 
139:         // render text-box for many-to-one relations
140:         if($this->relationObject->getRelationType() == 'MANY-TO-ONE') {
141:             // value to appear in the text-box
142:             $inputBoxValue = $this->relationObject->getRelatedClassDisplayFieldValue();
143: 
144:             $html .= '<div class="form-group">';
145:             $html .= '<label for="'.$this->name.'_display">'.$this->label.'</label>';
146: 
147:             $html .= '<input type="text" size="70" class="form-control" name="'.$this->name.'_display" id="'.$this->name.'_display" value="'.$inputBoxValue.'" disabled/>';
148: 
149:             $js = " if(window.jQuery) {
150:                         window.jQuery.dialog = new BootstrapDialog({
151:                             title: 'Please select',
152:                             message: 'Loading...',
153:                             onshow: function(dialogRef){
154:                                 dialogRef.getModalBody().load('".$config->get('app.url')."ViewRecordSelector/value/'+document.getElementById('".$fieldname."').value+'/field/".$this->name."/relatedClass/".$this->relationObject->getRelatedClass()."/relatedClassField/".$this->relationObject->getRelatedClassField()."/relatedClassDisplayField/".$this->relationObject->getRelatedClassDisplayField()."/relationType/".$this->relationObject->getRelationType()."');
155:                             },
156:                             buttons: [
157:                             {
158:                                 icon: 'glyphicon glyphicon-remove',
159:                                 label: 'Cancel',
160:                                 cssClass: 'btn btn-default btn-xs',
161:                                 action: function(dialogItself){
162:                                     dialogItself.close();
163:                                 }
164:                             }
165:                         ]
166:                         });
167:                         window.jQuery.dialog.open();
168:                     }";
169: 
170: 
171:             $tmp = new Button($js, "Select", "relBut", '', 'glyphicon-check');
172:             $html .= '<div class="centered lower">'.$tmp->render().'</div>';
173: 
174:             // hidden field to store the actual value of the relation
175:             $html .= '<input type="hidden" name="'.$fieldname.'" id="'.$fieldname.'" value="'.$this->relationObject->getValue().'"/>';
176: 
177:             if($this->relationObject->getRule() != '') {
178:                 $html .= '<input type="hidden" id="'.$fieldname.'_msg" value="'.$this->relationObject->getHelper().'"/>';
179:                 $html .= '<input type="hidden" id="'.$fieldname.'_rule" value="'.$this->relationObject->getRule().'"/>';
180:             }
181: 
182:             $html .= '</div>';
183:         }
184: 
185:         // render read-only list for one-to-many relations
186:         if($this->relationObject->getRelationType() == 'ONE-TO-MANY') {
187:             $objects = $this->relationObject->getRelatedObjects();
188: 
189:             if(count($objects) > 0) {
190:                 // render tags differently
191:                 if($this->name == 'tags' && $this->relationObject->getRelatedClass() == 'TagObject') {
192:                     $html .= '<p><strong>'.$this->label.':</strong>';
193: 
194:                     foreach($objects as $tag) {
195:                         $html .= ' <a href="'.$config->get('app.url').'search/q/'.$tag->get('content').'">'.$tag->get('content').'</a>';
196:                     }
197: 
198:                     $html .= '</p>';
199:                 }else{
200:                     $html .= '<div><strong>'.$this->label.':</strong>';
201:                     if($buttons) {
202:                         $html .= '<div class="spread">';
203:                         $tmp = new Button("document.getElementById('relation_field_".$this->name."').style.display = '';", "Show", $this->name."DisBut", '', 'glyphicon-list');
204:                         $html .= $tmp->render();
205:                         $tmp = new Button("document.getElementById('relation_field_".$this->name."').style.display = 'none';", "Hide", $this->name."HidBut", '', 'glyphicon-minus');
206:                         $html .= $tmp->render();
207:                         $html .= '</div>';
208:                     }
209:                     $html .= '</div>';
210: 
211:                     $html .= '<div id="relation_field_'.$this->name.'" style="display:'.($expanded ? '' : 'none').';">';
212: 
213:                     $customViewControllerName = AlphaController::getCustomControllerName(get_class($objects[0]), 'view');
214:                     $customEditControllerName = AlphaController::getCustomControllerName(get_class($objects[0]), 'edit');
215: 
216:                     foreach($objects as $obj) {
217: 
218:                         // check to see if we are in the admin back-end
219:                         if(mb_strpos($_SERVER['REQUEST_URI'], '/tk/') !== false) {
220:                             $viewURL = FrontController::generateSecureURL('act=Detail&bo='.get_class($obj).'&oid='.$obj->getOID());
221:                             $editURL = FrontController::generateSecureURL('act=Edit&bo='.get_class($obj).'&oid='.$obj->getOID());
222:                         }else{
223:                             if(isset($customViewControllerName)) {
224:                                 if($config->get('app.use.mod.rewrite'))
225:                                     $viewURL = $config->get('app.url').$customViewControllerName.'/oid/'.$obj->getOID();
226:                                 else
227:                                     $viewURL = $config->get('app.url').'controller/'.$customViewControllerName.'.php?oid='.$obj->getOID();
228:                             }else{
229:                                 $viewURL = $config->get('app.url').'alpha/controller/Detail.php?bo='.get_class($obj).'&oid='.$obj->getOID();
230:                             }
231:                             if(isset($customEditControllerName)) {
232:                                 if($config->get('app.use.mod.rewrite'))
233:                                     $editURL = $config->get('app.url').$customEditControllerName.'/oid/'.$obj->getOID();
234:                                 else
235:                                     $editURL = $config->get('app.url').'controller/'.$customEditControllerName.'.php?oid='.$obj->getOID();
236:                             }else{
237:                                 $editURL = $config->get('app.url').'alpha/controller/Edit.php?bo='.get_class($obj).'&oid='.$obj->getOID();
238:                             }
239:                         }
240: 
241:                         /*
242:                          * If any display headers were set with setRelatedClassHeaderFields, use them otherwise
243:                          * use the OID of the related class as the only header.
244:                          */
245:                         $headerFields = $this->relationObject->getRelatedClassHeaderFields();
246:                         if(count($headerFields) > 0) {
247:                             foreach($headerFields as $field) {
248:                                 $label = $obj->getDataLabel($field);
249:                                 $value = $obj->get($field);
250: 
251:                                 if($field == 'created_by' || $field == 'updated_by') {
252:                                     $person = new PersonObject();
253:                                     $person->load($value);
254:                                     $value = $person->getDisplayName();
255:                                 }
256: 
257:                                 $html .= '<em>'.$label.': </em>'.$value.'&nbsp;&nbsp;&nbsp;&nbsp;';
258:                             }
259:                             // if the related BO has been updated, render the update time
260:                             if($obj->getCreateTS() != $obj->getUpdateTS()) {
261:                                 try {
262:                                     $html .= '<em>'.$obj->getDataLabel('updated_ts').': </em>'.$obj->get('updated_ts');
263:                                 }catch(IllegalArguementException $e) {
264:                                     $html .= '<em>Updated: </em>'.$obj->get('updated_ts');
265:                                 }
266:                             }
267:                         }else{
268:                             $html .= '<em>'.$obj->getDataLabel('OID').': </em>'.$obj->get('OID');
269:                         }
270:                         // ensures that line returns are rendered
271:                         $value = str_replace("\n", '<br>', $obj->get($this->relationObject->getRelatedClassDisplayField()));
272:                         $html .= '<p>'.$value.'</p>';
273: 
274:                         $html .= '<div class="centered">';
275:                         $html .= '<a href="'.$viewURL.'">View</a>';
276:                         // if the current user owns it, they get the edit link
277:                         if(isset($_SESSION['currentUser']) && $_SESSION['currentUser']->getOID() == $obj->getCreatorId())
278:                             $html .= '&nbsp;&nbsp;&nbsp;&nbsp;<a href="'.$editURL.'">Edit</a>';
279:                         $html .= '</div>';
280:                     }
281:                     $html .= '</div>';
282:                 }
283:             }
284:         }
285: 
286:         // render text-box for many-to-many relations
287:         if($this->relationObject->getRelationType() == 'MANY-TO-MANY') {
288:             // value to appear in the text-box
289:             $inputBoxValue = $this->relationObject->getRelatedClassDisplayFieldValue($this->accessingClassName);
290:             // replace commas with line returns
291:             $inputBoxValue = str_replace(",", "\n", $inputBoxValue);
292: 
293:             $html .= '<div class="form-group">';
294:             $html .= '<label for="'.$this->name.'_display">'.$this->label.'</label>';
295: 
296:             $html .= '<textarea id="'.$this->name.'_display" class="form-control" rows="5" readonly>';
297:             $html .= $inputBoxValue;
298:             $html .= '</textarea>';
299: 
300:             $fieldname1 = ($config->get('security.encrypt.http.fieldnames') ? base64_encode(AlphaSecurityUtils::encrypt($this->name)) : $this->name);
301:             $fieldname2 = ($config->get('security.encrypt.http.fieldnames') ? base64_encode(AlphaSecurityUtils::encrypt($this->name.'_OID')) : $this->name.'_OID');
302: 
303: 
304:             $js = "if(window.jQuery) {
305:                         BootstrapDialog.show({
306:                             title: 'Please select',
307:                             message: 'Loading...',
308:                             onshow: function(dialogRef){
309:                                 dialogRef.getModalBody().load('".$config->get('app.url')."ViewRecordSelector/lookupOIDs/'+document.getElementById('".$fieldname1."').value+'/value/'+document.getElementById('".$fieldname2."').value+'/field/".$this->name."/relatedClassLeft/".$this->relationObject->getRelatedClass('left')."/relatedClassLeftDisplayField/".$this->relationObject->getRelatedClassDisplayField('left')."/relatedClassRight/".$this->relationObject->getRelatedClass('right')."/relatedClassRightDisplayField/".$this->relationObject->getRelatedClassDisplayField('right')."/accessingClassName/".$this->accessingClassName."/relationType/".$this->relationObject->getRelationType()."');
310:                             },
311:                             buttons: [
312:                             {
313:                                 icon: 'glyphicon glyphicon-remove',
314:                                 label: 'Cancel',
315:                                 cssClass: 'btn btn-default btn-xs',
316:                                 action: function(dialogItself){
317:                                     dialogItself.close();
318:                                 }
319:                             },
320:                             {
321:                                 icon: 'glyphicon glyphicon-ok',
322:                                 label: 'Okay',
323:                                 cssClass: 'btn btn-default btn-xs',
324:                                 action: function(dialogItself) {
325:                                     setParentFieldValues();
326:                                     $('[id=\'".$this->name."_display\']').blur();
327:                                     dialogItself.close();
328:                                 }
329:                             }
330:                         ]
331:                         });
332:                     }";
333: 
334:             $tmp = new Button($js, "Select", "relBut", '', 'glyphicon-check');
335:             $html .= '<div class="centered lower">'.$tmp->render().'</div>';
336: 
337:             $html .= '</div>';
338: 
339:             // hidden field to store the OID of the current BO
340:             $html .= '<input type="hidden" name="'.$fieldname2.'" id="'.$fieldname2.'" value="'.$this->relationObject->getValue().'"/>';
341: 
342:             // hidden field to store the OIDs of the related BOs on the other side of the rel (this is what we check for when saving)
343:             if($this->relationObject->getSide($this->accessingClassName) == 'left')
344:                 $lookupOIDs = $this->relationObject->getLookup()->loadAllFieldValuesByAttribute('leftID', $this->relationObject->getValue(), 'rightID', 'DESC');
345:             else
346:                 $lookupOIDs = $this->relationObject->getLookup()->loadAllFieldValuesByAttribute('rightID', $this->relationObject->getValue(), 'leftID', 'DESC');
347: 
348:             $html .= '<input type="hidden" name="'.$fieldname1.'" id="'.$fieldname1.'" value="'.implode(',', $lookupOIDs).'"/>';
349:         }
350: 
351:         self::$logger->debug('<<__render [html]');
352:         return $html;
353:     }
354: 
355:     /**
356:      * Returns the HTML for the record selector that will appear in a pop-up window.
357:      *
358:      * @param array $lookupOIDs An optional array of related look-up OIDs, only required for rendering MANY-TO-MANY rels
359:      * @since 1.0
360:      * @return string
361:      */
362:     public function renderSelector($lookupOIDs=array()) {
363:         self::$logger->debug('>>renderSelector(lookupOIDs=['.var_export($lookupOIDs, true).'])');
364: 
365:         global $config;
366: 
367:         $fieldname = ($config->get('security.encrypt.http.fieldnames') ? base64_encode(AlphaSecurityUtils::encrypt($_GET['field'])) : $_GET['field']);
368: 
369: 
370:         $html = '<script language="JavaScript">
371:             var selectedOIDs = new Object();
372: 
373:             function toggelOID(oid, displayValue, isSelected) {
374:                 if(isSelected)
375:                     selectedOIDs[oid] = displayValue;
376:                 else
377:                     delete selectedOIDs[oid];
378:             }
379: 
380:             function setParentFieldValues() {
381:                 var OIDs;
382:                 var displayValues;
383: 
384:                 for(key in selectedOIDs) {
385:                     if(OIDs == null)
386:                         OIDs = key;
387:                     else
388:                         OIDs = OIDs + \',\' + key;
389: 
390:                     if(displayValues == null)
391:                         displayValues = selectedOIDs[key];
392:                     else
393:                         displayValues = displayValues + \'\\n\' + selectedOIDs[key];
394:                 }
395: 
396:                 if(OIDs == null) {
397:                     document.getElementById(\''.$fieldname.'\').value = "00000000000";
398:                     document.getElementById(\''.$_GET['field'].'_display\').value = "";
399:                 }else{
400:                     document.getElementById(\''.$fieldname.'\').value = OIDs;
401:                     document.getElementById(\''.$_GET['field'].'_display\').value = displayValues;
402:                 }
403:             }
404: 
405:             </script>';
406: 
407: 
408:         if($this->relationObject->getRelationType() == 'MANY-TO-MANY') {
409: 
410:             $classNameLeft = $this->relationObject->getRelatedClass('left');
411:             $classNameRight = $this->relationObject->getRelatedClass('right');
412: 
413:             if($this->accessingClassName == $classNameLeft) {
414:                 AlphaDAO::loadClassDef($classNameRight);
415:                 $tmpObject = new $classNameRight;
416:                 $fieldName = $this->relationObject->getRelatedClassDisplayField('right');
417:                 $fieldLabel = $tmpObject->getDataLabel($fieldName);
418:                 $oidLabel = $tmpObject->getDataLabel('OID');
419: 
420:                 $objects = $tmpObject->loadAll(0, 0, 'OID', 'ASC', true);
421: 
422:                 self::$logger->debug('['.count($objects).'] related ['.$classNameLeft.'] objects loaded');
423:             }else{
424:                 AlphaDAO::loadClassDef($classNameLeft);
425:                 $tmpObject = new $classNameLeft;
426:                 $fieldName = $this->relationObject->getRelatedClassDisplayField('left');
427:                 $fieldLabel = $tmpObject->getDataLabel($fieldName);
428:                 $oidLabel = $tmpObject->getDataLabel('OID');
429: 
430:                 $objects = $tmpObject->loadAll(0, 0, 'OID', 'ASC', true);
431: 
432:                 self::$logger->debug('['.count($objects).'] related ['.$classNameLeft.'] objects loaded');
433:             }
434: 
435:             $html .= '<table cols="3" class="table table-bordered">';
436:             $html .= '<tr>';
437:             $html .= '<th>'.$oidLabel.'</th>';
438:             $html .= '<th>'.$fieldLabel.'</th>';
439:             $html .= '<th>Connect?</th>';
440:             $html .= '</tr>';
441: 
442:             foreach($objects as $obj){
443:                 $html .= '<tr>';
444:                 $html .= '<td width="20%">';
445:                 $html .= $obj->getOID();
446:                 $html .= '</td>';
447:                 $html .= '<td width="60%">';
448:                 $html .= $obj->get($fieldName);
449:                 $html .= '</td>';
450:                 $html .= '<td width="20%">';
451: 
452:                 if(in_array($obj->getOID(), $lookupOIDs)) {
453:                     $this->onloadJS .= 'toggelOID(\''.$obj->getOID().'\',\''.$obj->get($fieldName).'\',true);';
454:                     $html .= '<input name = "'.$obj->getOID().'" type="checkbox" checked onclick="toggelOID(\''.$obj->getOID().'\',\''.$obj->get($fieldName).'\',this.checked);"/>';
455:                 }else{
456:                     $html .= '<input name = "'.$obj->getOID().'" type="checkbox" onclick="toggelOID(\''.$obj->getOID().'\',\''.$obj->get($fieldName).'\',this.checked);"/>';
457:                 }
458:                 $html .= '</td>';
459:                 $html .= '</tr>';
460:             }
461:             $html .= '</table>';
462: 
463:         }else{
464:             $className = $this->relationObject->getRelatedClass();
465: 
466:             AlphaDAO::loadClassDef($className);
467: 
468:             $tmpObject = new $className;
469:             $label = $tmpObject->getDataLabel($this->relationObject->getRelatedClassDisplayField());
470:             $oidLabel = $tmpObject->getDataLabel('OID');
471: 
472:             $objects = $tmpObject->loadAll(0, 0, 'OID', 'DESC');
473: 
474:             $html = '<table cols="3" width="100%" class="bordered">';
475:             $html .= '<tr>';
476:             $html .= '<th>'.$oidLabel.'</th>';
477:             $html .= '<th>'.$label.'</th>';
478:             $html .= '<th>Connect?</th>';
479:             $html .= '</tr>';
480: 
481:             foreach($objects as $obj){
482:                 $html .= '<tr>';
483:                 $html .= '<td width="20%">';
484:                 $html .= $obj->getOID();
485:                 $html .= '</td>';
486:                 $html .= '<td width="60%">';
487:                 $html .= $obj->get($this->relationObject->getRelatedClassDisplayField());
488:                 $html .= '</td>';
489:                 $html .= '<td width="20%">';
490:                 if($obj->getOID() == $this->relationObject->getValue()) {
491:                     $html .= '<img src="'.$config->get('app.url').'/alpha/images/icons/accept_ghost.png"/>';
492:                 }else{
493:                     $tmp = new Button("document.getElementById('".$fieldname."').value = '".$obj->getOID()."'; document.getElementById('".$_GET['field']."_display').value = '".$obj->get($this->relationObject->getRelatedClassDisplayField())."'; $('[Id=".$_GET['field']."_display]').blur(); window.jQuery.dialog.close();", "", "selBut", $config->get('app.url')."/alpha/images/icons/accept.png");
494:                     $html .= $tmp->render();
495:                 }
496:                 $html .= '</td>';
497:                 $html .= '</tr>';
498:             }
499:             $html .= '</table>';
500:         }
501: 
502:         $html .= '<script type="text/javascript">'.
503:                 '$(document).ready(function() {';
504: 
505:         $html .= $this->onloadJS;
506: 
507:         $html .= '});</script>';
508: 
509:         self::$logger->debug('<<renderSelector[html]');
510:         return $html;
511:     }
512: }
513: 
514: ?>
Alpha Framework 1.2.4 API Documentation API documentation generated by ApiGen 2.8.0