Class widget
common model for each widget
the widget as a relationship with a frame's view. It follows the lifecycle of the frame inside the view - we can change the view but the frame may remain valid -. it at first linked to the initial DOM. Then it can be updated using the Ajax scheme.
- cmc\ui\widgets\widget implements cmc\core\IClonable, cmc\core\ISerializable
Direct known subclasses
cmc\ui\widgets\area
, cmc\ui\widgets\compositelist
, cmc\ui\widgets\input
, cmc\ui\widgets\label
, cmc\ui\widgets\link
, cmc\ui\widgets\menu
, cmc\ui\widgets\tab
, cmc\ui\widgets\textarea
Indirect known subclasses
cmc\ui\widgets\button
, cmc\ui\widgets\checkbox
, 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/widget.php
Methods summary
public | |
public | |
public | |
public | |
public type | |
public | # setJSObject( string $jsType ) sets the javascript 'object' name, used in the JavaScript framework (jQuery, ...) |
public | |
public | # viewAttach( cmc\cmc\ui\view $view ) view attach: a new view's DOM is available used to update the current dom item from the current view |
public | |
public | # AddEventListener( type $eventname, callable $cb ) adds a callback listened for given event on given widget |
protected | |
public | |
public | |
public string | |
public | |
public | |
public string | |
public string|boolean | # DOMGetNodeAttr( string $nodename, string $attr ) gets an attribute value from a named child node in the DOM |
public boolean | # DOMPutNodeAttr( string $nodename, string $attr, string $value ) sets an attribute value from a named child node in the DOM |
protected boolean | # applyPropertyDOM( baseview $view, string $propname, mixed $propval ) Changes the DOM using the given property |
protected mixed | |
protected | |
protected | |
public | # viewInitialUpdate( cmc\cmc\ui\view $view, cmc\cmc\ui\frame $frame ) initial update part (event trigered before cloning the view to the session) |
public | # viewPreUpdate( cmc\cmc\ui\dynview $view ) dynamic pre update current implementation restores the DOM element from current view |
public | # viewUpdate( cmc\cmc\ui\dynview $view ) dynamic update current implementation applies the properties to the DOM, and updates the scripting part |
public | |
public string | # getAjaxData( mixed $view ) gets updated data for the Ajax anwser (updated value, error, or empty if unchanged) |
public | |
public | |
public | |
public | |
public | # setPropertyQuery( cmc\cmc\sess $sess, type $propname, type $query ) assigns a property name with a query name |
public | # syncProperty( string $propname, mixed $value ) sets a property value identical on client and on server |
public mixed | |
public boolean | |
public boolean | |
public boolean | |
public boolean | |
public | |
public | |
public boolean | |
public | |
public | |
public string|boolean | |
public string|boolean | |
public | |
public | |
public | |
public | |
public | |
public boolean | |
public | # bSetDynamic( ) forces the dynamic status (can be false in a static frame and simple component like label) |
public | # bClearDynamic( ) clears dynamic status to false (useful to avoid javascript dependencies, if no object javascript interaction is needed) |
public | # getScriptCode( ) gets JavaScript Snipset to add in the document.ready() section - creation, client side validation, ajax update - |
public | |
public | |
public | |
public | |
public | |
public | |
public |
Methods inherited from cmc\core\IClonable
Magic methods summary
Constants summary
integer | OPT_INPUT_LEAVE_AUTOCOMPLETE | 1 | # When enabled, don't set 'autocomplete=off' attribute in input items (default is disabled) |
string | jqueryHighlight | 'ui-state-highlight' | |
string | jqueryFocus | 'ui-state-focus' | |
string | jqueryHover | 'ui-state-hover' |
Properties summary
protected mixed | $_options | |
protected string | $_dftTagId | |
protected mixed | $_wviews | |
protected mixed | $_currwview | |
protected mixed | $_name | |
protected mixed | $_jsObj | |
protected mixed | $_jsObjParms | |
protected mixed | $_domid | |
protected mixed | $_properties | |
protected mixed | $_constants | |
protected mixed | $_bDynamic | |
protected boolean | $_matDynamic | |
protected boolean | $_preupdate | |
protected mixed | $_actualscript | |
protected mixed | $_composcript |