phpDocumentor openbiz.bin.easy
[ class tree: openbiz.bin.easy ] [ index: openbiz.bin.easy ] [ all elements ]

Class: EasyForm

Source Location: /easy/EasyForm.php

Class EasyForm

Class Overview

EasyForm class - contains form object metadata functions

Located in /easy/EasyForm.php [line 28]

MetaObject
   |
   --EasyForm
Author(s):
  • Rocky Swen
API Tags:
Access:  public

Information Tags:
Copyright:  Copyright (c) 2005-2009

Properties

Methods

[ Top ]
Direct descendents
Child Class Description
EasyFormTree EasyFormTree class - contains formtree object metadata functions
EasyFormWizard EasyFormWizard class - extension of BizForm to support wizard form
PickerForm PickerForm class - contains form object metadata functions for picker

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

Inherited From MetaObject

MetaObject::$m_Access
MetaObject::$m_Class
MetaObject::$m_Name
MetaObject::$m_Package

Inherited From MetaObject

MetaObject::__construct()
MetaObject::AllowAccess()
MetaObject::GetProperty()
Get property
MetaObject::PrefixPackage()
Set Prefix Package
MetaObject::ReadMetaCollection()
Read metadata collection
MetaObject::ReadMetaData()
Read meta data

[ Top ]
Property Summary
mixed   $DATAFORMAT  
Panel   $m_ActionPanel   Action Panel object
mixed   $m_ActiveRecord  
mixed   $m_CacheLifeTime  
mixed   $m_CurrentPage  
mixed   $m_DataObj  
mixed   $m_DataObjName  
Panel   $m_DataPanel   Data Panel object
mixed   $m_DefaultForm  
mixed   $m_Description  
mixed   $m_EventName  
mixed   $m_FixSearchRule  
mixed   $m_FormType  
mixed   $m_hasError  
mixed   $m_Height  
mixed   $m_jsClass  
mixed   $m_MessageFile  
mixed   $m_Messages  
Panel   $m_NavPanel   Navigation Panel object
mixed   $m_ParentFormName  
mixed   $m_QueryStringParam  
mixed   $m_Range  
mixed   $m_RecordId  
mixed   $m_RecordSet  
mixed   $m_Referer  
mixed   $m_RefreshData  
mixed   $m_Resource  
Panel   $m_SearchPanel   Search Panel object
mixed   $m_SearchRule  
mixed   $m_SearchRuleBindValues  
mixed   $m_SubForms  
mixed   $m_TemplateEngine  
mixed   $m_TemplateFile  
mixed   $m_Title  
mixed   $m_TotalPages  
mixed   $m_TotalRecords  
mixed   $m_ValidateErrors  
mixed   $m_Width  

[ Top ]
Method Summary
void   __construct()   Initialize BizForm with xml array
void   AutoSuggest()   Generate list for AutoSuggest listing. Formatted for simple of hidden inputs
mixed   CallService()   Call/Invoke service method, this EasyForm name is passed to the method
void   Cancel()   Cancel input and do page redirection
void   Close()   Close the popup window
void   CopyRecord()   Copy Record
void   DeleteRecord()   Delete Record NOTE: use redirectpage attr of eventhandler to redirect or redirect to previous page by default
   EditRecord()   Edit Record NOTE: append fld:Id=$id to the redirect page url
array   FetchData()   Fetch single record
array   FetchDataSet()   Fetch record set
   GetActiveRecord()   Get activeRecord
BizDataObj   GetDataObj()   Get object instance of BizDataObj defined in it's metadata file
Element   GetElement()   Get an element object
array   GetErrorElements()   Get error elements
string   GetErrorMessage()   Get error message
mixed   GetEventLogMsg()   Get event log message
string   GetMessage()   Get message, and translate it
array   GetNewRecord()   Get new record
array   GetOnEventElements()   Get on event elements
   GetProperty()   Get object property
