Class OCSP_FRMCONTR_FORM

Description

class OCSP_FRMCONTR_FORM

Located in /db/forms/OCSP_FRMCONTR_FORM.phpclass (line 36)

OCSP_OBJ
   |
   --OCSP_FRMCONTR
      |
      --OCSP_FRMCONTR_FORM
Direct descendents
Class Description
 class OCSP_FRMCONTR_AJAXFORM class OCSP_FRMCONTR_AJAXFORM
 class OCSP_FRMCONTR_JQUERY class OCSP_FRMCONTR_JQUERY
 class OCSP_FRMCONTR_FORM_EXTJS openCSP class OCSP_FRMCONTR_FORM_EXTJS
Class Constant Summary
 CLASS_SRC_FILE = __FILE__
Variable Summary
 string $myMethod
 string $myNextUrl
 string $myTarget
Method Summary
 boolean curUserCanSave ([boolean $debug = False])
 array getDefaultValues ([boolean $asCurRow = True], [boolean $debug = False])
 string getFieldEvents (string $fldType, [boolean $debug = False])
 string getFieldTag ( &$aField, [boolean $debug = False], [int $fldMode = -1], DBMS_FIELD $aField)
 mixed getFieldValue ( &$aField, [int $fldMode = -1], [boolean $debug = False], DBMS_FIELD $aField)
 void getFilterFromValues ([boolean $debug = False])
 void getFormCmdButtons ([ $debug = False])
 string getFormCmdFields ([boolean $debug = False])
 string getFormEvents ([int $aMode = FRM_MODE_READONLY], [boolean $debug = False])
 string getFormHTMLId ([boolean $debug = False])
 string getFormJavaScript ([boolean $debug = False])
 string getMyTarget ()
 string getNextUrl ([boolean $parseTmpl = True], [boolean $debug = False])
 string getResetButton ([boolean $debug = False])
 string getSubmitButton ([boolean $debug = False])
 boolean hasCmdButtons ([boolean $debug = False])
 string jOCSP_getFormInitCmd ([boolean $debug = False])
 boolean populateRow ([array $filterAdd = NULL], [boolean $debug = False])
 boolean saveCurRow (boolean $debug)
 void setBackCmd (string $aCmd)
 void setFieldEvent (string $fldType, string $jsEvent, string $jsCmd)
 void setMyTarget (strign $aTarget)
 void setNextUrl (string $aUrl)
 boolean setTblObjDBVal ([boolean $debug = False])
 void setValuesFromArray (array $valArr, [boolean $debug = False])
 boolean validateSubmit (int $mode, array $data, [boolean $debug = False])
Variables
array $frmFldEvents = array() (line 79)

js events for 'fldName' and 'fldValue

  • since: pk-07-09-23
  • access: protected
mixed $myJsRequirements = array() (line 85)

returns an array with js required

  • access: protected
string $myMethod = "" (line 58)
  • access: protected
string $myNextUrl = "" (line 65)

if $this->myNextUrl starts with js: a javascript code will be evaluated else it is assumed to be a norm link

  • access: protected
string $myTarget = "" (line 71)
  • access: protected

Inherited Variables

Inherited from OCSP_FRMCONTR

OCSP_FRMCONTR::$checkRights_hasDBRightsSet
OCSP_FRMCONTR::$checkRights_userRights
OCSP_FRMCONTR::$curRow
OCSP_FRMCONTR::$myActionURL
OCSP_FRMCONTR::$myCommands
OCSP_FRMCONTR::$myDBObj
OCSP_FRMCONTR::$myFilter
OCSP_FRMCONTR::$myForm
OCSP_FRMCONTR::$myjOCSPHash
OCSP_FRMCONTR::$myReloadUrl
OCSP_FRMCONTR::$myView
OCSP_FRMCONTR::$rowPopulateTS
OCSP_FRMCONTR::$userCanShowMethod

Inherited from OCSP_OBJ

OCSP_OBJ::$global_currentUser
OCSP_OBJ::$global_defaultDBObj_read
OCSP_OBJ::$global_defaultDBObj_write
OCSP_OBJ::$staticClassVars
Methods
curUserCanSave (line 1273)

returns if the current user can save the form in the current mode

  • access: protected
boolean curUserCanSave ([boolean $debug = False])
  • boolean $debug
getDefaultValues (line 893)

