Packages:
System
System.Caching
System.Collections
System.Data
System.Data.ActiveRecord
System.Data.ActiveRecord.Relations
System.Data.ActiveRecord.Scaffold
System.Data.ActiveReecord.Scaffold.InputBuilder
System.Data.Commom.Sqlite
System.Data.Common
System.Data.Common.Mssql
System.Data.Common.Mysql
System.Data.Common.Oracle
System.Data.Common.Pgsql
System.Data.Common.Sqlite
System.Data.DataGateway
System.Data.SqlMap
System.Data.SqlMap.Configuration
System.Data.SqlMap.Statements
System.Exceptions
System.I18N
System.IO
System.Security
System.Util
System.Web
System.Web.Services
System.Web.UI
System.Web.UI.ActiveControls
System.Web.UI.WebControls
System.Web.UI.WebControls.assets
System.Xml


Classes:
Keyword

Class TActiveRatingList

TActiveRatingList Class

Displays clickable images that represent a TActiveRadioButtonList

Since: 3.1
Author: Wei Zhuo <weizhuo[at]gmail[dot]com>
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,

Constructor Summary
public
Sets the default repeat direction to horizontal.

Method Summary
protected  void
callClientFunction ( string $func, mixed $value)
Calls the client-side static method for this control class.
protected  string
getAssetUrl ( string $file)
void
protected  void
protected  string
string
protected  string
Gets the name of the javascript class responsible for performing postback for this control.
array
protected  array
float
protected  string
getRatingImageType ( integer $index)
protected  int
getRatingIndex ( float $rating)
TActiveRatingListStyle
protected  string
boolean
void
onPreRender ( mixed $param)
Publish the the rating style css file and rating image files.
protected  array
publishRatingListImages ( string $style, string $fileExt)
protected  string
publishRatingListStyle ( string $style)
void
render ( THtmlWriter $writer)
Add rating style class name to the class attribute when setReadOnly property is true and when the setCssClass property is empty.
protected  void
renderClientControlScript ( mixed $writer)
Registers the javascript code for initializing the active control only if setReadOnly property is false.
void
renderItem ( mixed $writer, mixed $repeatInfo, mixed $itemType, mixed $index)
Renders the rating images if setReadOnly is true otherwise render the radio buttons.
protected  void
renderStaticRating ( mixed $writer, mixed $repeatInfo, mixed $itemType, mixed $index)
Renders the static rating images.
void
setCaption ( mixed $value)
void
setCaptionID ( string $value)
void
setEnabled ( boolean $value)
void
setHalfRatingInterval ( array $value)
Sets the interval such that those rating values within the interval will be considered as a half star rating.
void
setRating ( float $value)
void
setRatingStyle ( string $value)
void
setReadOnly ( boolean $value)
void
setRepeatLayout ( string $value)
The repeat layout must be Table.
void
setSelectedIndex ( int $value)
Methods Inherited From TActiveRadioButtonList
TActiveRadioButtonList::createRepeatedControl(), TActiveRadioButtonList::getActiveControl(), TActiveRadioButtonList::getClientSide(), TActiveRadioButtonList::onCallback(), TActiveRadioButtonList::raiseCallbackEvent(), TActiveRadioButtonList::renderClientControlScript()
Methods Inherited From TRadioButtonList
TRadioButtonList::createRepeatedControl(), TRadioButtonList::getClientClassName(), TRadioButtonList::getIsMultiSelect(), TRadioButtonList::loadPostData(), TRadioButtonList::setSelectedIndices()
Methods Inherited From TCheckBoxList
TCheckBoxList::createRepeatedControl(), TCheckBoxList::createStyle(), TCheckBoxList::findControl(), TCheckBoxList::generateItemStyle(), TCheckBoxList::getCellPadding(), TCheckBoxList::getCellSpacing(), TCheckBoxList::getClientClassName(), TCheckBoxList::getDataChanged(), TCheckBoxList::getHasFooter(), TCheckBoxList::getHasHeader(), TCheckBoxList::getHasSeparators(), TCheckBoxList::getIsMultiSelect(), TCheckBoxList::getPostBackOptions(), TCheckBoxList::getRepeatColumns(), TCheckBoxList::getRepeatDirection(), TCheckBoxList::getRepeatInfo(), TCheckBoxList::getRepeatLayout(), TCheckBoxList::getSpanNeeded(), TCheckBoxList::getTextAlign(), TCheckBoxList::getValidationPropertyValue(), TCheckBoxList::loadPostData(), TCheckBoxList::onPreRender(), TCheckBoxList::raisePostDataChangedEvent(), TCheckBoxList::render(), TCheckBoxList::renderItem(), TCheckBoxList::setCellPadding(), TCheckBoxList::setCellSpacing(), TCheckBoxList::setRepeatColumns(), TCheckBoxList::setRepeatDirection(), TCheckBoxList::setRepeatLayout(), TCheckBoxList::setTextAlign()
Methods Inherited From TListControl
TListControl::addAttributesToRender(), TListControl::addParsedObject(), TListControl::clearSelection(), TListControl::createListItemCollection(), TListControl::formatDataValue(), TListControl::getAppendDataBoundItems(), TListControl::getAutoPostBack(), TListControl::getCausesValidation(), TListControl::getClientClassName(), TListControl::getData(), TListControl::getDataGroupField(), TListControl::getDataTextField(), TListControl::getDataTextFormatString(), TListControl::getDataValueField(), TListControl::getEnableClientScript(), TListControl::getHasItems(), TListControl::getIsMultiSelect(), TListControl::getItemCount(), TListControl::getItems(), TListControl::getPostBackOptions(), TListControl::getPromptText(), TListControl::getPromptValue(), TListControl::getSelectedIndex(), TListControl::getSelectedIndices(), TListControl::getSelectedItem(), TListControl::getSelectedValue(), TListControl::getSelectedValues(), TListControl::getTagName(), TListControl::getText(), TListControl::getValidationGroup(), TListControl::loadState(), TListControl::onSelectedIndexChanged(), TListControl::onTextChanged(), TListControl::performDataBinding(), TListControl::renderClientControlScript(), TListControl::renderContents(), TListControl::renderPrompt(), TListControl::saveState(), TListControl::setAppendDataBoundItems(), TListControl::setAutoPostBack(), TListControl::setCausesValidation(), TListControl::setData(), TListControl::setDataGroupField(), TListControl::setDataTextField(), TListControl::setDataTextFormatString(), TListControl::setDataValueField(), TListControl::setEnableClientScript(), TListControl::setPromptText(), TListControl::setPromptValue(), TListControl::setSelectedIndex(), TListControl::setSelectedIndices(), TListControl::setSelectedValue(), TListControl::setSelectedValues(), TListControl::setText(), TListControl::setValidationGroup()
Methods Inherited From TDataBoundControl
TDataBoundControl::createPagedDataSource(), TDataBoundControl::dataBind(), TDataBoundControl::dataSourceViewChanged(), TDataBoundControl::determineDataSource(), TDataBoundControl::ensureDataBound(), TDataBoundControl::getAllowCustomPaging(), TDataBoundControl::getAllowPaging(), TDataBoundControl::getCurrentPageIndex(), TDataBoundControl::getDataMember(), TDataBoundControl::getDataSource(), TDataBoundControl::getDataSourceID(), TDataBoundControl::getDataSourceView(), TDataBoundControl::getInitialized(), TDataBoundControl::getIsDataBound(), TDataBoundControl::getPageCount(), TDataBoundControl::getPageSize(), TDataBoundControl::getRequiresDataBinding(), TDataBoundControl::getSelectParameters(), TDataBoundControl::getUsingDataSourceID(), TDataBoundControl::getVirtualItemCount(), TDataBoundControl::onDataBound(), TDataBoundControl::onDataSourceChanged(), TDataBoundControl::onInit(), TDataBoundControl::onPreRender(), TDataBoundControl::pagePreLoad(), TDataBoundControl::setAllowCustomPaging(), TDataBoundControl::setAllowPaging(), TDataBoundControl::setCurrentPageIndex(), TDataBoundControl::setDataMember(), TDataBoundControl::setDataSource(), TDataBoundControl::setDataSourceID(), TDataBoundControl::setInitialized(), TDataBoundControl::setIsDataBound(), TDataBoundControl::setPageSize(), TDataBoundControl::setRequiresDataBinding(), TDataBoundControl::setVirtualItemCount(), TDataBoundControl::validateDataSource()
Methods Inherited From TWebControl
TWebControl::addAttributesToRender(), TWebControl::clearStyle(), TWebControl::copyBaseAttributes(), TWebControl::createStyle(), TWebControl::getAccessKey(), TWebControl::getBackColor(), TWebControl::getBorderColor(), TWebControl::getBorderStyle(), TWebControl::getBorderWidth(), TWebControl::getCssClass(), TWebControl::getDisplay(), TWebControl::getFont(), TWebControl::getForeColor(), TWebControl::getHasStyle(), TWebControl::getHeight(), TWebControl::getStyle(), TWebControl::getTabIndex(), TWebControl::getTagName(), TWebControl::getToolTip(), TWebControl::getWidth(), TWebControl::render(), TWebControl::renderBeginTag(), TWebControl::renderContents(), TWebControl::renderEndTag(), TWebControl::setAccessKey(), TWebControl::setBackColor(), TWebControl::setBorderColor(), TWebControl::setBorderStyle(), TWebControl::setBorderWidth(), TWebControl::setCssClass(), TWebControl::setDisplay(), TWebControl::setForeColor(), TWebControl::setHeight(), TWebControl::setStyle(), TWebControl::setTabIndex(), TWebControl::setToolTip(), TWebControl::setWidth()
Methods Inherited From TControl
TControl::addedControl(), TControl::addParsedObject(), TControl::addToPostDataLoader(), TControl::applyStyleSheetSkin(), TControl::autoBindProperty(), TControl::autoDataBindProperties(), TControl::bindProperty(), TControl::broadcastEvent(), TControl::bubbleEvent(), TControl::clearChildState(), TControl::clearControlState(), TControl::clearNamingContainer(), TControl::clearViewState(), TControl::convertUniqueIdToClientId(), TControl::createChildControls(), TControl::createControlCollection(), TControl::dataBind(), TControl::dataBindChildren(), TControl::dataBindProperties(), TControl::ensureChildControls(), TControl::findControl(), TControl::findControlsByID(), TControl::findControlsByType(), TControl::focus(), TControl::getAdapter(), TControl::getAllowChildControls(), TControl::getAttribute(), TControl::getAttributes(), TControl::getChildControlsCreated(), TControl::getClientID(), TControl::getControls(), TControl::getControlStage(), TControl::getControlState(), TControl::getCustomData(), TControl::getEnabled(), TControl::getEnableTheming(), TControl::getEnableViewState(), TControl::getHasAdapter(), TControl::getHasAttributes(), TControl::getHasChildInitialized(), TControl::getHasControls(), TControl::getHasInitialized(), TControl::getHasLoaded(), TControl::getHasLoadedPostData(), TControl::getHasPreRendered(), TControl::getID(), TControl::getNamingContainer(), TControl::getPage(), TControl::getParent(), TControl::getRegisteredObject(), TControl::getSkinID(), TControl::getSourceTemplateControl(), TControl::getTemplateControl(), TControl::getUniqueID(), TControl::getViewState(), TControl::getVisible(), TControl::hasAttribute(), TControl::initRecursive(), TControl::isDescendentOf(), TControl::isObjectRegistered(), TControl::loadRecursive(), TControl::loadState(), TControl::loadStateRecursive(), TControl::onDataBinding(), TControl::onInit(), TControl::onLoad(), TControl::onPreRender(), TControl::onUnload(), TControl::preRenderRecursive(), TControl::raiseBubbleEvent(), TControl::registerObject(), TControl::removeAttribute(), TControl::removedControl(), TControl::render(), TControl::renderChildren(), TControl::renderControl(), TControl::saveState(), TControl::saveStateRecursive(), TControl::setAdapter(), TControl::setAttribute(), TControl::setChildControlsCreated(), TControl::setControlStage(), TControl::setControlState(), TControl::setCustomData(), TControl::setEnabled(), TControl::setEnableTheming(), TControl::setEnableViewState(), TControl::setID(), TControl::setPage(), TControl::setSkinID(), TControl::setTemplateControl(), TControl::setViewState(), TControl::setVisible(), TControl::trackViewState(), TControl::traverseChildControls(), TControl::unbindProperty(), TControl::unloadRecursive(), TControl::unregisterObject(), TControl::__get()
Methods Inherited From TApplicationComponent
TApplicationComponent::getApplication(), TApplicationComponent::getRequest(), TApplicationComponent::getResponse(), TApplicationComponent::getService(), TApplicationComponent::getSession(), TApplicationComponent::getUser(), TApplicationComponent::publishAsset(), TApplicationComponent::publishFilePath()
Methods Inherited From TComponent
TComponent::addParsedObject(), TComponent::attachEventHandler(), TComponent::canGetProperty(), TComponent::canSetProperty(), TComponent::createdOnTemplate(), TComponent::detachEventHandler(), TComponent::evaluateExpression(), TComponent::evaluateStatements(), TComponent::getEventHandlers(), TComponent::getSubProperty(), TComponent::hasEvent(), TComponent::hasEventHandler(), TComponent::hasProperty(), TComponent::raiseEvent(), TComponent::setSubProperty(), TComponent::__get(), TComponent::__set()

