Пример #1
0
 /**
  * Define the action to be executed when the user leaves the form field
  * @param $action TAction object
  */
 function setExitAction(TAction $action)
 {
     if ($action->isStatic()) {
         $this->exitAction = $action;
     } else {
         $string_action = $action->toString();
         throw new Exception(AdiantiCoreTranslator::translate('Action (^1) must be static to be used in ^2', $string_action, __METHOD__));
     }
 }
Пример #2
0
 /**
  * Define the action to be executed when the user changes the combo
  * @param $action TAction object
  */
 function setChangeAction(TAction $action)
 {
     if ($action->isStatic()) {
         $this->changeAction = $action;
     } else {
         $string_action = $action->toString();
         throw new Exception(AdiantiCoreTranslator::translate('Action (^1) must be static to be used in ^2', $string_action, __METHOD__));
     }
     $this->widget->connect('changed', array($this, 'onExecuteExitAction'));
 }
Пример #3
0
 /**
  * Define the action to be executed when the user leaves the form field
  * @param $action TAction object
  */
 function setExitAction(TAction $action)
 {
     if ($action->isStatic()) {
         $this->exitAction = $action;
     } else {
         $string_action = $action->toString();
         throw new Exception(AdiantiCoreTranslator::translate('Action (^1) must be static to be used in ^2', $string_action, __METHOD__));
     }
     $this->textview->connect_after('focus-out-event', array($this, 'onExecuteExitAction'));
 }
Пример #4
0
 /**
  * Converts the action into an URL
  * @param  $format_action = format action with document or javascript (ajax=no)
  */
 public function serialize($format_action = TRUE)
 {
     if (is_array($this->action) and is_object($this->action[0])) {
         if (isset($_REQUEST['offset'])) {
             $this->setParameter('offset', $_REQUEST['offset']);
         }
         if (isset($_REQUEST['limit'])) {
             $this->setParameter('limit', $_REQUEST['limit']);
         }
         if (isset($_REQUEST['page'])) {
             $this->setParameter('page', $_REQUEST['page']);
         }
         if (isset($_REQUEST['first_page'])) {
             $this->setParameter('first_page', $_REQUEST['first_page']);
         }
         if (isset($_REQUEST['order'])) {
             $this->setParameter('order', $_REQUEST['order']);
         }
         if (parent::isStatic()) {
             $this->setParameter('static', '1');
         }
     }
     return parent::serialize($format_action);
 }
Пример #5
0
 /**
  * Define the action to be executed when the user changes the combo
  * @param $action TAction object
  */
 function setChangeAction(TAction $action)
 {
     if ($action->isStatic()) {
         $this->changeAction = $action;
     } else {
         $string_action = $action->toString();
         throw new Exception(AdiantiCoreTranslator::translate('Action (^1) must be static to be used in ^2', $string_action, __METHOD__));
     }
     if ($this->radios) {
         foreach ($this->radios as $key => $radio) {
             $radio->connect('clicked', array($this, 'onExecuteExitAction'));
         }
     }
 }