returns an arry with the database and form default values

if $asCurRow the default values are merged with none empty values in $this->curRow $this->rowPopulateTS is set

  • version: pk-08-02-21
  • since: pk-07-12-05
array getDefaultValues ([boolean $asCurRow = True], [boolean $debug = False])
  • boolean $asCurRow
  • boolean $debug
getFieldEvents (line 857)
  • requires: pcf_templates.phpinc
string getFieldEvents (string $fldType, [boolean $debug = False])
  • string $fldType
  • boolean $debug
getFieldTag (line 788)

returns the html tag of a field

  • return: (html)
  • global: ${$this->myForm->getDataArrName()} ${$str_dataArrName}:
  • version: pk-07-11-29 $fldMode added
  • version: pk-08-02-06 jOCSP
string getFieldTag ( &$aField, [boolean $debug = False], [int $fldMode = -1], DBMS_FIELD $aField)
  • DBMS_FIELD $aField
  • boolean $debug
  • int $fldMode
  • &$aField
getFieldValue (line 735)

returns the field value set in $this->curRow

  • since: pk-08-09-09
  • access: public
mixed getFieldValue ( &$aField, [int $fldMode = -1], [boolean $debug = False], DBMS_FIELD $aField)
  • DBMS_FIELD $aField
  • int $fldMode
  • boolean $debug
  • &$aField
getFilterFromValues (line 268)

sets $this->myFilter from the values

  • access: protected
void getFilterFromValues ([boolean $debug = False])
  • boolean $debug
getFormCmdButtons (line 499)
void getFormCmdButtons ([ $debug = False])
  • $debug

Redefined in descendants as:
getFormCmdFields (line 605)

returns hiddenfields identifying the form and the tableobject

  • version: pk-08-06-26
string getFormCmdFields ([boolean $debug = False])
  • boolean $debug
getFormEvents (line 432)
  • access: public
string getFormEvents ([int $aMode = FRM_MODE_READONLY], [boolean $debug = False])
  • int $aMode
  • boolean $debug

Redefined in descendants as:
getFormHTMLId (line 418)

returns the form html id/name

  • return: the form id
  • access: public
string getFormHTMLId ([boolean $debug = False])
  • boolean $debug
getFormJavaScript (line 404)
string getFormJavaScript ([boolean $debug = False])
  • boolean $debug

Redefined in descendants as:
getMyTarget (line 160)
string getMyTarget ()
getNextUrl (line 123)

if next url is not set tries to get it from $_REQUEST the url is parsed with $this->curRow

string getNextUrl ([boolean $parseTmpl = True], [boolean $debug = False])
  • boolean $parseTmpl
  • boolean $debug
getResetButton (line 587)
string getResetButton ([boolean $debug = False])
  • boolean $debug

Redefined in descendants as:
getSubmitButton (line 573)
string getSubmitButton ([boolean $debug = False])
  • boolean $debug

Redefined in descendants as:
hasCmdButtons (line 472)

returns if the form has button commands

checks $this->myCommands['_FORM_'] for values and the form mode

boolean hasCmdButtons ([boolean $debug = False])
  • boolean $debug
jOCSP_getFormInitCmd (line 308)

returns the javas script to load jOCSP framework

  • return: (js)
  • access: public
string jOCSP_getFormInitCmd ([boolean $debug = False])
  • boolean $debug
populateRow (line 987)

populates one row from the database if a tableobject is set it is populated (if not already done) if $this->myForm has

  • global: {$this->myForm->getDataArrName()} ${$this->myForm->getDataArrName()}:
  • todo: for more than one table
boolean populateRow ([array $filterAdd = NULL], [boolean $debug = False])
  • array $filterAdd
  • boolean $debug

Redefinition of:
OCSP_FRMCONTR::populateRow()
populates one row from the database this is the first row fitting $this->myFilter
saveCurRow (line 1189)

save the row to the database

  • version: pk-08-06-26 passthrough fields
boolean saveCurRow (boolean $debug)
  • boolean $debug

Redefinition of:
OCSP_FRMCONTR::saveCurRow()
save the row to the database
setBackCmd (line 100)
void setBackCmd (string $aCmd)
  • string $aCmd
setFieldEvent (line 844)

Note: don't use unescaped " in $jsCmd $jsCmd can be a template which is parsed with the current form values

  • since: pk-07-09-23
