protected function init()
 {
     parent::init();
     // FIXME (CSH) Re-implement fallback / root panel submission / find a better solution ...
     //       $this->form('POST', null, Io_Mimetype::APPLICATION_FORM_URLENCODED(), 'ISO-8859-15');
     $this->form();
     //       $this->ajaxEnabled=false;
     $this->add(new Ui_Panel_Label('labela', null, 'Google.com.hk 使用下列语言: 中文(繁體) English'));
     $this->add(new Ui_Panel_Label('labelb', null, I18n_Script::Hans()->transformToLatn('Google.com.hk 使用下列语言: 中文(繁體) English')));
     $this->add(new Ui_Panel_Label('labelc', null, I18n_Script::Hans()->transformToAscii('Google.com.hk 使用下列语言: 中文(繁體) English')));
     $this->add(new Ui_Panel_Label('labeld', null, String::toLowercaseUrlIdentifier(I18n_Script::Hans()->transformToAscii('Google.com.hk 使用下列语言: 中文(繁體) English'))));
     $this->add(new Ui_Panel_Tabs('tabs'));
     $this->tabs->add(new Ui_Panel_Disclosure('disclosure', null, 'Disclosure'));
     $this->tabs->disclosure->add(new Ui_Panel_Datetime('date'));
     $this->tabs->add(new Ui_Panel_Editor_Text('text', null, 'Text'));
     $this->tabs->add(new Ui_Panel_Image('image', Io_Image::valueOf(__DIR__ . '/test.jpg'), 'Image'));
     $this->tabs->image->attribute('width', 64);
     $this->tabs->image->embedded = true;
     $this->tabs->add(new Ui_Panel_Upload_File('file', null, 'File'));
     $this->tabs->add(new Ui_Panel_Select('list', null, 'List', ['A', 'B', 'C']));
     $this->tabs->add(new Ui_Panel_Editor_Html('html', null, 'HTML'));
     $button = new Ui_Panel_Button_Submit('submit', null, 'Submit');
     $button->callback = [$this, 'onSubmit'];
     $this->add($button);
 }
 protected function init()
 {
     parent::init();
     $this->tag = null;
     $this->template = __DIR__ . '/select.tpl';
     $this->addClass('ui_panel_select');
 }
 protected function init()
 {
     parent::init();
     $this->tag = 'p';
     $this->template = __DIR__ . '/text.tpl';
     $this->addClass('ui_panel_text');
 }
 protected function init()
 {
     parent::init();
     $this->scriptlet->style('io/mimetype');
     $this->template = __DIR__ . '/file.tpl';
     $this->panelType = 'ui/upload/file';
     $this->addClass('ui_panel_upload_file');
 }
 protected function init()
 {
     parent::init();
     $this->template = __DIR__ . '/slider.tpl';
     $this->panelType = 'ui/panel/slider';
     $this->panelProperties = ['callbackLazy', 'orientation', 'page', 'selectorsEqualize'];
     $this->addClass('ui_panel_slider');
 }
 protected function init()
 {
     parent::init();
     $this->tag = null;
     $this->template = __DIR__ . '/pager.tpl';
     $this->panelType = 'ui/panel/pager';
     $this->panelPropertiesToggle = ['page', 'pageable', 'swipe'];
     $this->addClass('ui_panel_pager');
 }
 protected function init()
 {
     parent::init();
     $this->template = __DIR__ . '/tabs.tpl';
     $this->panelType = 'ui/panel/tabs';
     $this->panelProperties = ['orientation'];
     $this->valueDefault = 0;
     $this->addClass('ui_panel_tabs');
 }
 protected function init()
 {
     parent::init();
     $this->template = __DIR__ . '/datetime.tpl';
     $this->addClass('ui_panel_datetime');
     if (!($value = $this->value())) {
         $this->value(Date::now());
     }
 }
 protected function init()
 {
     parent::init();
     $this->tag = null;
     $this->template = __DIR__ . '/button.tpl';
     $this->attribute('type', self::TYPE_PLAIN);
     $this->attribute('value', $this->title);
     $this->addClass('ui_panel_button');
 }
 /**
  * @see \Components\Ui_Panel::init() init
  */
 protected function init()
 {
     parent::init();
     $this->template = __DIR__ . '/checkboxes.tpl';
     $this->addClass('ui_panel_checkboxes');
 }
 protected function init()
 {
     parent::init();
     $this->addClass('ui_panel_label');
 }
 protected function init()
 {
     parent::init();
     $this->template = __DIR__ . '/frame.tpl';
     $this->addClass('ui_panel_frame');
 }
 /**
  * @param \Components\Ui_Panel $panel_
  */
 public function add(Ui_Panel $panel_, $category_ = null)
 {
     $this->m_children[$panel_->name] = $panel_;
     if (null !== $category_) {
         $this->m_categories[$category_][$panel_->name] = $panel_;
     }
     if (null !== $panel_->parent) {
         $panel_->clearId();
     }
     $panel_->parent = $this;
     $panel_->root = $this->root;
     $panel_->scriptlet = $this->scriptlet;
     $panel_->ajaxEnabled = $this->ajaxEnabled;
     $panel_->m_form = $this->m_form;
     $panel_->init();
     $panel_->onRetrieveValue();
     // TODO Trigger validators.
     if ($panel_->m_form && $panel_ instanceof Ui_Panel_Button_Submit && $panel_->hasBeenSubmitted() && $panel_->callback) {
         call_user_func_array($panel_->callback, [$panel_]);
     } else {
         if (null !== $panel_->callback && Ui_Scriptlet::$submittedPanelId === $panel_->id()) {
             call_user_func_array($panel_->callback, [$panel_]);
         }
     }
 }