PRADO Component Framework for PHP 5
  • Home
  • About
  • Testimonials
  • Demos
  • Download
  • Documentation
  • Forum
  • Development
  • Tutorials
  • Class Docs
  • API Manual
  • Wiki

Packages

  • None
  • System
    • Caching
    • Collections
    • Data
      • ActiveRecord
        • Relations
        • Scaffold
          • InputBuilder
      • Commom
        • Sqlite
      • Common
        • Mssql
        • Mysql
        • Oracle
        • Pgsql
        • Sqlite
      • DataGateway
      • SqlMap
        • Configuration
        • Statements
    • Exceptions
    • I18N
    • IO
    • Security
    • Util
    • Web
      • Javascripts
      • Services
      • UI
        • ActiveControls
        • WebControls
    • Xml
  • Wsat
    • pages
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class TScaffoldListView

TScaffoldListView displays a list of Active Records.

The getHeader Header property is a TRepeater displaying the Active Record property/field names. The getSort Sort property is a drop down list displaying the combination of properties and its possible ordering. The getPager Pager property is a TPager control displaying the links and/or buttons that navigate to different pages in the Active Record data. The getList List property is a TRepeater that renders a row of Active Record data.

Custom rendering of the each Active Record can be achieved by specifying the ItemTemplate or AlternatingItemTemplate property of the main {@linnk getList List} repeater.

The TScaffoldListView will listen for two command events named "delete" and "edit". A "delete" command will delete a the record for the row where the "delete" command is originates. An "edit" command will push the record data to be edited by a TScaffoldEditView with ID specified by the setEditViewID EditViewID.

Additional setSearchCondition SearchCondition and setSearchParameters SearchParameters (takes array values) can be specified to customize the records to be shown. The setSearchCondition SearchCondition will be used as the Condition property of TActiveRecordCriteria, and similarly the setSearchParameters SearchParameters will be the corresponding Parameters property of TActiveRecordCriteria.

TComponent
Extended by TApplicationComponent
Extended by TControl implements IRenderable, IBindable
Extended by TCompositeControl implements INamingContainer
Extended by TTemplateControl
Extended by TScaffoldBase
Extended by TScaffoldListView
Package: System\Data\ActiveRecord\Scaffold
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Wei Zhuo <weizho[at]gmail[dot]com>
Since: 3.1
Located at Data/ActiveRecord/Scaffold/TScaffoldListView.php
Methods summary
protected
# initializeSort( )

Initialize the sort drop down list and the column names repeater.

Initialize the sort drop down list and the column names repeater.

public
# onPreRender( TEventParameter $param )

Loads and display the data.

Loads and display the data.

Parameters

$param
TEventParameter
event parameter to be passed to the event handlers

Overrides

TScaffoldBase::onPreRender()
protected
# loadRecordData( )

Fetch the records and data bind it to the list.

Fetch the records and data bind it to the list.

protected TActiveRecordCriteria
# getRecordCriteria( )

Returns

TActiveRecordCriteria
sort/search/paging criteria
public
# setSearchCondition( string $value )

Parameters

$value
string
search condition, the SQL string after the WHERE clause.
public
# getSearchCondition( )
public
# setSearchParameters( array $value )

Parameters

$value
array
search parameters
public array
# getSearchParameters( )

Returns

array
search parameters
public boolean
# bubbleEvent( TControl $sender, TEventParameter $param )

Continue bubbling the "edit" command, "delete" command is handled in this class.

Continue bubbling the "edit" command, "delete" command is handled in this class.

Parameters

$sender
TControl
sender of the event
$param
TEventParameter
event parameters

Returns

boolean
true if the event bubbling is handled and no more bubbling.

Overrides

TControl::bubbleEvent()
protected
# initializeEdit( mixed $sender, mixed $param )

Initialize the edit view control form when EditViewID is set.

Initialize the edit view control form when EditViewID is set.

protected
# deleteRecord( mixed $sender, mixed $param )

Deletes an Active Record.

Deletes an Active Record.

protected
# listItemCreated( mixed $sender, mixed $param )

Initialize the default display for each Active Record item.

Initialize the default display for each Active Record item.

protected
# populateField( mixed $sender, mixed $param )

Sets the Record primary key to the current repeater item's CustomData. Binds the inner repeater with properties of the current Active Record.

Sets the Record primary key to the current repeater item's CustomData. Binds the inner repeater with properties of the current Active Record.

protected
# pageChanged( mixed $sender, mixed $param )

Updates repeater page index with the pager new index value.

Updates repeater page index with the pager new index value.

public TRepeater
# getList( )

Returns

TRepeater
Repeater control for Active Record instances.
public TPager
# getPager( )

Returns

TPager
List pager control.
public TDropDownList
# getSort( )

Returns

TDropDownList
Control that displays and controls the record ordering.
public TRepeater
# getHeader( )

Returns

TRepeater
Repeater control for record property names.
public string
# getEditViewID( )

Returns

string
TScaffoldEditView control ID for editing selected Active Record.
public
# setEditViewID( string $value )

Parameters