array   GetRedirectPage()   return redirect page and target array
void   GetSessionVars()   Get/Retrieve Session data of this object
EasyForm   GetSubForms()   Get sub form of this form
void   GetViewObject()  
void   GotoPage()   Goto page specified by $page parameter, and ReRender
mixed   InsertRecord()   Insert new record
void   LoadPicker()   Popup a selection EasyForm in a dynamically generated EasyView
void   LoadPopForm()   Load pop form
void   NewRecord()   New record, be default, just redirect to the new record page
array   OutputAttrs()   Get output attributs as array
string   ProcessBDOException()   Handle the exception from DataObj method, report the error as an alert window
string   ProcessDataObjError()   Handle the error from DataObj method, report the error as an alert window
string   ProcessFormObjError()   Process error of form object
void   ProcessPostAction()   Process Post Action
array   ReadInputRecord()   Read user input data from UI
array   ReadInputs()   Read inputs
void   ReadMetadata()   Read array meta data, and store to meta object
void   RemoveRecord()   Remove the record out of the associate relationship
string   Render()   Render this form (return html content), called by EasyView's render method (called when form is loaded).
string   RenderContextMenu()   Render context menu code
string   RenderHTML()   Render html content of this form
void   RenderParent()   Render parent form
string   ReRender()   Rerender this form (form is rendered already) .
void   ReRenderSubForms()   Rerender sub forms who has dependecy on this form.
void   RunEventLog()  
void   RunSearch()   Run Search
void   SaveRecord()   Save input and redirect page to a new view
void   SelectRecord()   Select Record
void   SetActiveRecord()   Set active record
void   SetClientScripts()   Set client scripts, auto add javascripts code to the page
void   SetDataObj()   Set data object (BizDataObj) with specified instant from parameter
void   SetFixSearchRule()   Set the dependent search rule of the bizform, this search rule will apply on its BizDataObj.
void   SetRequestParams()   Set request parameters
void   SetSessionVars()   Save object variable to session context
void   SetSubForms()   Set the sub forms of this form. This form is parent of other forms
void   SortRecord()   Sort Record, for list form
void   UpdateForm()   Update form controls
mixed   UpdateRecord()   Update record
void   ValidateForm()  
void   _showForm()  

[ Top ]
Properties
mixed   $DATAFORMAT = 'RECORD' [line 30]
API Tags:
Access:  public


[ Top ]
Panel   $m_ActionPanel [line 52]

Action Panel object

API Tags:
Access:  public


[ Top ]
mixed   $m_ActiveRecord = null [line 81]
API Tags:
Access:  protected


[ Top ]
mixed   $m_CacheLifeTime = 0 [line 70]
API Tags:
Access:  public


[ Top ]
mixed   $m_CurrentPage = 1 [line 93]
API Tags:
Access:  protected


[ Top ]
mixed   $m_DataObj [line 79]
API Tags:
Access:  protected


[ Top ]
mixed   $m_DataObjName [line 36]
API Tags:
Access:  public


[ Top ]
Panel   $m_DataPanel [line 46]

Data Panel object

API Tags:
Access:  public


[ Top ]
mixed   $m_DefaultForm [line 39]
API Tags:
Access:  public


[ Top ]
mixed   $m_Description [line 34]
API Tags:
Access:  public


Redefinition of:
MetaObject::$m_Description

[ Top ]
mixed   $m_EventName [line 62]
API Tags:
Access:  public


[ Top ]
mixed   $m_FixSearchRule = null [line 84]
API Tags:
Access:  protected


[ Top ]
mixed   $m_FormType [line 61]
API Tags:
Access:  public


[ Top ]
mixed   $m_hasError = false [line 88]
API Tags:
Access:  protected


[ Top ]
mixed   $m_Height [line 37]
API Tags:
Access:  public


[ Top ]
mixed   $m_jsClass [line 35]
API Tags:
Access:  public


[ Top ]
mixed   $m_MessageFile = null [line 87]
API Tags:
Access:  protected


[ Top ]
mixed   $m_Messages [line 100]
API Tags:
Access:  protected


[ Top ]
Panel   $m_NavPanel [line 58]

Navigation Panel object

API Tags:
Access:  public


[ Top ]
mixed   $m_ParentFormName [line 73]
API Tags:
Access:  public


[ Top ]
mixed   $m_QueryStringParam [line 76]
API Tags:
Access:  public


[ Top ]
mixed   $m_Range = 10 [line 63]
API Tags:
Access:  public


[ Top ]
mixed   $m_RecordId = null [line 80]
API Tags:
Access:  protected


[ Top ]
mixed   $m_RecordSet = null [line 96]
API Tags:
Access:  protected


Redefined in descendants as:

[ Top ]
mixed   $m_Referer = "" [line 86]
API Tags:
Access:  protected


