Public Member Functions | |
__construct (&$xmlArr) | |
allowAccess ($access=null) | |
canDisplayForm () | |
canDeleteRecord ($rec) | |
getSessionVars ($sessionContext) | |
setSessionVars ($sessionContext) | |
invoke () | |
validateRequest ($methodName) | |
getProperty ($propertyName) | |
getDataObj () | |
setDataObj ($dataObj) | |
outputAttrs () | |
processDataObjError ($errCode=0) | |
processFormObjError ($errors) | |
processBDOException ($e) | |
setSubForms ($subForms) | |
getViewObject () | |
getSubForms () | |
getElement ($elementName) | |
getElementSet ($panel=null) | |
getTabSet ($panel=null) | |
getErrorElements ($fields) | |
loadPicker ($formName, $elementName="") | |
loadDialog ($formName, $id=null, $transId=false) | |
callService ($class, $method, $param=null) | |
setRequestParams ($paramFields) | |
setCurrentPage ($pageid) | |
close () | |
renderParent () | |
setFixSearchRule ($rule=null, $cleanActualRule=true) | |
fetchDataSet () | |
fetchData () | |
gotoPage ($page=1) | |
gotoSelectedPage ($elemName) | |
setPageSize ($elemName) | |
sortRecord ($sortCol, $order='ASC') | |
runSearch () | |
resetSearch () | |
setSearchRule ($searchRule, $searchRuleBindValues=null) | |
newRecord () | |
copyRecord ($id=null) | |
editRecord ($id=null) | |
deleteRecord ($id=null) | |
removeRecord () | |
selectRecord ($recId) | |
getElementID () | |
saveRecord () | |
updateRecord () | |
updateFieldValueAdd ($id, $fld_name, $value, $min, $max) | |
updateFieldValueXor ($id, $fld_name, $value) | |
updateFieldValue ($Id, $fld_name, $value) | |
insertRecord () | |
cancel () | |
updateForm () | |
autoSuggest ($input) | |
setFormInputs ($inputArr=null) | |
render () | |
rerender ($redrawForm=true, $hasRecordChange=true) | |
switchForm ($formName=null, $id=null, $params=null, $target=null) | |
parentSwitchForm ($formName=null, $id=null, $params=null, $target=null) | |
targetSwitchForm ($targetForm, $formName=null, $id=null, $params=null, $target=null) | |
getActiveRecord ($recId=null) | |
getRecordId () | |
setRecordId ($val) | |
Data Fields | |
$DATAFORMAT = 'RECORD' | |
$m_Title | |
$m_Icon | |
$m_Description | |
$m_jsClass | |
$m_DataObjName | |
$m_Height | |
$m_Width | |
$m_DefaultForm | |
$m_CanUpdateRecord | |
$m_DirectMethodList = null | |
$m_Panels | |
$m_InheritFrom | |
$m_DataPanel | |
$m_ActionPanel | |
$m_NavPanel | |
$m_SearchPanel | |
$m_TemplateEngine | |
$m_TemplateFile | |
$m_FormType | |
$m_SubForms = null | |
$m_EventName | |
$m_Range = 10 | |
$m_CacheLifeTime = 0 | |
$m_FormParams | |
$m_ParentFormName | |
$m_DefaultFormName = null | |
$m_QueryStringParam | |
$m_Errors | |
$m_Notices | |
$m_ActiveRecord = null | |
$m_FormInputs = null | |
$m_SearchRule = null | |
$m_FixSearchRule = null | |
$m_SortRule = null | |
$m_MessageFile = null | |
$m_TotalPages = 1 | |
$m_AutoRefresh = 0 | |
$m_ReferenceFormName | |
Protected Member Functions | |
readMetadata (&$xmlArr) | |
inheritParentObj () | |
getMessage ($messageId, $params=array()) | |
_showForm ($formName, $target, $paramFields) | |
_doUpdate ($inputRecord, $currentRecord) | |
_doInsert ($inputRecord) | |
validateForm ($cleanError=true) | |
readInputRecord () | |
readInputs () | |
getNewRecord () | |
renderContextMenu () | |
rerenderSubForms () | |
renderHTML () | |
getEventLogMsg () | |
getOnEventElements () | |
runEventLog () | |
getRedirectPage () | |
getInvokingElement () | |
processPostAction () | |
setActiveRecord ($record) | |
setClientScripts () | |
translate () | |
getTransKey ($name) | |
Protected Attributes | |
$m_DataObj | |
$m_RecordId = null | |
$m_DefaultFixSearchRule = null | |
$m_SearchRuleBindValues | |
$m_Referer = "" | |
$m_hasError = false | |
$m_ValidateErrors = array() | |
$m_CurrentPage = 1 | |
$m_StartItem = 1 | |
$m_TotalRecords = 0 | |
$m_RecordSet = null | |
$m_RefreshData = false | |
$m_Resource = "" | |
$m_Messages | |
$m_InvokingElement = null | |
$m_RecordAllowAccess = true |
Definition at line 28 of file EasyForm.php.
__construct | ( | &$ | xmlArr ) |
Initialize BizForm with xml array
array | $xmlArr |
Reimplemented from MetaObject.
Definition at line 136 of file EasyForm.php.
_doInsert | ( | $ | inputRecord ) | [protected] |
Do insert record
array | $inputRecord |
Definition at line 1580 of file EasyForm.php.
_doUpdate | ( | $ | inputRecord, |
$ | currentRecord | ||
) | [protected] |
Do update record
array | $inputRecord | |
array | $currentRecord |
Definition at line 1500 of file EasyForm.php.
_showForm | ( | $ | formName, |
$ | target, | ||
$ | paramFields | ||
) | [protected] |
Show form
string | $formName | |
string | $target | target type: Popup or other |
array | $paramFields |
Definition at line 1194 of file EasyForm.php.
allowAccess | ( | $ | access = null ) |
Check is allow access?
BizSystem $g_BizSystem
<type> | $access |
if the record is now allowed to access, then deny form render instead of display an empty form
Reimplemented from MetaObject.
Definition at line 143 of file EasyForm.php.
autoSuggest | ( | $ | input ) |
Generate list for AutoSuggest element Also supports elements that have hidden values
string | $input | - the search string used to filter the list |
Definition at line 1649 of file EasyForm.php.
callService | ( | $ | class, |
$ | method, | ||
$ | param = null |
||
) |
Call/Invoke service method, this EasyForm name is passed to the method
string | $class | |
string | $method | |
string | $param |
Definition at line 774 of file EasyForm.php.
cancel | ( | ) |
Cancel input and do page redirection
Reimplemented in EasyFormWizard.
Definition at line 1621 of file EasyForm.php.
close | ( | ) |
Close the popup window
Definition at line 822 of file EasyForm.php.
copyRecord | ( | $ | id = null ) |
Copy record to new record *
mixed | $id | id of record that want to copy, it parameter not passed, id is '_selectedId' |
Definition at line 1148 of file EasyForm.php.
deleteRecord | ( | $ | id = null ) |
Delete Record NOTE: use redirectpage attr of eventhandler to redirect or redirect to previous page by default
string | $id |
Definition at line 1285 of file EasyForm.php.
editRecord | ( | $ | id = null ) |
Edit Record NOTE: append fld:Id=$id to the redirect page url
mixed | $id |
Definition at line 1169 of file EasyForm.php.
fetchData | ( | ) |
Fetch single record
Definition at line 948 of file EasyForm.php.
fetchDataSet | ( | ) |
Fetch record set
Reimplemented in EasyFormGrouping, and EasyFormTree.
Definition at line 869 of file EasyForm.php.
getActiveRecord | ( | $ | recId = null ) |
Get activeRecord
mixed | $recId |
Definition at line 2234 of file EasyForm.php.
getDataObj | ( | ) |
Get object instance of BizDataObj defined in it's metadata file
Definition at line 479 of file EasyForm.php.
getElement | ( | $ | elementName ) |
Get an element object
string | $elementName | - name of the control |
Definition at line 636 of file EasyForm.php.
getElementID | ( | ) |
getErrorElements | ( | $ | fields ) |
Get error elements
array | $fields |
Definition at line 718 of file EasyForm.php.
getEventLogMsg | ( | ) | [protected] |
Get event log message
Definition at line 2058 of file EasyForm.php.
getInvokingElement | ( | ) | [protected] |
Get the element that issues the call.
Definition at line 2172 of file EasyForm.php.
getMessage | ( | $ | messageId, |
$ | params = array() |
||
) | [protected] |
Get message, and translate it
string | $messageId | message Id |
array | $params |
Definition at line 285 of file EasyForm.php.
getNewRecord | ( | ) | [protected] |
Get new record
Definition at line 1844 of file EasyForm.php.
getOnEventElements | ( | ) | [protected] |
Get on event elements
Definition at line 2077 of file EasyForm.php.
getProperty | ( | $ | propertyName ) |
Get object property This method get element object if propertyName is "Elements[elementName]" format.
string | $propertyName |
Reimplemented from MetaObject.
Definition at line 448 of file EasyForm.php.
getRedirectPage | ( | ) | [protected] |
return redirect page and target array
Definition at line 2110 of file EasyForm.php.
getSessionVars | ( | $ | sessionContext ) |
Get/Retrieve Session data of this object
SessionContext | $sessionContext |
Implements iSessionObject.
Reimplemented in EasyFormWizard, and PickerForm.
Definition at line 348 of file EasyForm.php.
getSubForms | ( | ) |
getViewObject | ( | ) |
Get view object
BizSystem $g_BizSystem
Definition at line 610 of file EasyForm.php.
gotoPage | ( | $ | page = 1 ) |
Goto page specified by $page parameter, and ReRender If page not specified, goto page 1
number | $page |
Definition at line 1007 of file EasyForm.php.
inheritParentObj | ( | ) | [protected] |
Inherit from parent object. Name, Package, Class cannot be inherited
Definition at line 227 of file EasyForm.php.
insertRecord | ( | ) |
Insert new record
Definition at line 1542 of file EasyForm.php.
invoke | ( | ) |
Invoke the action passed from browser
Definition at line 389 of file EasyForm.php.
loadPicker | ( | $ | formName, |
$ | elementName = "" |
||
) |
Popup a selection EasyForm in a dynamically generated EasyView
string | $viewName | |
string | $formName | |
string | $elementName |
Definition at line 738 of file EasyForm.php.
newRecord | ( | ) |
New record, be default, just redirect to the new record page
Definition at line 1136 of file EasyForm.php.
outputAttrs | ( | ) |
Get output attributs as array
Reimplemented in EasyFormGrouping, and EasyFormWizard.
Definition at line 513 of file EasyForm.php.
processBDOException | ( | $ | e ) |
Handle the exception from DataObj method, report the error as an alert window
int | $errCode |
Definition at line 575 of file EasyForm.php.
processDataObjError | ( | $ | errCode = 0 ) |
Handle the error from BizDataObj::getErrorMessage method, report the error as an alert window and log.
int | $errCode |
Definition at line 548 of file EasyForm.php.
processFormObjError | ( | $ | errors ) |
Process error of form object
array | $errors |
Definition at line 561 of file EasyForm.php.
processPostAction | ( | ) | [protected] |
Process Post Action
Definition at line 2192 of file EasyForm.php.
readInputRecord | ( | ) | [protected] |
Read user input data from UI
Definition at line 1755 of file EasyForm.php.
readInputs | ( | ) | [protected] |
Read inputs
Definition at line 1793 of file EasyForm.php.
readMetadata | ( | &$ | xmlArr ) | [protected] |
Read array meta data, and store to meta object
array | $xmlArr |
Reimplemented from MetaObject.
Reimplemented in EasyFormGrouping, and EasyFormTree.
Definition at line 163 of file EasyForm.php.
removeRecord | ( | ) |
Remove the record out of the associate relationship
Definition at line 1333 of file EasyForm.php.
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.
Reimplemented in EasyFormWizard.
Definition at line 1875 of file EasyForm.php.
renderContextMenu | ( | ) | [protected] |
Render context menu code
Definition at line 1927 of file EasyForm.php.
renderHTML | ( | ) | [protected] |
Render html content of this form
Definition at line 2012 of file EasyForm.php.
renderParent | ( | ) |
Render parent form
Definition at line 832 of file EasyForm.php.
rerender | ( | $ | redrawForm = true , |
$ | hasRecordChange = true |
||
) |
Rerender this form (form is rendered already) .
boolean | $redrawForm | - whether render this form again or not, optional default true |
boolean | $hasRecordChange | - if record change, need to render subforms, optional default true |
Definition at line 1973 of file EasyForm.php.
rerenderSubForms | ( | ) | [protected] |
Rerender sub forms who has dependecy on this form. This method is called when parent form's change affect the sub forms
Definition at line 1992 of file EasyForm.php.
resetSearch | ( | ) |
Reset search
Definition at line 1114 of file EasyForm.php.
runEventLog | ( | ) | [protected] |
Run event log
Definition at line 2093 of file EasyForm.php.
runSearch | ( | ) |
Run Search
Definition at line 1060 of file EasyForm.php.
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
Definition at line 1402 of file EasyForm.php.
selectRecord | ( | $ | recId ) |
Select Record
string | $recId | remote |
Definition at line 1365 of file EasyForm.php.
setActiveRecord | ( | $ | record ) | [protected] |
Set active record
array | $record |
Definition at line 2277 of file EasyForm.php.
setClientScripts | ( | ) | [protected] |
Set client scripts, auto add javascripts code to the page
Definition at line 2302 of file EasyForm.php.
setDataObj | ( | $ | dataObj ) | [final] |
Set data object BizDataObj with specified instant from parameter
BizDataObj | $dataObj |
Definition at line 502 of file EasyForm.php.
setFixSearchRule | ( | $ | rule = null , |
$ | 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
string | $rule | - search rule has format "[fieldName1] opr1 Value1 AND/OR [fieldName2] opr2 Value2" |
boolean | $cleanActualRule |
Definition at line 847 of file EasyForm.php.
setRequestParams | ( | $ | paramFields ) |
Set request parameters
array | $paramFields |
Definition at line 790 of file EasyForm.php.
setSessionVars | ( | $ | sessionContext ) |
Save object variable to session context
SessionContext | $sessionContext |
Implements iSessionObject.
Reimplemented in EasyFormWizard, and PickerForm.
Definition at line 369 of file EasyForm.php.
setSubForms | ( | $ | subForms ) | [final] |
Set the sub forms of this form. This form is parent of other forms
string | $subForms | - sub controls string with format: ctrl1;ctrl2... |
Definition at line 588 of file EasyForm.php.
sortRecord | ( | $ | sortCol, |
$ | order = 'ASC' |
||
) |
Sort Record, for list form
string | $sortCol | column name to sort |
string | $order | 'dec' (decending) or 'asc' (ascending) remote |
Definition at line 1033 of file EasyForm.php.
switchForm | ( | $ | formName = null , |
$ | id = null , |
||
$ | params = null , |
||
$ | target = null |
||
) |
Switch to other form
string | $formName | to-be-swtiched form name. if empty, then switch to default form |
string | $id | id value of the target form |
Definition at line 2139 of file EasyForm.php.
updateFieldValue | ( | $ | Id, |
$ | fld_name, | ||
$ | value | ||
) |
Update record
Definition at line 1481 of file EasyForm.php.
updateForm | ( | ) |
Update form controls
Definition at line 1632 of file EasyForm.php.
updateRecord | ( | ) |
Update record
Definition at line 1419 of file EasyForm.php.
validateForm | ( | $ | cleanError = true ) |
[protected] |
Validate input on EasyForm level default form validation do nothing. developers need to override this method to implement their logic
Definition at line 1703 of file EasyForm.php.
validateRequest | ( | $ | methodName ) |
Validate request from client (browser)
string | $methodName | called from the client |
Definition at line 410 of file EasyForm.php.