$value
string
TScaffoldEditView control ID for editing selected Active Record.
protected TScaffoldEditView
# getEditViewControl( )

Returns

TScaffoldEditView
control for editing selected Active Record, null if EditViewID is not set.
Methods inherited from TScaffoldBase
clearRecordObject(), copyFrom(), getDefaultStyle(), getEnableDefaultStyle(), getRecordClass(), getRecordFinder(), getRecordObject(), getRecordPkValues(), getRecordPropertyValues(), getTableInfo(), setDefaultStyle(), setEnableDefaultStyle(), setRecordClass(), setRecordObject()
Methods inherited from TTemplateControl
createChildControls(), getIsSourceTemplateControl(), getMaster(), getMasterClass(), getTemplate(), getTemplateDirectory(), initRecursive(), injectContent(), loadTemplate(), registerContent(), registerContentPlaceHolder(), setMasterClass(), setTemplate()
Methods inherited from TControl
__construct(), __get(), addParsedObject(), addToPostDataLoader(), addedControl(), applyStyleSheetSkin(), autoBindProperty(), autoDataBindProperties(), bindProperty(), broadcastEvent(), clearChildState(), clearControlState(), clearNamingContainer(), clearViewState(), convertUniqueIdToClientId(), createControlCollection(), dataBind(), dataBindChildren(), dataBindProperties(), ensureChildControls(), findControl(), findControlsByID(), findControlsByType(), focus(), getAdapter(), getAllowChildControls(), getAttribute(), getAttributes(), getChildControlsCreated(), getClientID(), getControlStage(), getControlState(), getControls(), getCustomData(), getEnableTheming(), getEnableViewState(), getEnabled(), getHasAdapter(), getHasAttributes(), getHasChildInitialized(), getHasControls(), getHasInitialized(), getHasLoaded(), getHasLoadedPostData(), getHasPreRendered(), getID(), getIsSkinApplied(), getNamingContainer(), getPage(), getParent(), getRegisteredObject(), getSkinID(), getSourceTemplateControl(), getTemplateControl(), getUniqueID(), getViewState(), getVisible(), hasAttribute(), isDescendentOf(), isObjectRegistered(), loadRecursive(), loadState(), loadStateRecursive(), onDataBinding(), onInit(), onLoad(), onUnload(), preRenderRecursive(), raiseBubbleEvent(), registerObject(), removeAttribute(), removedControl(), render(), renderChildren(), renderControl(), saveState(), saveStateRecursive(), setAdapter(), setAttribute(), setChildControlsCreated(), setControlStage(), setControlState(), setCustomData(), setEnableTheming(), setEnableViewState(), setEnabled(), setID(), setPage(), setSkinID(), setTemplateControl(), setViewState(), setVisible(), trackViewState(), traverseChildControls(), unbindProperty(), unloadRecursive(), unregisterObject()
Methods inherited from TApplicationComponent
getApplication(), getRequest(), getResponse(), getService(), getSession(), getUser(), publishAsset(), publishFilePath()
Methods inherited from TComponent
__call(), __destruct(), __isset(), __set(), __sleep(), __unset(), __wakeup(), asa(), attachBehavior(), attachBehaviors(), attachClassBehavior(), attachEventHandler(), canGetProperty(), canSetProperty(), clearBehaviors(), createdOnTemplate(), detachBehavior(), detachBehaviors(), detachClassBehavior(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), evaluateStatements(), fxAttachClassBehavior(), fxDetachClassBehavior(), getAutoGlobalListen(), getBehaviorsEnabled(), getClassHierarchy(), getEventHandlers(), getListeningToGlobalEvents(), getSubProperty(), hasEvent(), hasEventHandler(), hasProperty(), isa(), listen(), raiseEvent(), setSubProperty(), unlisten()
Constants inherited from TTemplateControl
EXT_TEMPLATE
Constants inherited from TControl
AUTOMATIC_ID_PREFIX, CLIENT_ID_SEPARATOR, CS_CHILD_INITIALIZED, CS_CONSTRUCTED, CS_INITIALIZED, CS_LOADED, CS_PRERENDERED, CS_STATE_LOADED, ID_FORMAT, ID_SEPARATOR, IS_CHILD_CREATED, IS_CREATING_CHILD, IS_DISABLE_THEMING, IS_DISABLE_VIEWSTATE, IS_ID_SET, IS_SKIN_APPLIED, IS_STYLESHEET_APPLIED, RF_ADAPTER, RF_AUTO_BINDINGS, RF_CHILD_STATE, RF_CONTROLS, RF_CONTROLSTATE, RF_DATA_BINDINGS, RF_EVENTS, RF_NAMED_CONTROLS, RF_NAMED_CONTROLS_ID, RF_NAMED_OBJECTS, RF_SKIN_ID
Constants inherited from TComponent
GLOBAL_RAISE_EVENT_LISTENER
Terms of Service | Contact Us
PRADO v3.2.4 API Manual API documentation generated by ApiGen 2.8.0
Copyright © 2006-2014 by the PRADO Group.
Powered by PRADO