[ Top ]
mixed   $m_RefreshData = false [line 97]
API Tags:
Access:  protected


[ Top ]
mixed   $m_Resource = "" [line 98]
API Tags:
Access:  protected


[ Top ]
Panel   $m_SearchPanel [line 69]

Search Panel object

API Tags:
Access:  public


[ Top ]
mixed   $m_SearchRule = null [line 83]
API Tags:
Access:  protected


[ Top ]
mixed   $m_SearchRuleBindValues [line 85]
API Tags:
Access:  protected


[ Top ]
mixed   $m_SubForms = null [line 82]
API Tags:
Access:  protected


[ Top ]
mixed   $m_TemplateEngine [line 59]
API Tags:
Access:  public


[ Top ]
mixed   $m_TemplateFile [line 60]
API Tags:
Access:  public


[ Top ]
mixed   $m_Title [line 33]
API Tags:
Access:  public


[ Top ]
mixed   $m_TotalPages = 0 [line 94]
API Tags:
Access:  protected


[ Top ]
mixed   $m_TotalRecords = 0 [line 95]
API Tags:
Access:  protected


[ Top ]
mixed   $m_ValidateErrors = array() [line 90]
API Tags:
Access:  protected


[ Top ]
mixed   $m_Width [line 38]
API Tags:
Access:  public


[ Top ]
Methods
Constructor __construct  [line 108]

  void __construct( array &$xmlArr  )

Initialize BizForm with xml array

Parameters:
array   $xmlArr: 


Redefinition of:
MetaObject::__construct()

[ Top ]
AutoSuggest  [line 1071]

  void AutoSuggest( string $input  )

Generate list for AutoSuggest listing. Formatted for simple of hidden inputs

Parameters:
string   $input:  - the search string used to filter the list

API Tags:
Access:  public


[ Top ]
CallService  [line 503]

  mixed CallService( string $class, string $method  )

Call/Invoke service method, this EasyForm name is passed to the method

Parameters:
string   $class: 
string   $method: 

API Tags:
Return:  - return value of the service method
Access:  public


[ Top ]
Cancel  [line 1049]

  void Cancel( )

Cancel input and do page redirection


API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
Close  [line 543]

  void Close( )

Close the popup window


API Tags:
Access:  public


[ Top ]
CopyRecord  [line 767]

  void CopyRecord( [string $id = null]  )

Copy Record

Parameters:
string   $id:  id of record that want to copy

API Tags:
Access:  public


[ Top ]
DeleteRecord  [line 832]

  void DeleteRecord( [string $id = null]  )

Delete Record NOTE: use redirectpage attr of eventhandler to redirect or redirect to previous page by default

Parameters:
string   $id: 

API Tags:
Access:  public


[ Top ]
EditRecord  [line 788]

  EditRecord( [ $id = null]  )

Edit Record NOTE: append fld:Id=$id to the redirect page url

Parameters:
   $id: 

API Tags:
Access:  public


[ Top ]
FetchData  [line 630]

  array FetchData( )

Fetch single record


API Tags:
Return:  one record array
Access:  public


[ Top ]
FetchDataSet  [line 587]

  array FetchDataSet( )

Fetch record set


API Tags:
Return:  array of record
Access:  public


Redefined in descendants as:

[ Top ]
GetActiveRecord  [line 1544]

  GetActiveRecord( [ $recId = null]  )

Get activeRecord

Parameters:
   $recId: 

API Tags:
Access:  protected


[ Top ]
GetDataObj  [line 237]

  BizDataObj GetDataObj( )

Get object instance of BizDataObj defined in it's metadata file


API Tags:
Access:  public


[ Top ]
GetElement  [line 388]

  Element GetElement( string $elementName  )

Get an element object

Parameters:
string   $elementName:  - name of the control

API Tags:
Access:  public


[ Top ]
GetErrorElements  [line 402]

  array GetErrorElements( array $fields  )

Get error elements

Parameters:
array   $fields: 

API Tags:
Access:  public


[ Top ]
GetErrorMessage  [line 312]

  string GetErrorMessage( string $msg  )

Get error message

Parameters:
string   $msg: 

API Tags:
Access:  public


[ Top ]
GetEventLogMsg  [line 1411]

  mixed GetEventLogMsg( )

Get event log message


API Tags:
Return:  string or null
Access:  protected


[ Top ]
GetMessage  [line 168]

  string GetMessage( string $msgId, [array $params = array()]  )