Constant Summary
string SCRIPT_PATH

Constructor Details

__construct

public __construct

Sets the default repeat direction to horizontal.


Method Details

callClientFunction

protected void callClientFunction (string $func , mixed $value )

Calls the client-side static method for this control class.

Input
string$funcstatic method name
mixed$valuemethod parmaeter
Output
Exception

getAssetUrl

protected string getAssetUrl (string $file )

Input
string$fileasset file in the self::SCRIPT_PATH directory.
Output
string asset file url.
Exception

getCaption

public void getCaption ()

Output
Exception

getCaptionControl

protected void getCaptionControl ()

Output
Exception

getCaptionControlID

protected string getCaptionControlID ()

Output
string find the client ID of the caption control.
Exception

getCaptionID

public string getCaptionID ()

Output
string control or html element ID for displaying a caption.
Exception

getClientClassName

protected string getClientClassName ()

Gets the name of the javascript class responsible for performing postback for this control.

This method overrides the parent implementation.

Output
string the javascript class name
Exception

getHalfRatingInterval

public array getHalfRatingInterval ()

Output
array rating display half value interval, default is array(0.3, 0.7);
Exception

getPostBackOptions

protected array getPostBackOptions ()

Output
array list of post back options.
Exception

getRating

public float getRating ()

Output
float rating value.
Exception

getRatingImageType

protected string getRatingImageType (integer $index )

Input
integer$indexrating image index
Output
string the rating image corresponding to current index to be rendered.
Exception

getRatingIndex

protected int getRatingIndex (float $rating )

Input
float$ratingrating value
Output
int rating as integer
Exception

getRatingStyle

public TActiveRatingListStyle getRatingStyle ()

Output
TActiveRatingListStyle current rating style
Exception

getRatingStyleCssClass

protected string getRatingStyleCssClass ()

Output
string rating style css class name.
Exception

getReadOnly

public boolean getReadOnly ()

Output
boolean whether the items in the column can be edited. Defaults to false.
Exception

onPreRender

public void onPreRender (mixed $param )

Publish the the rating style css file and rating image files.

Input
mixed$param
Output
Exception

publishRatingListImages

protected array publishRatingListImages (string $style , string $fileExt )

Input
string$stylerating style name
string$fileExtrating image file extension, default is '.gif'
Output
array URL of publish the rating images
Exception

publishRatingListStyle

protected string publishRatingListStyle (string $style )

Input
string$stylerating style name
Output
string URL of the css style file
Exception