当前位置: 首页>>代码示例>>PHP>>正文


PHP TWebControl::onPreRender方法代码示例

本文整理汇总了PHP中TWebControl::onPreRender方法的典型用法代码示例。如果您正苦于以下问题:PHP TWebControl::onPreRender方法的具体用法?PHP TWebControl::onPreRender怎么用?PHP TWebControl::onPreRender使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TWebControl的用法示例。


在下文中一共展示了TWebControl::onPreRender方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: onPreRender

 /**
  * Registers CSS and JS.
  * This method is invoked right before the control rendering, if the control is visible.
  * @param mixed event parameter
  */
 public function onPreRender($param)
 {
     parent::onPreRender($param);
     if ($this->getPage()->getClientSupportsJavaScript()) {
         $this->registerStyleSheet();
         $this->registerClientScript();
     }
 }
开发者ID:quantrocket,项目名称:planlogiq,代码行数:13,代码来源:TKeyboard.php

示例2: onPreRender

 /**
  * Registers the checkbox to receive postback data during postback.
  * This is necessary because a checkbox if unchecked, when postback,
  * does not have direct mapping between post data and the checkbox name.
  *
  * This method overrides the parent implementation and is invoked before render.
  * @param mixed event parameter
  */
 public function onPreRender($param)
 {
     parent::onPreRender($param);
     if ($this->getEnabled(true)) {
         $this->getPage()->registerRequiresPostData($this);
     }
 }
开发者ID:bailey-ann,项目名称:stringtools,代码行数:15,代码来源:TCheckBox.php

示例3: onPreRender

 /**
  * Registers CSS and JS.
  * This method is invoked right before the control rendering, if the control is visible.
  * @param mixed event parameter
  */
 public function onPreRender($param)
 {
     parent::onPreRender($param);
     $this->getActiveView();
     // determine the active view
     $this->registerStyleSheet();
 }
开发者ID:tejdeeps,项目名称:tejcs.com,代码行数:12,代码来源:TAccordion.php

示例4: onPreRender

 /**
  * Sets Enctype of the form on the page.
  * This method overrides the parent implementation and is invoked before render.
  * @param mixed event parameter
  */
 public function onPreRender($param)
 {
     parent::onPreRender($param);
     if (($form = $this->getPage()->getForm()) !== null) {
         $form->setEnctype('multipart/form-data');
     }
     $this->getPage()->getClientScript()->registerHiddenField('MAX_FILE_SIZE', $this->getMaxFileSize());
     if ($this->getEnabled(true)) {
         $this->getPage()->registerRequiresPostData($this);
     }
 }
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:16,代码来源:TFileUpload.php

示例5: onPreRender

 /**
  * Performs databinding to populate data items from data source.
  * This method is invoked by {@link dataBind()}.
  * You may override this function to provide your own way of data population.
  * @param Traversable the bound data
  */
 public function onPreRender($param)
 {
     parent::onPreRender($param);
     $controlID = $this->getControlToPaginate();
     if (($targetControl = $this->getNamingContainer()->findControl($controlID)) === null || !$targetControl instanceof TDataBoundControl) {
         throw new TConfigurationException('pager_controltopaginate_invalid', $controlID);
     }
     if ($targetControl->getAllowPaging()) {
         $this->_pageCount = $targetControl->getPageCount();
         $this->getControls()->clear();
         $this->setPageCount($targetControl->getPageCount());
         $this->setCurrentPageIndex($targetControl->getCurrentPageIndex());
         $this->buildPager();
     } else {
         $this->_pageCount = 0;
     }
 }
开发者ID:quantrocket,项目名称:planlogiq,代码行数:23,代码来源:TPager.php

示例6: onPreRender

 /**
  * Registers CSS and JS.
  * This method is invoked right before the control rendering, if the control is visible.
  * @param mixed event parameter
  */
 public function onPreRender($param)
 {
     parent::onPreRender($param);
     $this->registerStyleSheet();
     $this->registerSliderClientScript();
 }
