|
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
-
TApplicationComponent
-
TControl
implements
IRenderable,
IBindable
-
TCompositeControl
implements
INamingContainer
-
TTemplateControl
-
TScaffoldBase
-
TScaffoldListView
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
Overrides
|
protected
|
#
loadRecordData( )
Fetch the records and data bind it to the list.
Fetch the records and data bind it to the list.
|
protected
TActiveRecordCriteria
|
|
public
|
#
setSearchCondition( string $value )
Parameters
- $value
string search condition, the SQL string after the WHERE clause.
|
public
|
|
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
Returns
boolean true if the event bubbling is handled and no more bubbling.
Overrides
|
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
TDropDownList
|
#
getSort( )
Returns
TDropDownList
Control that displays and controls the record ordering.
|
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 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 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
|
|