void setFieldEvent (string $fldType, string $jsEvent, string $jsCmd)
  • string $fldType: (fldName | fldValue)
  • string $jsEvent: (js event like onClick)
  • string $jsCmd: (js to execute on the event)
setMyTarget (line 152)
void setMyTarget (strign $aTarget)
  • strign $aTarget
setNextUrl (line 109)
void setNextUrl (string $aUrl)
  • string $aUrl
setTblObjDBVal (line 178)

sets the database values of the forms tableobject

  • since: pk-08-03-07
  • access: protected
boolean setTblObjDBVal ([boolean $debug = False])
  • boolean $debug
setValuesFromArray (line 1079)

sets the form row values from an array

  • access: public
void setValuesFromArray (array $valArr, [boolean $debug = False])
  • array $valArr
  • boolean $debug
validateSubmit (line 1113)
boolean validateSubmit (int $mode, array $data, [boolean $debug = False])
  • int $mode
  • array $data
  • boolean $debug

Redefinition of:
OCSP_FRMCONTR::validateSubmit()

Inherited Methods

Inherited From OCSP_FRMCONTR

 OCSP_FRMCONTR::__construct()
 OCSP_FRMCONTR::addFilter()
 OCSP_FRMCONTR::checkRights()
 OCSP_FRMCONTR::getActionURL()
 OCSP_FRMCONTR::getAjaxObj()
 OCSP_FRMCONTR::getCurrentRow()
 OCSP_FRMCONTR::getCurRow()
 OCSP_FRMCONTR::getCurValue()
 OCSP_FRMCONTR::getDBObj()
 OCSP_FRMCONTR::getFilter()
 OCSP_FRMCONTR::getMyForm()
 OCSP_FRMCONTR::getObjectValues()
 OCSP_FRMCONTR::getReloadUrl()
 OCSP_FRMCONTR::getView()
 OCSP_FRMCONTR::jOCSP_getfrmHash()
 OCSP_FRMCONTR::jOCSP_setfrmHash()
 OCSP_FRMCONTR::parseFieldTmpl()
 OCSP_FRMCONTR::parseRowTmpl()
 OCSP_FRMCONTR::populateRow()
 OCSP_FRMCONTR::rowIsPopulated()
 OCSP_FRMCONTR::saveCurRow()
 OCSP_FRMCONTR::setActionURL()
 OCSP_FRMCONTR::setAjaxObj()
 OCSP_FRMCONTR::setCommand()
 OCSP_FRMCONTR::setCurRow()
 OCSP_FRMCONTR::setCurRowValue()
 OCSP_FRMCONTR::setFilter()
 OCSP_FRMCONTR::setMyForm()
 OCSP_FRMCONTR::setObjectValues()
 OCSP_FRMCONTR::setReloadUrl()
 OCSP_FRMCONTR::setView()
 OCSP_FRMCONTR::set_userCanShowMethod()
 OCSP_FRMCONTR::unsetFilter()
 OCSP_FRMCONTR::validateBlockSubmit()
 OCSP_FRMCONTR::validateSubmit()

Inherited From OCSP_OBJ

 OCSP_OBJ::castObj()
 OCSP_OBJ::cloneMe()
 OCSP_OBJ::currentUser()
 OCSP_OBJ::dbConnect()
 OCSP_OBJ::defaultDBObj()
 OCSP_OBJ::defaultReadDBObj()
 OCSP_OBJ::defaultWriteDBObj()
 OCSP_OBJ::getConf()
 OCSP_OBJ::getDBObj()
 OCSP_OBJ::get_myClassConstant()
 OCSP_OBJ::get_myObject_vars()
 OCSP_OBJ::get_mySourceFile()
 OCSP_OBJ::isConnected()
 OCSP_OBJ::isMultiByteStr()
 OCSP_OBJ::isUTF8()
 OCSP_OBJ::setConf()
 OCSP_OBJ::setDBObj()
 OCSP_OBJ::set_myObject_vars()
 OCSP_OBJ::set_myVarsFrom()
Class Constants
CLASS_SRC_FILE = __FILE__ (line 46)
  • since: pk-08-02-04

Inherited Constants

Inherited from OCSP_OBJ

OCSP_OBJ::CLASS_SRC_FILE

Documentation generated on Thu, 08 Jan 2009 17:46:23 +0100 by phpDocumentor 1.4.0a2