开发者ID:tejdeeps,项目名称:tejcs.com,代码行数:11,代码来源:TSlider.php

示例7: onPreRender

 /**
  * Ensures any pending databind is performed.
  * This method overrides the parent implementation.
  * @param TEventParameter event parameter
  */
 public function onPreRender($param)
 {
     $this->_prerendered = true;
     $this->ensureDataBound();
     parent::onPreRender($param);
 }
开发者ID:tejdeeps,项目名称:tejcs.com,代码行数:11,代码来源:TDataBoundControl.php

示例8: onPreRender

 /**
  * Overrides parent implementation by registering necessary Javascripts for validation.
  * @param TEventParameter the event parameter
  */
 public function onPreRender($param)
 {
     parent::onPreRender($param);
     $page = $this->getPage();
     if ($this->isClientScriptEnabled() && !$page->isScriptFileRegistered('validator')) {
         $dependencies = array('base', 'dom', 'validator');
         $path = $this->Application->getResourceLocator()->getJsPath() . '/';
         foreach ($dependencies as $file) {
             $page->registerScriptFile($file, $path . $file . '.js');
         }
         $script = "\n\t\t\tif(typeof(Prado) == 'undefined')\n\t\t\t\talert(\"Unable to find Prado javascript library '{$path}base.js'.\");\n\t\t\telse if(Prado.Version != 2.0) \n\t\t\t\talert(\"Prado javascript library version 2.0 required.\");\n\t\t\telse if(typeof(Prado.Validation) == 'undefined')\n\t\t\t\talert(\"Unable to find validation javascript library '{$path}validator.js'.\");\t\t\t\t\n\t\t\telse\n\t\t\t\tPrado.Validation.AddForm('{$page->Form->ClientID}');\t\t\t\t\n\t\t\t";
         $page->registerEndScript('TValidator', $script);
     }
     //update the Css class for the controls
     $idPath = $this->getControlToValidate();
     if (strlen($idPath)) {
         $this->updateControlCssClass($this->getTargetControl($idPath));
     }
 }
开发者ID:BackupTheBerlios,项目名称:php5cms-svn,代码行数:23,代码来源:TValidator.php

示例9: onPreRender

 /**
  * Checks for API keys
  * @param mixed event parameter
  */
 public function onPreRender($param)
 {
     parent::onPreRender($param);
     if ("" == $this->getPublicKey()) {
         throw new TConfigurationException('recaptcha_publickey_unknown');
     }
     if ("" == $this->getPrivateKey()) {
         throw new TConfigurationException('recaptcha_privatekey_unknown');
     }
     // need to register captcha fields so they will be sent back also in callbacks
     $page = $this->getPage();
     $page->registerRequiresPostData($this->getChallengeFieldName());
     $page->registerRequiresPostData($this->getResponseFieldName());
 }
开发者ID:ullasnaidu,项目名称:epro,代码行数:18,代码来源:TReCaptcha.php

示例10: onPreRender

 /**
  * Registers CSS and JS.
  * This method is invoked right before the control rendering, if the control is visible.
  * @param mixed event parameter
  */
 public function onPreRender($param)
 {
     parent::onPreRender($param);
     $this->getActiveView();
     // determine the active view
     $this->registerStyleSheet();
     $page = $this->getPage();
     $page->registerRequiresPostData($this);
     $page->registerRequiresPostData($this->getClientID() . "_1");
 }
开发者ID:Nurudeen,项目名称:prado,代码行数:15,代码来源:TTabPanel.php

示例11: onPreRender

 public function onPreRender($writer)
 {
     parent::onPreRender($writer);
     $this->registerClientScripts();
 }
开发者ID:quantrocket,项目名称:planlogiq,代码行数:5,代码来源:PFTafelTree.php

示例12: onPreRender

 public function onPreRender($param)
 {
     parent::onPreRender($param);
     if (!$this->getPage()->getIsCallback()) {
         $this->registerStyleSheet();
         $this->registerClientScript();
     }
 }
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:8,代码来源:PWCWindow.php


注:本文中的TWebControl::onPreRender方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。