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

Class: PhpExt_Form_Action

Source Location: /PhpExt/Form/Action.php

Class PhpExt_Form_Action

Class Overview

The subclasses of this class provide actions to perform upon Forms.

Instances of this class are only created by a Form when the Form needs to perform an action such as submit or load. The Configuration options listed for this class are set through the Form's action methods: submit, load and doAction.

The instance of Action which performed the action is passed to the success and failure callbacks of the Form's action methods (submit, load and doAction), and to the actioncomplete and actionfailed event handlers.

Located in /PhpExt/Form/Action.php [line 27]

PhpExt_Object
   |
   --PhpExt_Form_Action

Methods

[ Top ]
Descendants
Child Class Description
PhpExt_Form_Action_Load A class which handles loading of data from a server into the Fields of an Ext.form.BasicForm.
PhpExt_Form_Action_Response An action response object for

[ Top ]
Method Summary
PhpExt_Form_Action   __construct()  
PhpExt_Handler   getFailureCallback()  
string   getFailureType()   The type of failure detected. Possible values are
string   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.
array   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.
boolean   getResult()   The response config object containing a boolean success property and other, action-specific properties.
PhpExt_JavascriptStm   getScope()   The scope in which to call the callback functions (The this reference for the callback functions).
PhpExt_Handler   getSuccessCallback()  
string   getUrl()   The URL that the Action is to invoke.
string   getWaitMessage()   The message to be displayed by a call to PhpExt_MessageBox::wait() during the time the action is being processed.
string   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.

[ Top ]
Methods
Constructor __construct  [line 268]

  PhpExt_Form_Action __construct( )


API Tags:
Access:  public


Redefinition of:
PhpExt_Object::__construct()

Redefined in descendants as:

[ Top ]
getFailureCallback  [line 54]

  PhpExt_Handler getFailureCallback( )


API Tags:
Access:  public


[ Top ]
getFailureType  [line 241]

  string getFailureType( )

The type of failure detected. Possible values are

Action Response properties:

When loading or submitting a form the response should be an Action object. The following properties are intended to be used when responding to a form load or submit request

  • 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


API Tags:
Access:  public
Uses:  PhpExt_Form_Action::FAILURE_TYPE_SERVER_INVALID
Uses:  PhpExt_Form_Action::FAILURE_TYPE_LOAD_FAILURE
Uses:  PhpExt_Form_Action::FAILURE_TYPE_CONNECT_FAILURE
Uses:  PhpExt_Form_Action::FAILURE_TYPE_CLIENT_INVALID


[ Top ]
getMethod  [line 82]

  string 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.

Posible values are:

  • PhpExt_Form_FormPanel::METHOD_GET
  • PhpExt_Form_FormPanel::METHOD_POST


API Tags:
Access:  public
Uses:  PhpExt_Form_FormPanel::METHOD_POST
Uses:  PhpExt_Form_FormPanel::METHOD_GET


[ Top ]
getParams  [line 100]

  array 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.


API Tags:
Return:  Format: array('param1'=>'value1','param2'=>'value2')
Access:  public


[ Top ]
getResult  [line 261]

  boolean getResult( )

The response config object containing a boolean success property and other, action-specific properties.

Action Response properties:

When loading or submitting a form the response should be an Action object. The following properties are intended to be used when responding to a form load or submit request


API Tags:
Access:  public


[ Top ]
getScope  [line 118]

  PhpExt_JavascriptStm getScope( )

The scope in which to call the callback functions (The this reference for the callback functions).


API Tags:
Access:  public


[ Top ]
getSuccessCallback  [line 142]

  PhpExt_Handler getSuccessCallback( )


API Tags:
Access:  public


[ Top ]
getUrl  [line 160]

  string getUrl( )

The URL that the Action is to invoke.


API Tags:
Access:  public


[ Top ]
getWaitMessage  [line 178]

  string getWaitMessage( )

The message to be displayed by a call to PhpExt_MessageBox::wait() during the time the action is being processed.


API Tags:
Access:  public


[ Top ]
getWaitTitle  [line 196]

  string getWaitTitle( )

The title to be displayed by a call to PhpExt_MessageBox::wait() during the time the action is being processed.


API Tags:
Access:  public


[ Top ]
setFailureCallback  [line 46]

  PhpExt_Form_Action setFailureCallback( PhpExt_Handler $value  )

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:

<dl> <dt>form : Ext.form.BasicForm</dt> <dd>The form that requested the action</dd> <dt>action : Ext.form.Action</dt> <dd>The Action class. If an Ajax error ocurred, the failure type will be in failureType. The result property of this object may be examined to perform custom postprocessing.</dd> </dl>