Get message, and translate it

Parameters:
string   $msgId:  message Id
array   $params: 

API Tags:
Return:  message string
Access:  protected


[ Top ]
GetNewRecord  [line 1219]

  array GetNewRecord( )

Get new record


API Tags:
Access:  protected


[ Top ]
GetOnEventElements  [line 1436]

  array GetOnEventElements( )

Get on event elements


API Tags:
Return:  element list
Access:  protected


[ Top ]
GetProperty  [line 213]

  GetProperty( $propertyName  )

Get object property

Parameters:
   $propertyName: 

API Tags:
Access:  public


Redefinition of:
MetaObject::GetProperty()
Get property

[ Top ]
GetRedirectPage  [line 1471]

  array GetRedirectPage( )

return redirect page and target array


API Tags:
Return:  {redirectPage, $target}
Access:  protected


[ Top ]
GetSessionVars  [line 181]

  void GetSessionVars( SessionContext $sessionContext  )

Get/Retrieve Session data of this object

Parameters:
SessionContext   $sessionContext: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
GetSubForms  [line 376]

  EasyForm GetSubForms( )

Get sub form of this form


API Tags:
Access:  public


[ Top ]
GetViewObject  [line 363]

  void GetViewObject( )


API Tags:
Access:  public


[ Top ]
GotoPage  [line 673]

  void GotoPage( [number $page = 1]  )

Goto page specified by $page parameter, and ReRender

Parameters:
number   $page: 

API Tags:
Access:  public


[ Top ]
InsertRecord  [line 987]

  mixed InsertRecord( )

Insert new record


API Tags:
Access:  public


[ Top ]
LoadPicker  [line 467]

  void LoadPicker( string $viewName, string $formName, [string $elementName = ""]  )

Popup a selection EasyForm in a dynamically generated EasyView

Parameters:
string   $viewName: 
string   $formName: 
string   $elementName: 

API Tags:
Access:  public


[ Top ]
LoadPopForm  [line 421]

  void LoadPopForm( string $viewName, string $formName, [string $queryStr = ""]  )

Load pop form

Parameters:
string   $viewName: 
string   $formName: 
string   $queryStr: 

API Tags:
Access:  public


[ Top ]
NewRecord  [line 756]

  void NewRecord( )

New record, be default, just redirect to the new record page


API Tags:
Access:  public


[ Top ]
OutputAttrs  [line 270]

  array OutputAttrs( )

Get output attributs as array


API Tags:
Return:  array of attributs
Access:  public


Redefined in descendants as:

[ Top ]
ProcessBDOException  [line 328]

  string ProcessBDOException( mixed $e, int $errCode  )

Handle the exception from DataObj method, report the error as an alert window

Parameters:
int   $errCode: 

API Tags:
Access:  public


[ Top ]
ProcessDataObjError  [line 287]

  string ProcessDataObjError( [int $errCode = 0]  )

Handle the error from DataObj method, report the error as an alert window

Parameters:
int   $errCode: 

API Tags:
Access:  public


[ Top ]
ProcessFormObjError  [line 300]

  string ProcessFormObjError( array $errors  )

Process error of form object

Parameters:
array   $errors: 

API Tags:
Return:  - HTML text of this form's read mode
Access:  public


[ Top ]
ProcessPostAction  [line 1502]

  void ProcessPostAction( )

Process Post Action


API Tags:
Access:  protected


[ Top ]
ReadInputRecord  [line 1167]

  array ReadInputRecord( )

Read user input data from UI


API Tags:
Return:  - record array
Access:  protected


[ Top ]
ReadInputs  [line 1195]

  array ReadInputs( )

Read inputs


API Tags:
Return:  array of input
Access:  protected


[ Top ]
ReadMetadata  [line 120]

  void ReadMetadata( array &$xmlArr  )

Read array meta data, and store to meta object

Parameters:
array   $xmlArr: 

API Tags:
Access:  protected


Redefined in descendants as:

[ Top ]
RemoveRecord  [line 871]

  void RemoveRecord( )

Remove the record out of the associate relationship


API Tags:
Access:  public


[ Top ]
Render  [line 1251]

  string Render( )

Render this form (return html content), called by EasyView's render method (called when form is loaded).

Query is issued before returning the html content.


API Tags:
Return:  - HTML text of this form's read mode
Access:  public


Redefined in descendants as:

[ Top ]
RenderContextMenu  [line 1301]

  string RenderContextMenu( )

Render context menu code


API Tags:
Return:  html code for context menu
Access:  protected


[ Top ]
RenderHTML  [line 1399]

  string RenderHTML( )

Render html content of this form


API Tags:
Return:  - HTML text of this form's read mode
Access:  protected


[ Top ]
RenderParent  [line 553]

  void RenderParent( )

Render parent form


API Tags:
Access:  public


[ Top ]
ReRender  [line 1360]

  string ReRender( [boolean $redrawForm = true], [boolean $hasRecordChange = true]  )

Rerender this form (form is rendered already) .

Parameters:
boolean   $redrawForm:  - whether render this form again or not
boolean   $hasRecordChange:  - if record change, need to render subforms

API Tags:
Return:  - HTML text of this form's read mode
Access:  public


[ Top ]
ReRenderSubForms  [line 1379]

  void ReRenderSubForms( )

Rerender sub forms who has dependecy on this form.

This method is called when parent form's change affect the sub forms


API Tags:
Access:  protected


[ Top ]
RunEventLog  [line 1452]

  void RunEventLog( )


API Tags:
Access:  protected


[ Top ]
RunSearch  [line 715]

  void RunSearch( )

Run Search


API Tags:
Access:  public


[ Top ]
SaveRecord  [line 906]

  void SaveRecord( )

Save input and redirect page to a new view

use redirectpage attr of eventhandler to redirect or redirect to previous page by default NOTE: For Edit/New form type


API Tags:
Access:  public


[ Top ]
SelectRecord  [line 890]

  void SelectRecord( string $recId  )

Select Record

Parameters:
string   $recId: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
SetActiveRecord  [line 1576]

  void SetActiveRecord( $rec  )

Set active record

Parameters:
   $rec: 

API Tags:
Access:  protected


[ Top ]
SetClientScripts  [line 1588]

  void SetClientScripts( )

Set client scripts, auto add javascripts code to the page


API Tags:
Access:  protected


[ Top ]
SetDataObj  [line 260]

  void SetDataObj( BizDataObj $dataObj  )

Set data object (BizDataObj) with specified instant from parameter

Parameters:
BizDataObj   $dataObj: 

API Tags:
Access:  public


[ Top ]
SetFixSearchRule  [line 568]

  void SetFixSearchRule( [string $rule = null], [boolean $cleanActualRule = true]  )

Set the dependent search rule of the bizform, this search rule will apply on its BizDataObj.

The dependent search rule (session var) will always be with bizform until it get set to other value

Parameters:
string   $rule:  - search rule has format "[fieldName1] opr1 Value1 AND/OR [fieldName2] opr2 Value2"
boolean   $cleanActualRule: 

API Tags:
Access:  public


[ Top ]
SetRequestParams  [line 517]

  void SetRequestParams( array $paramFields  )

Set request parameters

Parameters:
array   $paramFields: 

API Tags:
Access:  public


[ Top ]
SetSessionVars  [line 197]

  void SetSessionVars( SessionContext $sessionContext  )

Save object variable to session context

Parameters:
SessionContext   $sessionContext: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
SetSubForms  [line 341]

  void SetSubForms( string $subForms  )

Set the sub forms of this form. This form is parent of other forms

Parameters:
string   $subForms:  - sub controls string with format: ctrl1;ctrl2...

API Tags:
Access:  public


[ Top ]
SortRecord  [line 687]

  void SortRecord( string $sortCol, [string $order = 'asc']  )

Sort Record, for list form

Parameters:
string   $sortCol:  column name to sort
string   $order:  'dec' (decending) or 'asc' (ascending)

API Tags:
Access:  public


[ Top ]
UpdateForm  [line 1059]

  void UpdateForm( )

Update form controls


API Tags:
Access:  public


[ Top ]
UpdateRecord  [line 923]

  mixed UpdateRecord( )

Update record


API Tags:
Access:  public


[ Top ]
ValidateForm  [line 1117]

  void ValidateForm( )


API Tags:
Access:  protected


[ Top ]
_showForm  [line 805]

  void _showForm( mixed $formName, mixed $target, mixed $paramFields  )


API Tags:
Access:  protected


[ Top ]

Documentation generated on Tue, 22 Dec 2009 03:02:47 -0800 by phpDocumentor 1.3.0RC3