PHP 클래스 Prado\Web\UI\ActiveControls\TActiveTableCell

TActiveTableCell is the active counterpart to the original {@link TTableCell} control and displays a table cell. The horizontal and vertical alignments of the cell are specified via {@link setHorizontalAlign HorizontalAlign} and {@link setVerticalAlign VerticalAlign} properties, respectively. TActiveTableCell allows the contents of the table cell to be changed during callback. When {@link onCellSelected CellSelected} property is set, selecting (clicking on) the cell will perform a callback request causing {@link onCellSelected OnCellSelected} event to be fired. It will also bubble the {@link onCellSelected OnCellSelected} event up to it's parent {@link TActiveTableRow} control which will fire up the event handlers if implemented. TActiveTableCell allows the client-side cell contents to be updated during a callback response by getting a new writer, invoking the render method and flushing the output, similar to a {@link TActivePanel} control. function callback_request($sender, $param) { $this->active_cell->render($param->getNewWriter()); } Please refer to the original documentation of the regular counterpart for usage.
부터: 3.1.9
저자: LANDWEHR Computer und Software GmbH ([email protected])
상속: extends Prado\Web\UI\WebControls\TTableCell, implements Prado\Web\UI\ActiveControls\ICallbackEventHandler, implements Prado\Web\UI\ActiveControls\IActiveControl
파일 보기 프로젝트 열기: pradosoft/prado

공개 메소드들

메소드 설명
__construct ( ) Creates a new callback control, sets the adapter to TActiveControlAdapter.
getActiveControl ( ) : TBaseActiveCallbackControl
getCellIndex ( ) : integer Returns the zero-based index of the TActiveTableCell within the {@link TTableCellCollection} of the parent {@link TTableRow} control. Raises a {@link TConfigurationException} if the cell is no member of the cell collection.
getClientSide ( ) : TCallbackClientSide
getRow ( ) : TTableRow Returns the parent {@link TTableRow} control by looping through all parents until a {@link TTableRow} is found. Raises a {@link TConfigurationException} if no row control is found.
onCellSelected ( $param ) This method is invoked when a callback is requested. The method raises 'OnCellSelected' event to fire up the event handlers. If you override this method, be sure to call the parent implementation so that the event handler can be invoked.
raiseCallbackEvent ( $param ) Raises the callback event. This method is required by {@link ICallbackEventHandler} interface. It will raise {@link onCellSelected OnCellSelected} event with a {@link TActiveTableCellEventParameter} containing the zero-based index of the TActiveTableCell.
render ( $writer ) Renders and replaces the cell's content on the client-side. When render() is called before the OnPreRender event, such as when render() is called during a callback event handler, the rendering is defered until OnPreRender event is raised.

보호된 메소드들

메소드 설명
addAttributesToRender ( $writer ) Ensure that the ID attribute is rendered and registers the javascript code for initializing the active control if the event handler for the {@link onCellSelected OnCellSelected} event is set.
getClientClassName ( ) : string
getPostBackOptions ( ) : array Returns postback specifications for the table cell.

메소드 상세

__construct() 공개 메소드

Creates a new callback control, sets the adapter to TActiveControlAdapter.
public __construct ( )

addAttributesToRender() 보호된 메소드

Ensure that the ID attribute is rendered and registers the javascript code for initializing the active control if the event handler for the {@link onCellSelected OnCellSelected} event is set.
protected addAttributesToRender ( $writer )

getActiveControl() 공개 메소드

public getActiveControl ( ) : TBaseActiveCallbackControl
리턴 TBaseActiveCallbackControl standard callback control options.

getCellIndex() 공개 메소드

Returns the zero-based index of the TActiveTableCell within the {@link TTableCellCollection} of the parent {@link TTableRow} control. Raises a {@link TConfigurationException} if the cell is no member of the cell collection.
public getCellIndex ( ) : integer
리턴 integer the zero-based index of the cell

getClientClassName() 보호된 메소드

protected getClientClassName ( ) : string
리턴 string corresponding javascript class name for this TActiveTableCell.

getClientSide() 공개 메소드

public getClientSide ( ) : TCallbackClientSide
리턴 TCallbackClientSide client side request options.

getPostBackOptions() 보호된 메소드

This method is used by framework and control developers.
protected getPostBackOptions ( ) : array
리턴 array parameters about how the row defines its postback behavior.

getRow() 공개 메소드

Returns the parent {@link TTableRow} control by looping through all parents until a {@link TTableRow} is found. Raises a {@link TConfigurationException} if no row control is found.
public getRow ( ) : TTableRow
리턴 Prado\Web\UI\WebControls\TTableRow the parent row control

onCellSelected() 공개 메소드

This method is invoked when a callback is requested. The method raises 'OnCellSelected' event to fire up the event handlers. If you override this method, be sure to call the parent implementation so that the event handler can be invoked.
public onCellSelected ( $param )

raiseCallbackEvent() 공개 메소드

This method is mainly used by framework and control developers.
public raiseCallbackEvent ( $param )

render() 공개 메소드

Renders and replaces the cell's content on the client-side. When render() is called before the OnPreRender event, such as when render() is called during a callback event handler, the rendering is defered until OnPreRender event is raised.
public render ( $writer )