PhpExt : Form [ class tree ] [ index ] [ all elements ]

Class: PhpExt_Form_Action_Response

Source Location: /PhpExt/Form/Action/Response.php

Class PhpExt_Form_Action_Response

Class Overview

An action response object for

Load response example:

  1.      $response new PhpExt_Form_Action_Response();
  2.   $response->setSuccess(true)
  3.            ->setData(array(
  4.                  'clientName'=>'Fred. Olsen Lines',
  5.                  'portOfLoading'=>'FXT',
  6.                  'portOfDischarge'=>'OSL')
  7.      );
  8.   echo $response->getJavascript();
Submit response example:

  1.      $response new PhpExt_Form_Action_Response();
  2.   $response->setSuccess(false)
  3.            ->setErrors(array(
  4.                  'clientCode'=>'Client not found',
  5.                  'portOfLoading'=>'FXT')
  6.      );
  7.   echo $response->getJavascript();
Other data may be placed into the response for processing the the Form's callback or event handler methods. The object decoded from this JSON is available in the result property.

Located in /PhpExt/Form/Action/Response.php [line 49]

PhpExt_Object
   |
   --PhpExt_Form_Action
      |
      --PhpExt_Form_Action_Response

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From PhpExt_Object

PhpExt_Object::$_extClassName
PhpExt_Object::$_extConfigProperties
PhpExt_Object::$_validExtConfigProperties
PhpExt_Object::$_varName

Inherited From PhpExt_Form_Action

PhpExt_Form_Action::__construct()
PhpExt_Form_Action::getFailureCallback()
PhpExt_Form_Action::getFailureType()
The type of failure detected. Possible values are
PhpExt_Form_Action::getMethod()
The HTTP method to use to access the requested URL. Defaults to the Ext.form.BasicForm's method, or if that is not specified, the underlying DOM form's method.
PhpExt_Form_Action::getParams()
Extra parameter values to pass. These are added to the Form's Ext.form.BasicForm.baseParams and passed to the specified URL along with the Form's input fields.
PhpExt_Form_Action::getResult()
The response config object containing a boolean success property and other, action-specific properties.
PhpExt_Form_Action::getScope()
The scope in which to call the callback functions (The this reference for the callback functions).
PhpExt_Form_Action::getSuccessCallback()
PhpExt_Form_Action::getUrl()
The URL that the Action is to invoke.
PhpExt_Form_Action::getWaitMessage()
The message to be displayed by a call to PhpExt_MessageBox::wait() during the time the action is being processed.
PhpExt_Form_Action::getWaitTitle()
The title to be displayed by a call to PhpExt_MessageBox::wait() during the time the action is being processed.
PhpExt_Form_Action::setFailureCallback()
The function to call when a failure packet was recieved, or when an error ocurred in the Ajax communication. The function is passed the following parameters:
PhpExt_Form_Action::setFailureType()
The type of failure detected. Possible values are
PhpExt_Form_Action::setMethod()
The HTTP method to use to access the requested URL. Defaults to the Ext.form.BasicForm's method, or if that is not specified, the underlying DOM form's method.
PhpExt_Form_Action::setParams()
Extra parameter values to pass. These are added to the Form's Ext.form.BasicForm.baseParams and passed to the specified URL along with the Form's input fields.
PhpExt_Form_Action::setResult()
The response config object containing a boolean success property and other, action-specific properties.
PhpExt_Form_Action::setScope()
The scope in which to call the callback functions (The this reference for the callback functions).
PhpExt_Form_Action::setSuccessCallback()
The function to call when a valid success return packet is recieved. The function is passed the following parameters:
PhpExt_Form_Action::setUrl()
The URL that the Action is to invoke.
PhpExt_Form_Action::setWaitMessage()
The message to be displayed by a call to PhpExt_MessageBox::wait() during the time the action is being processed.
PhpExt_Form_Action::setWaitTitle()
The title to be displayed by a call to PhpExt_MessageBox::wait() during the time the action is being processed.

Inherited From PhpExt_Object

PhpExt_Object::__construct()
PhpExt_Object::addValidConfigProperties()
PhpExt_Object::createMethodSignature()
PhpExt_Object::getConfigParams()
PhpExt_Object::getExtConfigProperty()
PhpExt_Object::getJavascript()
PhpExt_Object::getMethodInvokeStm()
PhpExt_Object::isExtObject()
PhpExt_Object::paramToString()
PhpExt_Object::setExtClassInfo()
PhpExt_Object::setExtConfigProperty()
PhpExt_Object::__get()
PhpExt_Object::__set()

Inherited From PhpExt_Form_Action

PhpExt_Form_Action::FAILURE_TYPE_CLIENT_INVALID
PhpExt_Form_Action::FAILURE_TYPE_CONNECT_FAILURE
PhpExt_Form_Action::FAILURE_TYPE_LOAD_FAILURE
PhpExt_Form_Action::FAILURE_TYPE_SERVER_INVALID

[ Top ]
Method Summary
PhpExt_Form_Action_Response   __construct()  
void   getJavascript()  

[ Top ]
Methods
Constructor __construct  [line 51]

  PhpExt_Form_Action_Response __construct( )


API Tags:
Access:  public


Redefinition of:
PhpExt_Form_Action::__construct()

[ Top ]
getJavascript  [line 56]

  void getJavascript( [ $lazy = false], [ $varName = null]  )

Parameters:
   $lazy: 
   $varName: 

API Tags:
Access:  public


Redefinition of:
PhpExt_Object::getJavascript()

[ Top ]

Documentation generated on Fri, 08 Aug 2008 15:58:45 -0500 by phpDocumentor 1.4.0