Parameters:
PhpExt_Handler   $value: 

API Tags:
Access:  public


[ Top ]
setFailureType  [line 224]

  PhpExt_Form_Action setFailureType( string $value  )

The type of failure detected. Possible values are

Action Response properties:

When loading or submitting a form the response should be an Action object. The following properties are intended to be used when responding to a form load or submit request

  • 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

Parameters:
string   $value: 

API Tags:
Access:  public
Uses:  PhpExt_Form_Action::FAILURE_TYPE_SERVER_INVALID
Uses:  PhpExt_Form_Action::FAILURE_TYPE_LOAD_FAILURE
Uses:  PhpExt_Form_Action::FAILURE_TYPE_CONNECT_FAILURE
Uses:  PhpExt_Form_Action::FAILURE_TYPE_CLIENT_INVALID


[ Top ]
setMethod  [line 69]

  PhpExt_Form_Action setMethod( string $value  )

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.

Posible values are:

  • PhpExt_Form_FormPanel::METHOD_GET
  • PhpExt_Form_FormPanel::METHOD_POST

Parameters:
string   $value: 

API Tags:
Access:  public
Uses:  PhpExt_Form_FormPanel::METHOD_POST
Uses:  PhpExt_Form_FormPanel::METHOD_GET


[ Top ]
setParams  [line 92]

  PhpExt_Form_Action setParams( array $value  )

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.

Parameters:
array   $value:  Format: array('param1'=>'value1','param2'=>'value2')

API Tags:
Access:  public


[ Top ]
setResult  [line 253]

  PhpExt_Form_Action setResult( boolean $value  )

The response config object containing a boolean success property and other, action-specific properties.

Action Response properties:

When loading or submitting a form the response should be an Action object. The following properties are intended to be used when responding to a form load or submit request

Parameters:
boolean   $value: 

API Tags:
Access:  public


[ Top ]
setScope  [line 110]

  PhpExt_Form_Action setScope( PhpExt_JavascriptStm $value  )

The scope in which to call the callback functions (The this reference for the callback functions).

Parameters:
PhpExt_JavascriptStm   $value: 

API Tags:
Access:  public


[ Top ]
setSuccessCallback  [line 134]

  PhpExt_Form_Action setSuccessCallback( PhpExt_Handler $value  )

The function to call when a valid success return packet is recieved. The function is passed the following parameters:

<dl> <dt>form : Ext.form.BasicForm</dt> <dd>The form that requested the action</dd> <dt>action : Ext.form.Action</dt> <dd>The Action class. The result property of this object may be examined to perform custom postprocessing.</dd> </dl>

Parameters:
PhpExt_Handler   $value: 

API Tags:
Access:  public


[ Top ]
setUrl  [line 152]

  PhpExt_Form_Action setUrl( string $value  )

The URL that the Action is to invoke.

Parameters:
string   $value: 

API Tags:
Access:  public


[ Top ]
setWaitMessage  [line 170]

  PhpExt_Form_Action setWaitMessage( string $value  )

The message to be displayed by a call to PhpExt_MessageBox::wait() during the time the action is being processed.

Parameters:
string   $value: 

API Tags:
Access:  public


[ Top ]
setWaitTitle  [line 188]

  PhpExt_Form_Action setWaitTitle( string $value  )

The title to be displayed by a call to PhpExt_MessageBox::wait() during the time the action is being processed.

Parameters:
string   $value: 

API Tags:
Access:  public


[ Top ]
Constants
FAILURE_TYPE_CLIENT_INVALID = 'Action.CLIENT_INVALID' [line 29]
API Tags:
Usedby:  PhpExt_Form_Action::getFailureType()
Usedby:  PhpExt_Form_Action::setFailureType()


[ Top ]
FAILURE_TYPE_CONNECT_FAILURE = 'Action.CONNECT_FAILURE' [line 30]
API Tags:
Usedby:  PhpExt_Form_Action::getFailureType()
Usedby:  PhpExt_Form_Action::setFailureType()


[ Top ]
FAILURE_TYPE_LOAD_FAILURE = 'Action.LOAD_FAILURE' [line 31]
API Tags:
Usedby:  PhpExt_Form_Action::getFailureType()
Usedby:  PhpExt_Form_Action::setFailureType()


[ Top ]
FAILURE_TYPE_SERVER_INVALID = 'Action.SERVER_INVALID' [line 32]
API Tags:
Usedby:  PhpExt_Form_Action::getFailureType()
Usedby:  PhpExt_Form_Action::setFailureType()


[ Top ]

Documentation generated on Fri, 08 Aug 2008 15:49:41 -0500 by phpDocumentor 1.4.0