## Class TActiveRatingList

Description

TActiveRatingList Class

Displays clickable images that represent a TActiveRadioButtonList

- since: 3.1
- version: $Id$
- author: Wei Zhuo <weizhuo[at]gmail[dot]com>

Located in /Web/UI/ActiveControls/TActiveRatingList.php (line 23)

    TComponent
       |
       --TApplicationComponent
          |
          --TControl
             |
             --TWebControl
                |
                --TDataBoundControl
                   |
                   --TListControl
                      |
                      --TCheckBoxList
                         |
                         --TRadioButtonList
                            |
                            --TActiveRadioButtonList
                               |
                               --TActiveRatingList

Class Constant Summary
SCRIPT_PATH = 'prado/activeratings'
Method Summary
TActiveRatingList __construct ()
void callClientFunction (string $func, mixed $value)
string getAssetUrl ([string $file = ''])
void getCaption ()
void getCaptionControl ()
string getCaptionControlID ()
string getCaptionID ()
string getClientClassName ()
array getHalfRatingInterval ()
array getPostBackOptions ()
float getRating ()
string getRatingImageType (integer $index)
int getRatingIndex (float $rating)
TActiveRatingListStyle getRatingStyle ()
string getRatingStyleCssClass ()
boolean getReadOnly ()
void onPreRender (mixed $param)
array publishRatingListImages (string $style, [string $fileExt = '.gif'])
string publishRatingListStyle (string $style)
void render (THtmlWriter $writer)
void renderClientControlScript (mixed $writer)
void renderItem (mixed $writer, mixed $repeatInfo, mixed $itemType, mixed $index)
void renderStaticRating (mixed $writer, mixed $repeatInfo, mixed $itemType, mixed $index)
void setCaption (mixed $value)
void setCaptionID (string $value)
void setEnabled (boolean $value)
void setHalfRatingInterval (array $value)
void setRating (float $value)
void setRatingStyle (string $value)
void setReadOnly (boolean $value)
void setRepeatLayout (string $value)
void setSelectedIndex (int $value)
Methods
Constructor __construct (line 35)

Sets the default repeat direction to horizontal.

- access: public

TActiveRatingList __construct ()

Redefinition of:

TActiveRadioButtonList::__construct()
  Creates a new callback control, sets the adapter to TActiveListControlAdapter. If you override this class, be sure to set the adapter appropriately by, for example, by calling this constructor.

callClientFunction (line 124)

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

- access: protected

void callClientFunction (string $func, mixed $value)

- string $func: static method name
- mixed $value: method parmaeter

getAssetUrl (line 270)

- return: asset file url.
- access: protected

string getAssetUrl ([string $file = ''])

- string $file: asset file in the self::SCRIPT_PATH directory.

getCaption (line 165)

- access: public

void getCaption ()
getCaptionControl (line 147)

- access: protected

void getCaptionControl ()
getCaptionControlID (line 251)

- return: find the client ID of the caption control.
- access: protected

string getCaptionControlID ()
getCaptionID (line 134)

- return: control or html element ID for displaying a caption.
- access: public

string getCaptionID ()
getClientClassName (line 377)

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

This method overrides the parent implementation.

- return: the javascript class name
- access: protected

string getClientClassName ()

Redefinition of:

TRadioButtonList::getClientClassName()
  Gets the name of the javascript class responsible for performing postback for this control.

getHalfRatingInterval (line 211)

- return: rating display half value interval, default is array(0.3, 0.7);
- access: public

array getHalfRatingInterval ()
getPostBackOptions (line 227)

- return: list of post back options.
- access: protected

array getPostBackOptions ()

Redefinition of:

TCheckBoxList::getPostBackOptions()
  Gets the post back options for this checkbox.

getRating (line 73)

- return: rating value.
- access: public

float getRating ()
getRatingImageType (line 360)

- return: the rating image corresponding to current index to be rendered.
- access: protected

string getRatingImageType (integer $index)

- integer $index: rating image index

getRatingIndex (line 97)

- return: rating as integer
- access: protected

int getRatingIndex (float $rating)

- float $rating: rating value

getRatingStyle (line 192)

- return: current rating style
- access: public

TActiveRatingListStyle getRatingStyle ()
getRatingStyleCssClass (line 219)

- return: rating style css class name.
- access: protected

string getRatingStyleCssClass ()
getReadOnly (line 44)

- return: whether the items in the column can be edited. Defaults to false.
- access: public

boolean getReadOnly ()
onPreRender (line 325)

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

- access: public

void onPreRender (mixed $param)

Redefinition of:

TCheckBoxList::onPreRender()
  Registers for post data on postback.

publishRatingListImages (line 294)

- return: URL of publish the rating images
- access: protected

array publishRatingListImages (string $style, [string $fileExt = '.gif'])

- string $style: rating style name
- string $fileExt: rating image file extension, default is '.gif'

publishRatingListStyle (line 280)

- return: URL of the css style file
- access: protected

string publishRatingListStyle (string $style)

- string $style: rating style name

render (line 309)

Add rating style class name to the class attribute when setReadOnly property is true and when the setCssClass property is empty.

- access: public

void render (THtmlWriter $writer)

- THtmlWriter $writer: renderer

Redefinition of:

TCheckBoxList::render()
  Renders the checkbox list control.

renderClientControlScript (line 242)

Registers the javascript code for initializing the active control only if setReadOnly property is false.

- access: protected

void renderClientControlScript (mixed $writer)

