CMC for PHP
  • Namespace
  • Class
  • Tree

Namespaces

  • cmc
    • core
      • ui
    • db
      • mysqli
    • error
    • ui
      • widgets
  • PHP

Classes

  • area
  • areafactory
  • button
  • buttonfactory
  • checkbox
  • checkboxfactory
  • compositelist
  • compositelistfactory
  • input
  • inputfactory
  • label
  • labelfactory
  • link
  • linkfactory
  • menu
  • menufactory
  • select
  • selectfactory
  • tab
  • tabfactory
  • textarea
  • textareafactory
  • widget
  • widgetfactory

CMC for PHP is a web framework for PHP.
Copyright (c) 2014 by Calmarsoft company http://calmarsoft.com (FRANCE). All rights reserved.
Project information available here.

Class compositelist

general purpose list widget; can be used for listbox, combobox, grids, enumerations, ...

cmc\ui\widgets\widget implements cmc\core\IClonable, cmc\core\ISerializable
Extended by cmc\ui\widgets\compositelist

Direct known subclasses

cmc\ui\widgets\select

Namespace: cmc\ui\widgets
Copyright: Copyright (c) Calmarsoft company (FRANCE) (http://calmarsoft.com)
License: GNU General Public License version 3
Version: 0.9
Link: CMC Project
Located at ui/widgets/compositelist.php

Methods summary

public
# __construct( mixed $frame, mixed $xpath = '' )

Overrides

cmc\ui\widgets\widget::__construct
public
# setCompositeMap( array $map, array $mapkeys = null )

specifies how to map the list shape and the fields

specifies how to map the list shape and the fields

Parameters

$map
array
key=>val array, with key as item xpath, and val as fieldname
$mapkeys
array
$mapkeys string array, to specify which field(s) uniquely identifies a row
protected
# OncompositeRowDOM( array $data, DOMElement $domItem )

allows custom actions on the widget, on DOM build

allows custom actions on the widget, on DOM build

Parameters

$data
array
$data the data row
$domItem
DOMElement
$domItem the DOM row
protected
# applyCompositeDOM( cmc\ui\view $view, Iterator $data )

upadates the list with the provided data

upadates the list with the provided data

data is an iterator with associative arrays: a data source, an array of associative arrays, ...

Parameters

$view
cmc\ui\view
$view
$data
Iterator
$data
protected array
# getAjaxCompositeVal( )

gets the current composite value for Ajax answer

gets the current composite value for Ajax answer

Returns

array
protected
# setDataStateAjax( type $view, mixed $ajax )

updates internal data for avoiding expensive dublicates

updates internal data for avoiding expensive dublicates

Parameters

$view
type
$ajax
$ajax

Overrides

cmc\ui\widgets\widget::setDataStateAjax
protected mixed
# getAjaxPropVal( string $propname )

gets a property value for Ajax answer

gets a property value for Ajax answer

Parameters

$propname
string
self::prop_Data

Returns

mixed

Overrides

cmc\ui\widgets\widget::getAjaxPropVal
protected mixed
# applyPropertyDOM( cmc\ui\view $view, string $propname, mixed $propval )

applies a property to the DOM

applies a property to the DOM

Parameters

$view
cmc\ui\view
$propname
string
$propname
$propval
mixed
$propval

Returns

mixed

Overrides

cmc\ui\widgets\widget::applyPropertyDOM
public
# syncProperty( string $propname, mixed $value )

synchronize a property changed on the client

synchronize a property changed on the client

for compositelist, it stores it in an array for all changed lines (or all if no rowkey fields were defined)

Parameters

$propname
string
$propname
$value
mixed
$value

Overrides

cmc\ui\widgets\widget::syncProperty
public array
# getPostCompData( )

retrieves the client-side changed data in the compositelist object

retrieves the client-side changed data in the compositelist object

Returns

array
public
# dump_lineElems( mixed $view )

useful for the developer: dumps the available xpath values for an item in the composite liste (extracted from the first line which represents the 'model')

useful for the developer: dumps the available xpath values for an item in the composite liste (extracted from the first line which represents the 'model')

public
# viewInitialUpdate( cmc\ui\view $view, cmc\ui\frame $frame )

default widget's implementation of the static part of update

default widget's implementation of the static part of update

this is preparing the line model (extracted from the first entry in the list)

Parameters

$view
cmc\ui\view
$view
$frame
cmc\ui\frame
$frame

Overrides

cmc\ui\widgets\widget::viewInitialUpdate
public
# viewPreUpdate( cmc\ui\dynview $view )

default implementation of dynamic update

default implementation of dynamic update

Parameters

$view
cmc\ui\dynview
$view

Overrides

cmc\ui\widgets\widget::viewPreUpdate
public
# viewUpdate( cmc\ui\dynview $view )

default implementation of dynamic update

default implementation of dynamic update

Parameters

$view
cmc\ui\dynview
$view

Overrides

cmc\ui\widgets\widget::viewUpdate
public
# onPOSTDone( type $view )

POST 'done' event

POST 'done' event

Parameters

$view
type
$view

Overrides

cmc\ui\widgets\widget::onPOSTDone
public
# setDataQuery( type $sess, type $qry )

assigns a datasource to the compositelist for automatic input handling

assigns a datasource to the compositelist for automatic input handling

Parameters

$sess
type
$sess
$qry
type
$qry
public
# setCompData( Iterator $data )

assigns the data object (for example an array of associative arrays)

assigns the data object (for example an array of associative arrays)

Parameters

$data
Iterator
$data
public
# getCompData( )
public
# OnSerialize( )

called before serialize

called before serialize

Overrides

cmc\ui\widgets\widget::OnSerialize
public
# OnUnSerialize( )
public
# onClone( mixed $srcinstance )

Overrides

cmc\ui\widgets\widget::onClone

Methods inherited from cmc\ui\widgets\widget

AddEventListener(), AddWidgetEventListener(), DOMGetAttr(), DOMGetNodeAttr(), DOMGetText(), DOMPutNodeAttr(), DOMRemoveAttr(), DOMSetHtml(), DOMSetText(), DOMUpdateAttr(), OnUnserialize(), OnWidgetEvent(), POSTupdatedata(), addEventLocal(), addEventPost(), addScriptCode(), addValidation(), bClearDynamic(), bDynamic(), bOption(), bSetDynamic(), disable(), enable(), getAjaxData(), getCaption(), getEnabled(), getFrame(), getName(), getProperty(), getScriptCode(), getValue(), getVisible(), hide(), modelPropertyDOM(), setCaption(), setConstants(), setEnabled(), setFrame(), setHTML(), setJSObject(), setJSObjectParms(), setName(), setOptions(), setProperty(), setPropertyDatasource(), setPropertyQuery(), setValue(), setVisible(), show(), unsetOptions(), viewAttach()

Methods inherited from cmc\core\IClonable

OnClone()

Magic methods summary

Constants summary

string prop_Data 'compData'
#
string factory cmc\ui\widgets\widgetfactory::className
#
string matchVar '/[$]{([a-zA-Z_][a-zA-Z0-9%_\-]*)}|[$]([a-zA-Z][a-zA-Z0-9%]*)/'
#

Constants inherited from cmc\ui\widgets\widget

OPT_INPUT_LEAVE_AUTOCOMPLETE, jqueryFocus, jqueryHighlight, jqueryHover

Properties summary

protected array $_composite_map
#
protected mixed $_composite_mapkeys
#

Properties inherited from cmc\ui\widgets\widget

$_actualscript, $_bDynamic, $_composcript, $_constants, $_currwview, $_dftTagId, $_domid, $_jsObj, $_jsObjParms, $_matDynamic, $_name, $_options, $_preupdate, $_properties, $_wviews

CMC for PHP API documentation generated by ApiGen 2.8.0