Source for file OCSP_FRMVIEW_FORM_EXTJS.phpclass
Documentation is available at OCSP_FRMVIEW_FORM_EXTJS.phpclass
* Class file OCSP_FRMVIEW_FORM_EXTJS.phpclass
* @project Open CSP-Management
* @author Peter Krebs (pk) <pitlinz@users.sourceforge.net>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: OCSP_FRMVIEW_FORM_EXTJS.phpclass,v 1.5 2008/09/29 22:34:12 pitlinz Exp $
// ---------------------------------------------------------
// ---------------------------------------------------------
* class OCSP_FRMVIEW_FORM_EXTJS
* @project Open CSP-Management
* @author Peter Krebs (pk) <pitlinz@users.sourceforge.net>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: OCSP_FRMVIEW_FORM_EXTJS.phpclass,v 1.5 2008/09/29 22:34:12 pitlinz Exp $
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
* @constant string CLASS_SRC_FILE
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
/*** class vars ------------------------------------------------------ */
/*** class methods --------------------------------------------------- */
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
/*** aggregations ------------------------------------------------- */
* @var OCSP_FRMCONTR_FORM_EXTJS $myControl
/*** compostion --------------------------------------------------- */
/*** attributes -------------------------------------------------- */
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
* returns the field items of a block
* @param OCSP_FORM_BLOCK $aBlock
public function getBlockFieldItems(&$aBlock,$debug=
False)
$arr_fields=
$aBlock->getFields($this->myForm->getFrmMode(),$debug);
foreach($arr_fields as $int_ordNr =>
&$obj_field)
$mix_value =
$this->myControl->getFieldValue($obj_field,-
1,$debug);
if ($obj_field->isToShow($this->myForm->getFrmMode(),$this->myControl->getCurrentRow()))
$arr_fldOptions =
$obj_field->getExtJSConfigOptions($debug);
foreach($arr_fldOptions as $str_name =>
$str_val)
$str_ret .=
$cha_sep .
$str_name .
":" .
$str_val .
",";
* returns the json item list of the form
public function getItemBlocks($debug=
False)
$arr_blocks =
$this->myForm->getBlocks($debug);
foreach($arr_blocks as $int_id =>
&$obj_block)
if ($obj_block->isToShow($this->myForm->getFrmMode(),$debug))
switch($obj_block->getViewType())
$arr_tabs[] =
$obj_block;
//case __OCSP_FRMBLK_VIEWFIELDSET__:
$str_ret .=
$this->getBlockFieldItems($obj_block,$debug);
xtype:'ocspExt_formTabPanel',
foreach($arr_tabs as $obj_block)
$str_ret .=
$cha_sep .
"{
// as we use deferredRender:false we mustn't
// render tabs into display:none containers
items: [ " .
$this->getBlockFieldItems($obj_block,$debug) .
"]
public function getButtons($debug)
switch($this->myForm->getFrmMode())
text: '" .
$str_txt .
"',
obj_comp = Ext.getCmp('" .
$this->myControl->getFormHTMLId() .
"');
if (typeof(obj_comp.frmSubmit) == 'function')
alert('frm: " .
$this->myControl->getFormHTMLId() .
".frmSubmit not found');
obj_comp.getForm().submit();
text: '" .
t_admin('Formular bearbeiten') .
"',
qtip: 'Formular bearbeiten',
var win = new Ext.Window({
title: '" .
t_admin('Formular bearbeiten') .
"',
return "[" .
$str_ret .
"]";
* returns the html code for the form
* @param boolean $withOuterDiv not used here
function getForm($aMode=-
1,$debug=
False,$withOuterDiv=
True)
xtype: 'ocspExt_formPanel',
id: '" .
$this->myControl->getFormHTMLId() .
"',
defaultType: 'textfield',
items: " .
$this->getItemBlocks($debug) .
",
buttons: " .
$this->getButtons($debug) .
",
ocspParams: {" .
$this->myControl->getFormAttributes($debug) .
"},
Documentation generated on Thu, 08 Jan 2009 17:46:36 +0100 by phpDocumentor 1.4.0a2