Redefinition of:

TActiveRadioButtonList::renderClientControlScript()
  Override parent implementation, no javascript is rendered here instead the javascript required for active control is registered in addAttributesToRender.

renderItem (line 337)

Renders the rating images if setReadOnly is true otherwise render the radio buttons.

- access: public

void renderItem (mixed $writer, mixed $repeatInfo, mixed $itemType, mixed $index)

Redefinition of:

TCheckBoxList::renderItem()
  Renders an item in the list.

renderStaticRating (line 348)

Renders the static rating images.

- access: protected

void renderStaticRating (mixed $writer, mixed $repeatInfo, mixed $itemType, mixed $index)
setCaption (line 158)

- access: public

void setCaption (mixed $value)
setCaptionID (line 142)

- access: public

void setCaptionID (string $value)

- string $value: control or html element ID for displaying a caption.

setEnabled (line 173)

- access: public

void setEnabled (boolean $value)

- boolean $value: true to enable the rating to be changed.

Redefinition of:

TControl::setEnabled()

setHalfRatingInterval (line 202)

Sets the interval such that those rating values within the interval will be considered as a half star rating.

- access: public

void setHalfRatingInterval (array $value)

- array $value: rating display half value interval, default is array(0.3, 0.7);

setRating (line 81)

- access: public

void setRating (float $value)

- float $value: rating value, also sets the selected Index

setRatingStyle (line 184)

- access: public

void setRatingStyle (string $value)

- string $value: set the rating style, default is "default"

setReadOnly (line 52)

- access: public

void setReadOnly (boolean $value)

- boolean $value: whether the items in the column can be edited

setRepeatLayout (line 62)

The repeat layout must be Table.

- access: public
- throws: TInvaliddataValueException when repeat layout is not Table.

void setRepeatLayout (string $value)

- string $value: repeat layout type

Redefinition of:

TCheckBoxList::setRepeatLayout()

setSelectedIndex (line 108)

- access: public

void setSelectedIndex (int $value)

- int $value: change the rating selection index

Redefinition of:

TListControl::setSelectedIndex()

#### Inherited Methods

Inherited From TActiveRadioButtonList

> TActiveRadioButtonList::__construct()
> TActiveRadioButtonList::createRepeatedControl()
> TActiveRadioButtonList::getActiveControl()
> TActiveRadioButtonList::getClientSide()
> TActiveRadioButtonList::onCallback()
> TActiveRadioButtonList::raiseCallbackEvent()
> TActiveRadioButtonList::renderClientControlScript()

Inherited From TRadioButtonList

> TRadioButtonList::createRepeatedControl()
> TRadioButtonList::getClientClassName()
> TRadioButtonList::getIsMultiSelect()
> TRadioButtonList::loadPostData()
> TRadioButtonList::setSelectedIndices()

Inherited From TCheckBoxList

> TCheckBoxList::__construct()
> 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()

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()

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::performDataBinding()
> TDataBoundControl::setAllowCustomPaging()
> TDataBoundControl::setAllowPaging()
> TDataBoundControl::setCurrentPageIndex()
> TDataBoundControl::setDataMember()
> TDataBoundControl::setDataSource()
> TDataBoundControl::setDataSourceID()
> TDataBoundControl::setInitialized()
> TDataBoundControl::setIsDataBound()
> TDataBoundControl::setPageSize()
> TDataBoundControl::setRequiresDataBinding()
> TDataBoundControl::setVirtualItemCount()
> TDataBoundControl::validateDataSource()

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()

Inherited From TControl

> TControl::__construct()
> 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()

Inherited From TApplicationComponent

> TApplicationComponent::getApplication()
> TApplicationComponent::getRequest()
> TApplicationComponent::getResponse()
> TApplicationComponent::getService()
> TApplicationComponent::getSession()
> TApplicationComponent::getUser()
> TApplicationComponent::publishAsset()
> TApplicationComponent::publishFilePath()

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()

Class Constants
SCRIPT_PATH = 'prado/activeratings' (line 25)

#### Inherited Constants

Inherited from TControl

> TControl::AUTOMATIC_ID_PREFIX
> TControl::CLIENT_ID_SEPARATOR
> TControl::CS_CHILD_INITIALIZED
> TControl::CS_CONSTRUCTED
> TControl::CS_INITIALIZED
> TControl::CS_LOADED
> TControl::CS_PRERENDERED
> TControl::CS_STATE_LOADED
> TControl::ID_FORMAT
> TControl::ID_SEPARATOR
> TControl::IS_CHILD_CREATED
> TControl::IS_CREATING_CHILD
> TControl::IS_DISABLE_THEMING
> TControl::IS_DISABLE_VIEWSTATE
> TControl::IS_ID_SET
> TControl::IS_SKIN_APPLIED
> TControl::IS_STYLESHEET_APPLIED
> TControl::RF_ADAPTER
> TControl::RF_AUTO_BINDINGS
> TControl::RF_CHILD_STATE
> TControl::RF_CONTROLS
> TControl::RF_CONTROLSTATE
> TControl::RF_DATA_BINDINGS
> TControl::RF_EVENTS
> TControl::RF_NAMED_CONTROLS
> TControl::RF_NAMED_CONTROLS_ID
> TControl::RF_NAMED_OBJECTS
> TControl::RF_SKIN_ID

Documentation generated on Mon, 21 Apr 2008 11:29:37 -0400 by phpDocumentor 1.3.0RC4