summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--demos/composer/protected/pages/ClassDefinition.php2
-rw-r--r--demos/composer/protected/pages/Home.page8
-rw-r--r--demos/personal/protected/Pages/Layout.tpl2
-rw-r--r--demos/quickstart/protected/controls/Layout.tpl2
-rw-r--r--demos/quickstart/protected/pages/Configurations/Templates1.page2
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TBulletedList/Home.page2
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TButton/Home.page4
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.page6
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDropDownList/Home.page8
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TLinkButton/Home.page4
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TListBox/Home.page16
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TPanel/Home.page4
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TRadioButtonList/Home.page6
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TTextBox/Home.page6
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/Components.page12
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/Samples/Hangman/Home.page60
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/Samples/HelloWorld/Home.page2
-rw-r--r--framework/I18N/Translation.php60
-rw-r--r--framework/Log/TLogRouter.php4
-rw-r--r--framework/Security/TAuthManager.php20
-rw-r--r--framework/TApplication.php62
-rw-r--r--framework/TComponent.php30
-rw-r--r--framework/Web/UI/TControl.php43
-rw-r--r--framework/Web/UI/TPage.php52
-rw-r--r--framework/Web/UI/TTemplateManager.php2
-rw-r--r--framework/Web/UI/TThemeManager.php2
-rw-r--r--framework/Web/UI/WebControls/TBaseDataList.php4
-rw-r--r--framework/Web/UI/WebControls/TBoundColumn.php4
-rw-r--r--framework/Web/UI/WebControls/TBulletedList.php8
-rw-r--r--framework/Web/UI/WebControls/TButton.php22
-rw-r--r--framework/Web/UI/WebControls/TButtonColumn.php2
-rw-r--r--framework/Web/UI/WebControls/TCheckBox.php10
-rw-r--r--framework/Web/UI/WebControls/TCustomValidator.php8
-rw-r--r--framework/Web/UI/WebControls/TDataBoundControl.php10
-rw-r--r--framework/Web/UI/WebControls/TDataGrid.php40
-rw-r--r--framework/Web/UI/WebControls/TDataList.php42
-rw-r--r--framework/Web/UI/WebControls/TDataSourceControl.php2
-rw-r--r--framework/Web/UI/WebControls/TDataSourceView.php2
-rw-r--r--framework/Web/UI/WebControls/TFileUpload.php6
-rw-r--r--framework/Web/UI/WebControls/THiddenField.php6
-rw-r--r--framework/Web/UI/WebControls/THyperLinkColumn.php2
-rw-r--r--framework/Web/UI/WebControls/TImageButton.php24
-rw-r--r--framework/Web/UI/WebControls/TLinkButton.php22
-rw-r--r--framework/Web/UI/WebControls/TListControl.php8
-rw-r--r--framework/Web/UI/WebControls/TRadioButton.php4
-rw-r--r--framework/Web/UI/WebControls/TRepeater.php22
-rw-r--r--framework/Web/UI/WebControls/TTextBox.php5
-rw-r--r--tests/UnitTests/framework/Web/UI/utControl.php2
-rw-r--r--tests/UnitTests/framework/utComponent.php28
49 files changed, 349 insertions, 355 deletions
diff --git a/demos/composer/protected/pages/ClassDefinition.php b/demos/composer/protected/pages/ClassDefinition.php
index 54e143e4..bd704b0e 100644
--- a/demos/composer/protected/pages/ClassDefinition.php
+++ b/demos/composer/protected/pages/ClassDefinition.php
@@ -173,7 +173,7 @@ class ClassDefinition extends TComponent
continue;
$comments=implode("\n\t * ",explode("\n",wordwrap($event->Comments)));
$writer->write("\n\t/**\n\t * Raises <b>$name</b> event.\n\t * $comments\n\t * @param TEventParameter event parameter\n\t */\n");
- $writer->write("\tpublic function on$name(\$param)\n\t{\n\t\t\$this->raiseEvent('$name',\$this,\$param);\n\t}\n");
+ $writer->write("\tpublic function $name(\$param)\n\t{\n\t\t\$this->raiseEvent('$name',\$this,\$param);\n\t}\n");
}
}
diff --git a/demos/composer/protected/pages/Home.page b/demos/composer/protected/pages/Home.page
index 7a0dd635..23ab2b86 100644
--- a/demos/composer/protected/pages/Home.page
+++ b/demos/composer/protected/pages/Home.page
@@ -89,12 +89,12 @@ implements <com:TTextBox ID="Interfaces" CssClass="slTextBox"/>
</com:TRepeater>
-<com:TButton Text="New Property" Command="propertyAction" CommandName="add" />
+<com:TButton Text="New Property" OnCommand="propertyAction" CommandName="add" />
</com:TPanel>
<com:TPanel GroupingText="Event Definitions">
-<com:TRepeater ID="EventList" ItemCommand="eventAction">
+<com:TRepeater ID="EventList" OnItemCommand="eventAction">
<prop:HeaderTemplate>
<table>
@@ -141,7 +141,7 @@ implements <com:TTextBox ID="Interfaces" CssClass="slTextBox"/>
</com:TRepeater>
-<com:TButton Text="New Event" Command="eventAction" CommandName="add" />
+<com:TButton Text="New Event" OnCommand="eventAction" CommandName="add" />
</com:TPanel>
@@ -161,7 +161,7 @@ Author Email
<br/>
<hr/>
-<com:TButton Text="Generate Code" Click="generateCode" />
+<com:TButton Text="Generate Code" OnClick="generateCode" />
<com:TTextHighlighter>
<com:TLiteral ID="SourceCode" />
</com:TTextHighlighter>
diff --git a/demos/personal/protected/Pages/Layout.tpl b/demos/personal/protected/Pages/Layout.tpl
index f1064231..897bf04b 100644
--- a/demos/personal/protected/Pages/Layout.tpl
+++ b/demos/personal/protected/Pages/Layout.tpl
@@ -25,7 +25,7 @@
<com:TLinkButton
Text="LOGOUT"
Visible=<%= !$this->User->IsGuest %>
- Click="logout"
+ OnClick="logout"
/>
</div>
</div>
diff --git a/demos/quickstart/protected/controls/Layout.tpl b/demos/quickstart/protected/controls/Layout.tpl
index 1ff77361..e874bb37 100644
--- a/demos/quickstart/protected/controls/Layout.tpl
+++ b/demos/quickstart/protected/controls/Layout.tpl
@@ -15,7 +15,7 @@
<div id="menu">
<a href="?">Home</a> |
<a href="http://www.pradosoft.com">PradoSoft.com</a> |
-<com:TLinkButton Text="Hide TOC" Click="toggleTopicPanel" />
+<com:TLinkButton Text="Hide TOC" OnClick="toggleTopicPanel" />
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
diff --git a/demos/quickstart/protected/pages/Configurations/Templates1.page b/demos/quickstart/protected/pages/Configurations/Templates1.page
index 37a389ba..102ee035 100644
--- a/demos/quickstart/protected/pages/Configurations/Templates1.page
+++ b/demos/quickstart/protected/pages/Configurations/Templates1.page
@@ -23,7 +23,7 @@ body content
<p>
It is required that component tags nest properly with each other and an opening component tag be paired with a closing tag, similar to that in XML. The following shows a component tag specifying the <tt>Text</tt> property and <tt>Click</tt> event of a button control,
<com:TTextHighlighter Language="prado" CssClass="source">
-&lt;com:TButton Text="Register" Click="registerUser" />
+&lt;com:TButton Text="Register" OnClick="registerUser" />
</com:TTextHighlighter>
</p>
<p>
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TBulletedList/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TBulletedList/Home.page
index c85ff574..77cc9f7c 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TBulletedList/Home.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TBulletedList/Home.page
@@ -67,7 +67,7 @@ Bulleted list of hyperlinks:
Bulleted list of link buttons (click on them to see the result):
</td>
<td class="sampleaction">
-<com:TBulletedList DisplayMode="LinkButton" Click="buttonClicked">
+<com:TBulletedList DisplayMode="LinkButton" OnClick="buttonClicked">
<com:TListItem Value="http://www.google.com/" Text="google" />
<com:TListItem Value="http://www.yahoo.com/" Text="yahoo" />
<com:TListItem Value="http://www.amazon.com/" Text="amazon" />
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TButton/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TButton/Home.page
index eb1bc235..3d49331f 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TButton/Home.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TButton/Home.page
@@ -19,7 +19,7 @@ Button with customized color, font and width:
<tr><td class="samplenote">
A click button:
</td><td class="sampleaction">
-<com:TButton Text="click me" Click="buttonClicked" />
+<com:TButton Text="click me" OnClick="buttonClicked" />
</td></tr>
<tr><td class="samplenote">
@@ -27,7 +27,7 @@ A command button:
</td><td class="sampleaction">
<com:TButton
Text="click me"
- Command="buttonClicked"
+ OnCommand="buttonClicked"
CommandName="test"
CommandParameter="value"
/>
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.page
index d4833ea9..bc750cb8 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.page
@@ -107,7 +107,7 @@ Check box list's behavior upon postback:
<com:TListItem Value="value 4" Text="item 4" Enabled="false" />
<com:TListItem Value="value 5" Text="item 5" Selected="true" />
</com:TCheckBoxList>
-<com:TButton Text="Submit" Click="buttonClicked" />
+<com:TButton Text="Submit" OnClick="buttonClicked" />
<br/>
<com:TLabel ID="SelectionResult" ForeColor="red" />
</td>
@@ -118,7 +118,9 @@ Check box list's behavior upon postback:
Auto postback check box list:
</td>
<td class="sampleaction">
-<com:TCheckBoxList AutoPostBack="true" SelectedIndexChanged="selectionChanged">
+<com:TCheckBoxList
+ AutoPostBack="true"
+ OnSelectedIndexChanged="selectionChanged">
<com:TListItem Value="value 1" Text="item 1" />
<com:TListItem Value="value 2" Text="item 2" Selected="true" />
<com:TListItem Value="value 3" Text="item 3" />
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDropDownList/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TDropDownList/Home.page
index 3554729b..5123cc94 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TDropDownList/Home.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TDropDownList/Home.page
@@ -32,7 +32,7 @@ Dropdown list with initial items:
List box with customized row number, color and font:
</td>
<td class="sampleaction">
-<com:TDropDownList Rows="3" ForeColor="blue" Font.Size="14pt">
+<com:TDropDownList ForeColor="blue" Font.Size="14pt">
<com:TListItem Value="value 1" Text="item 1" />
<com:TListItem Value="value 2" Text="item 2" Selected="true" />
<com:TListItem Value="value 3" Text="item 3" />
@@ -60,7 +60,9 @@ Disabled dropdown list:
Auto postback dropdown list:
</td>
<td class="sampleaction">
-<com:TDropDownList AutoPostBack="true" SelectedIndexChanged="selectionChanged">
+<com:TDropDownList
+ AutoPostBack="true"
+ OnSelectedIndexChanged="selectionChanged">
<com:TListItem Value="value 1" Text="item 1" />
<com:TListItem Value="value 2" Text="item 2" Selected="true" />
<com:TListItem Value="value 3" Text="item 3" />
@@ -81,7 +83,7 @@ Dropdown list's behavior upon postback:
<com:TListItem Value="value 3" Text="item 3" />
<com:TListItem Value="value 4" Text="item 4" />
</com:TDropDownList>
-<com:TButton Text="Submit" Click="buttonClicked"/>
+<com:TButton Text="Submit" OnClick="buttonClicked"/>
<com:TLabel ID="SelectionResult2" ForeColor="red" />
</td>
</tr>
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TLinkButton/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TLinkButton/Home.page
index 497e5083..f0e0b9cd 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TLinkButton/Home.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TLinkButton/Home.page
@@ -26,7 +26,7 @@ body content
<tr><td class="samplenote">
A click link button:
</td><td class="sampleaction">
-<com:TLinkButton Text="click me" Click="buttonClicked" />
+<com:TLinkButton Text="click me" OnClick="buttonClicked" />
</td></tr>
<tr><td class="samplenote">
@@ -34,7 +34,7 @@ A command link button:
</td><td class="sampleaction">
<com:TLinkButton
Text="click me"
- Command="buttonClicked"
+ OnCommand="buttonClicked"
CommandName="test"
CommandParameter="value"
/>
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TListBox/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TListBox/Home.page
index 66ac4fa2..161f68a4 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TListBox/Home.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TListBox/Home.page
@@ -62,7 +62,9 @@ Disabled list box:
Auto postback list box:
</td>
<td class="sampleaction">
-<com:TListBox AutoPostBack="true" SelectedIndexChanged="selectionChanged">
+<com:TListBox
+ AutoPostBack="true"
+ OnSelectedIndexChanged="selectionChanged">
<com:TListItem Value="value 1" Text="item 1" />
<com:TListItem Value="value 2" Text="item 2" Selected="true" />
<com:TListItem Value="value 3" Text="item 3" />
@@ -83,7 +85,7 @@ List box's behavior upon postback:
<com:TListItem Value="value 3" Text="item 3" />
<com:TListItem Value="value 4" Text="item 4" />
</com:TListBox>
-<com:TButton Text="Submit" Click="buttonClicked"/>
+<com:TButton Text="Submit" OnClick="buttonClicked"/>
<com:TLabel ID="SelectionResult2" ForeColor="red" />
</td>
</tr>
@@ -131,7 +133,7 @@ List box's behavior upon postback:
<com:TListItem Value="value 3" Text="item 3" />
<com:TListItem Value="value 4" Text="item 4" Selected="true" />
</com:TListBox>
-<com:TButton Text="Submit" Click="buttonClicked2" />
+<com:TButton Text="Submit" OnClick="buttonClicked2" />
<br/>
<com:TLabel ID="MultiSelectionResult2" ForeColor="red" />
</td>
@@ -144,7 +146,7 @@ Auto postback list box:
<td class="sampleaction">
<com:TListBox AutoPostBack="true"
SelectionMode="Multiple"
- SelectedIndexChanged="multiSelectionChanged">
+ OnSelectedIndexChanged="multiSelectionChanged">
<com:TListItem Value="value 1" Text="item 1" />
<com:TListItem Value="value 2" Text="item 2" Selected="true" />
<com:TListItem Value="value 3" Text="item 3" />
@@ -170,7 +172,7 @@ Databind to an integer-indexed array:
<com:TListBox ID="DBListBox1"
AutoPostBack="true"
SelectionMode="Multiple"
- SelectedIndexChanged="DBListBox1Changed" />
+ OnSelectedIndexChanged="DBListBox1Changed" />
<com:TLabel ID="DBListBox1Result" ForeColor="red" />
</td>
</tr>
@@ -183,7 +185,7 @@ Databind to an associative array:
<com:TListBox ID="DBListBox2"
AutoPostBack="true"
SelectionMode="Multiple"
- SelectedIndexChanged="DBListBox2Changed" />
+ OnSelectedIndexChanged="DBListBox2Changed" />
<com:TLabel ID="DBListBox2Result" ForeColor="red" />
</td>
</tr>
@@ -198,7 +200,7 @@ Databind with DataTextField and DataValueField specified:
SelectionMode="Multiple"
DataTextField="name"
DataValueField="id"
- SelectedIndexChanged="DBListBox3Changed" />
+ OnSelectedIndexChanged="DBListBox3Changed" />
<com:TLabel ID="DBListBox3Result" ForeColor="red" />
</td>
</tr>
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TPanel/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TPanel/Home.page
index c5c0d538..794b9dd0 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TPanel/Home.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TPanel/Home.page
@@ -58,8 +58,8 @@ Panel with a default button (hit 'enter' key to see what happened):
This is panel content with a <com:TLabel Text="label" Font.Italic="true" />
and two buttons: <br/>
<com:TCheckBox />
-<com:TButton ID="Button1" Text="button1" Click="buttonClicked" />
-<com:TButton ID="Button2" Text="button2" Click="buttonClicked" />
+<com:TButton ID="Button1" Text="button1" OnClick="buttonClicked" />
+<com:TButton ID="Button2" Text="button2" OnClick="buttonClicked" />
<com:TLabel ID="Result" ForeColor="red" />
<br/>
When you change focus to the panel and hit 'enter' key, <tt>button2</tt>
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TRadioButtonList/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TRadioButtonList/Home.page
index 3f5f7053..a65c4d2d 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TRadioButtonList/Home.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TRadioButtonList/Home.page
@@ -107,7 +107,7 @@ Radio button list's behavior upon postback:
<com:TListItem Value="value 4" Text="item 4" Enabled="false" />
<com:TListItem Value="value 5" Text="item 5" />
</com:TRadioButtonList>
-<com:TButton Text="Submit" Click="buttonClicked" />
+<com:TButton Text="Submit" OnClick="buttonClicked" />
<br/>
<com:TLabel ID="SelectionResult" ForeColor="red" />
</td>
@@ -118,7 +118,9 @@ Radio button list's behavior upon postback:
Auto postback radio button list:
</td>
<td class="sampleaction">
-<com:TRadioButtonList AutoPostBack="true" SelectedIndexChanged="selectionChanged">
+<com:TRadioButtonList
+ AutoPostBack="true"
+ OnSelectedIndexChanged="selectionChanged">
<com:TListItem Value="value 1" Text="item 1" />
<com:TListItem Value="value 2" Text="item 2" Selected="true" />
<com:TListItem Value="value 3" Text="item 3" />
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TTextBox/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TTextBox/Home.page
index f771b2ba..7bbe1744 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TTextBox/Home.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TTextBox/Home.page
@@ -51,7 +51,7 @@ Auto postback text box not causing validation:
Text="change me"
AutoPostBack="true"
CausesValidation="false"
- TextChanged="textChanged" />
+ OnTextChanged="textChanged" />
</td></tr>
<tr><td class="samplenote">
@@ -76,7 +76,7 @@ Text box's behavior upon postback:
<com:TButton
Text="Submit"
CausesValidation="false"
- Click="submitText" />
+ OnClick="submitText" />
</td></tr>
<tr><td class="samplenote">
@@ -148,7 +148,7 @@ Auto postback text box not causing validation:
Text="change me"
AutoPostBack="true"
CausesValidation="false"
- TextChanged="textChanged" />
+ OnTextChanged="textChanged" />
</td></tr>
<tr><td class="samplenote">
diff --git a/demos/quickstart/protected/pages/Fundamentals/Components.page b/demos/quickstart/protected/pages/Fundamentals/Components.page
index 32d82e1c..c419a5fa 100644
--- a/demos/quickstart/protected/pages/Fundamentals/Components.page
+++ b/demos/quickstart/protected/pages/Fundamentals/Components.page
@@ -58,7 +58,7 @@ $component-&gt;getFont()-&gt;setName( $name );
Component events are special properties that take method names as their values. Attaching (setting) a method to an event will hook up the method to the places at which the event is raised. Therefore, the behavior of a component can be modified in a way that may not be foreseen during the development of the component.
</p>
<p>
-A component event is defined by the existence of an <tt>on</tt>-method. For example, in <tt>TButton</tt>, we have
+A component event is defined by the existence of a method whose name starts with the word <tt>on</tt>. The event name is the method name and is thus case-insensitve. For example, in <tt>TButton</tt>, we have
<com:TTextHighlighter CssClass="source">
class TButton extends TWebControl {
public function onClick( $param ) {
@@ -66,12 +66,12 @@ class TButton extends TWebControl {
}
}
</com:TTextHighlighter>
-This defines an event named <tt>Click</tt>, and a handler can be attached to the event using one of the following ways,
+This defines an event named <tt>OnClick</tt>, and a handler can be attached to the event using one of the following ways,
<com:TTextHighlighter CssClass="source">
-$button->Click = $callback;
-$button->Click->add( $callback );
-$button->Click[] = $callback;
-$button->attachEventHandler( 'Click' , $callback );
+$button->OnClick = $callback;
+$button->OnClick->add( $callback );
+$button->OnClick[] = $callback;
+$button->attachEventHandler( 'OnClick' , $callback );
</com:TTextHighlighter>
where <tt>$callback</tt> refers to a valid PHP callback (e.g. a function name, a class method <tt>array($object,'method')</tt>, etc.)
</p>
diff --git a/demos/quickstart/protected/pages/Fundamentals/Samples/Hangman/Home.page b/demos/quickstart/protected/pages/Fundamentals/Samples/Hangman/Home.page
index bae7b308..977b2a04 100644
--- a/demos/quickstart/protected/pages/Fundamentals/Samples/Hangman/Home.page
+++ b/demos/quickstart/protected/pages/Fundamentals/Samples/Hangman/Home.page
@@ -11,7 +11,7 @@ If you make too many mistakes, you lose the game!</p>
<com:TListItem Value="5" Text="Medium game; you are allowed 5 misses."/>
<com:TListItem Value="3" Text="Hard game; you are allowed 3 misses."/>
</com:TRadioButtonList>
-<com:TButton Text="Play!" Click="selectLevel" />
+<com:TButton Text="Play!" OnClick="selectLevel" />
<com:TLabel ID="LevelError" Text="You must choose a difficulty level!" ForeColor="red" Visible="false" />
</com:TPanel>
@@ -21,46 +21,46 @@ If you make too many mistakes, you lose the game!</p>
<p>You have made <%=$this->Page->Misses %> bad guesses
out of a maximum of <%= $this->Page->Level %>.</p>
<p>Guess:
-<com:TLinkButton ID="GuessA" Text="A" Click="guessWord" />
-<com:TLinkButton ID="GuessB" Text="B" Click="guessWord" />
-<com:TLinkButton ID="GuessC" Text="C" Click="guessWord" />
-<com:TLinkButton ID="GuessD" Text="D" Click="guessWord" />
-<com:TLinkButton ID="GuessE" Text="E" Click="guessWord" />
-<com:TLinkButton ID="GuessF" Text="F" Click="guessWord" />
-<com:TLinkButton ID="GuessG" Text="G" Click="guessWord" />
-<com:TLinkButton ID="GuessH" Text="H" Click="guessWord" />
-<com:TLinkButton ID="GuessI" Text="I" Click="guessWord" />
-<com:TLinkButton ID="GuessJ" Text="J" Click="guessWord" />
-<com:TLinkButton ID="GuessK" Text="K" Click="guessWord" />
-<com:TLinkButton ID="GuessL" Text="L" Click="guessWord" />
-<com:TLinkButton ID="GuessM" Text="M" Click="guessWord" />
-<com:TLinkButton ID="GuessN" Text="N" Click="guessWord" />
-<com:TLinkButton ID="GuessO" Text="O" Click="guessWord" />
-<com:TLinkButton ID="GuessP" Text="P" Click="guessWord" />
-<com:TLinkButton ID="GuessQ" Text="Q" Click="guessWord" />
-<com:TLinkButton ID="GuessR" Text="R" Click="guessWord" />
-<com:TLinkButton ID="GuessS" Text="S" Click="guessWord" />
-<com:TLinkButton ID="GuessT" Text="T" Click="guessWord" />
-<com:TLinkButton ID="GuessU" Text="U" Click="guessWord" />
-<com:TLinkButton ID="GuessV" Text="V" Click="guessWord" />
-<com:TLinkButton ID="GuessW" Text="W" Click="guessWord" />
-<com:TLinkButton ID="GuessX" Text="X" Click="guessWord" />
-<com:TLinkButton ID="GuessY" Text="Y" Click="guessWord" />
-<com:TLinkButton ID="GuessZ" Text="Z" Click="guessWord" />
+<com:TLinkButton ID="GuessA" Text="A" OnClick="guessWord" />
+<com:TLinkButton ID="GuessB" Text="B" OnClick="guessWord" />
+<com:TLinkButton ID="GuessC" Text="C" OnClick="guessWord" />
+<com:TLinkButton ID="GuessD" Text="D" OnClick="guessWord" />
+<com:TLinkButton ID="GuessE" Text="E" OnClick="guessWord" />
+<com:TLinkButton ID="GuessF" Text="F" OnClick="guessWord" />
+<com:TLinkButton ID="GuessG" Text="G" OnClick="guessWord" />
+<com:TLinkButton ID="GuessH" Text="H" OnClick="guessWord" />
+<com:TLinkButton ID="GuessI" Text="I" OnClick="guessWord" />
+<com:TLinkButton ID="GuessJ" Text="J" OnClick="guessWord" />
+<com:TLinkButton ID="GuessK" Text="K" OnClick="guessWord" />
+<com:TLinkButton ID="GuessL" Text="L" OnClick="guessWord" />
+<com:TLinkButton ID="GuessM" Text="M" OnClick="guessWord" />
+<com:TLinkButton ID="GuessN" Text="N" OnClick="guessWord" />
+<com:TLinkButton ID="GuessO" Text="O" OnClick="guessWord" />
+<com:TLinkButton ID="GuessP" Text="P" OnClick="guessWord" />
+<com:TLinkButton ID="GuessQ" Text="Q" OnClick="guessWord" />
+<com:TLinkButton ID="GuessR" Text="R" OnClick="guessWord" />
+<com:TLinkButton ID="GuessS" Text="S" OnClick="guessWord" />
+<com:TLinkButton ID="GuessT" Text="T" OnClick="guessWord" />
+<com:TLinkButton ID="GuessU" Text="U" OnClick="guessWord" />
+<com:TLinkButton ID="GuessV" Text="V" OnClick="guessWord" />
+<com:TLinkButton ID="GuessW" Text="W" OnClick="guessWord" />
+<com:TLinkButton ID="GuessX" Text="X" OnClick="guessWord" />
+<com:TLinkButton ID="GuessY" Text="Y" OnClick="guessWord" />
+<com:TLinkButton ID="GuessZ" Text="Z" OnClick="guessWord" />
</p>
-<p><com:TLinkButton Text="Give up?" Click="giveUp" /></p>
+<p><com:TLinkButton Text="Give up?" OnClick="giveUp" /></p>
</com:TPanel>
<com:TPanel ID="WinPanel" Visible="false">
<h2>You Win!</h2>
<p>The word was: <%= $this->Page->Word %>.</p>
-<p><com:TLinkButton Text="Start Again" Click="startAgain" /></p>
+<p><com:TLinkButton Text="Start Again" OnClick="startAgain" /></p>
</com:TPanel>
<com:TPanel ID="LosePanel" Visible="false">
<h2>You Lose!</h2>
<p>The word was: <%= $this->Page->Word %>.</p>
-<p><com:TLinkButton Text="Start Again" Click="startAgain" /></p>
+<p><com:TLinkButton Text="Start Again" OnClick="startAgain" /></p>
</com:TPanel>
</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Fundamentals/Samples/HelloWorld/Home.page b/demos/quickstart/protected/pages/Fundamentals/Samples/HelloWorld/Home.page
index 8931dad6..60c7c3e2 100644
--- a/demos/quickstart/protected/pages/Fundamentals/Samples/HelloWorld/Home.page
+++ b/demos/quickstart/protected/pages/Fundamentals/Samples/HelloWorld/Home.page
@@ -1,6 +1,6 @@
<%@ Title="Hello World" %>
<com:TContent ID="body">
-<com:TButton Text="Click Me" Click="buttonClicked" />
+<com:TButton Text="Click Me" OnClick="buttonClicked" />
</com:TContent> \ No newline at end of file
diff --git a/framework/I18N/Translation.php b/framework/I18N/Translation.php
index 8f45ff64..91cfd6ee 100644
--- a/framework/I18N/Translation.php
+++ b/framework/I18N/Translation.php
@@ -2,11 +2,11 @@
/**
* Translation, static.
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the BSD License.
*
- * Copyright(c) 2004 by Xiang Wei Zhuo.
+ * Copyright(c) 2004 by Xiang Wei Zhuo.
*
* To contact the author write to {@link mailto:qiang.xue@gmail.com Qiang Xue}
* The latest version of PRADO can be obtained from:
@@ -21,11 +21,11 @@
* Get the MessageFormat class.
*/
Prado::using('System.I18N.core.MessageFormat');
-
+
/**
* Translation class.
- *
+ *
* Provides translation using a static MessageFormatter.
*
* @author Xiang Wei Zhuo <weizhuo[at]gmail[dot]com>
@@ -34,19 +34,19 @@ Prado::using('System.I18N.core.MessageFormat');
*/
class Translation extends TComponent
{
-
+
/**
* The string formatter. This is a class static variable.
- * @var MessageFormat
- */
+ * @var MessageFormat
+ */
protected static $formatter;
-
+
/**
* Initialize the TTranslate translation components
*/
public static function init()
- {
+ {
//initialized the default class wide formatter
if(is_null(self::$formatter))
{
@@ -55,49 +55,49 @@ class Translation extends TComponent
$source = MessageSource::factory($config['type'],
$config['source'],
$config['filename']);
-
+
$source->setCulture($app->getCulture());
-
+
if($config['cache'])
$source->setCache(new MessageCache($config['cache']));
-
+
self::$formatter = new MessageFormat($source, $app->getCharset());
//save the message on end request
Prado::getApplication()->attachEventHandler(
- 'EndRequest', array('Translation', 'saveMessages'));
- }
+ 'OnEndRequest', array('Translation', 'saveMessages'));
+ }
}
-
+
/**
* Get the static formatter from this component.
- * @return MessageFormat formattter.
+ * @return MessageFormat formattter.
* @see localize()
*/
public static function formatter()
{
return self::$formatter;
}
-
+
/**
* Save untranslated messages to the catalogue.
*/
public static function saveMessages()
{
static $onceonly = true;
-
+
if($onceonly && !is_null($formatter = self::$formatter))
{
$app = Prado::getApplication()->getGlobalization();
$config = $app->getTranslationConfiguration();
if(isset($config['autosave']))
- {
+ {
$formatter->getSource()->setCulture($app->getCulture());
$formatter->getSource()->save($config['catalogue']);
}
$onceonly = false;
- }
- }
+ }
+ }
}
/**
@@ -106,15 +106,15 @@ class Translation extends TComponent
* @param array a set of parameters to substitute.
* @param string a different catalogue to find the localize text.
* @param string the input AND output charset.
- * @return string localized text.
+ * @return string localized text.
* @see TTranslate::formatter()
* @see TTranslate::init()
*/
function localize($text, $parameters=array(), $catalogue=null, $charset=null)
{
-
+
$app = Prado::getApplication()->getGlobalization();
-
+
$params = array();
foreach($parameters as $key => $value)
$params['{'.$key.'}'] = $value;
@@ -127,17 +127,17 @@ function localize($text, $parameters=array(), $catalogue=null, $charset=null)
if(empty($catalogue) && isset($config['catalogue']))
$catalogue = $config['catalogue'];
-
+
//globalization charset
- $appCharset = is_null($app) ? '' : $app->getCharset();
-
+ $appCharset = is_null($app) ? '' : $app->getCharset();
+
//default charset
$defaultCharset = (is_null($app)) ? 'UTF-8' : $app->getDefaultCharset();
-
+
//fall back
- if(empty($charset)) $charset = $appCharset;
+ if(empty($charset)) $charset = $appCharset;
if(empty($charset)) $charset = $defaultCharset;
-
+
return Translation::formatter()->format($text,$params,$catalogue,$charset);
}
diff --git a/framework/Log/TLogRouter.php b/framework/Log/TLogRouter.php
index 6979849f..3292c4d3 100644
--- a/framework/Log/TLogRouter.php
+++ b/framework/Log/TLogRouter.php
@@ -68,8 +68,8 @@ class TLogRouter extends TModule
throw new TConfigurationException('logrouter_configfile_invalid',$this->_configFile);
}
$this->loadConfig($config);
- //$this->getApplication()->attachEventHandler('Error',array($this,'collectLogs'));
- $this->getApplication()->attachEventHandler('EndRequest',array($this,'collectLogs'));
+ //$this->getApplication()->attachEventHandler('OnError',array($this,'collectLogs'));
+ $this->getApplication()->attachEventHandler('OnEndRequest',array($this,'collectLogs'));
}
/**
diff --git a/framework/Security/TAuthManager.php b/framework/Security/TAuthManager.php
index 327104cc..ca0be56e 100644
--- a/framework/Security/TAuthManager.php
+++ b/framework/Security/TAuthManager.php
@@ -76,9 +76,9 @@ class TAuthManager extends TModule
throw new TConfigurationException('authmanager_usermanager_invalid',$this->_userManager);
$this->_userManager=$users;
}
- $application->attachEventHandler('Authentication',array($this,'doAuthentication'));
- $application->attachEventHandler('EndRequest',array($this,'leave'));
- $application->attachEventHandler('Authorization',array($this,'doAuthorization'));
+ $application->attachEventHandler('OnAuthentication',array($this,'doAuthentication'));
+ $application->attachEventHandler('OnEndRequest',array($this,'leave'));
+ $application->attachEventHandler('OnAuthorization',array($this,'doAuthorization'));
$this->_initialized=true;
}
@@ -177,17 +177,17 @@ class TAuthManager extends TModule
/**
* Performs the real authentication work.
- * An Authenticate event will be raised if there is any handler attached to it.
+ * An OnAuthenticate event will be raised if there is any handler attached to it.
* If the application already has a non-null user, it will return without further authentication.
* Otherwise, user information will be restored from session data.
- * @param mixed parameter to be passed to Authenticate event
+ * @param mixed parameter to be passed to OnAuthenticate event
* @throws TConfigurationException if session module does not exist.
*/
public function onAuthenticate($param)
{
$application=$this->getApplication();
- if($this->hasEventHandler('Authenticate'))
- $this->raiseEvent('Authenticate',$this,$application);
+ if($this->hasEventHandler('OnAuthenticate'))
+ $this->raiseEvent('OnAuthenticate',$this,$application);
if($application->getUser()!==null)
return;
@@ -204,13 +204,13 @@ class TAuthManager extends TModule
* Authorization rules obtained from the application will be used to check
* if a user is allowed. If authorization fails, the response status code
* will be set as 401 and the application terminates.
- * @param mixed parameter to be passed to Authenticate event
+ * @param mixed parameter to be passed to OnAuthorize event
*/
public function onAuthorize($param)
{
$application=$this->getApplication();
- if($this->hasEventHandler('Authorize'))
- $this->raiseEvent('Authorize',$this,$application);
+ if($this->hasEventHandler('OnAuthorize'))
+ $this->raiseEvent('OnAuthorize',$this,$application);
if(!$application->getAuthorizationRules()->isUserAllowed($application->getUser(),$application->getRequest()->getRequestType()))
{
$application->getResponse()->setStatusCode(401);
diff --git a/framework/TApplication.php b/framework/TApplication.php
index d0c9a6d9..fde385b7 100644
--- a/framework/TApplication.php
+++ b/framework/TApplication.php
@@ -377,7 +377,7 @@ class TApplication extends TComponent
/**
* Loads global values from persistent storage.
- * This method is invoked when {@link onLoadState LoadState} event is raised.
+ * This method is invoked when {@link onLoadState OnLoadState} event is raised.
* After this method, values that are stored in previous requests become
* available to the current request via {@link getGlobalState}.
*/
@@ -388,7 +388,7 @@ class TApplication extends TComponent
/**
* Saves global values into persistent storage.
- * This method is invoked when {@link onSaveState SaveState} event is raised.
+ * This method is invoked when {@link onSaveState OnSaveState} event is raised.
*/
protected function saveGlobals()
{
@@ -796,21 +796,21 @@ class TApplication extends TComponent
}
/**
- * Raises Error event.
+ * Raises OnError event.
* This method is invoked when an exception is raised during the lifecycles
* of the application.
* @param mixed event parameter
*/
public function onError($param)
{
- if($this->hasEventHandler('Error'))
- $this->raiseEvent('Error',$this,$param);
+ if($this->hasEventHandler('OnError'))
+ $this->raiseEvent('OnError',$this,$param);
else
$this->getErrorHandler()->handleError($this,$param);
}
/**
- * Raises BeginRequest event.
+ * Raises OnBeginRequest event.
* At the time when this method is invoked, application modules are loaded
* and initialized, user request is resolved and the corresponding service
* is loaded and initialized. The application is about to start processing
@@ -819,131 +819,131 @@ class TApplication extends TComponent
*/
public function onBeginRequest($param)
{
- $this->raiseEvent('BeginRequest',$this,$param);
+ $this->raiseEvent('OnBeginRequest',$this,$param);
}
/**
- * Raises Authentication event.
+ * Raises OnAuthentication event.
* This method is invoked when the user request needs to be authenticated.
* @param mixed event parameter
*/
public function onAuthentication($param)
{
- $this->raiseEvent('Authentication',$this,$param);
+ $this->raiseEvent('OnAuthentication',$this,$param);
}
/**
- * Raises PostAuthentication event.
+ * Raises OnPostAuthentication event.
* This method is invoked right after the user request is authenticated.
* @param mixed event parameter
*/
public function onPostAuthentication($param)
{
- $this->raiseEvent('PostAuthentication',$this,$param);
+ $this->raiseEvent('OnPostAuthentication',$this,$param);
}
/**
- * Raises Authorization event.
+ * Raises OnAuthorization event.
* This method is invoked when the user request needs to be authorized.
* @param mixed event parameter
*/
public function onAuthorization($param)
{
- $this->raiseEvent('Authorization',$this,$param);
+ $this->raiseEvent('OnAuthorization',$this,$param);
}
/**
- * Raises PostAuthorization event.
+ * Raises OnPostAuthorization event.
* This method is invoked right after the user request is authorized.
* @param mixed event parameter
*/
public function onPostAuthorization($param)
{
- $this->raiseEvent('PostAuthorization',$this,$param);
+ $this->raiseEvent('OnPostAuthorization',$this,$param);
}
/**
- * Raises LoadState event.
+ * Raises OnLoadState event.
* This method is invoked when the application needs to load state (probably stored in session).
* @param mixed event parameter
*/
public function onLoadState($param)
{
$this->loadGlobals();
- $this->raiseEvent('LoadState',$this,$param);
+ $this->raiseEvent('OnLoadState',$this,$param);
}
/**
- * Raises PostLoadState event.
+ * Raises OnPostLoadState event.
* This method is invoked right after the application state has been loaded.
* @param mixed event parameter
*/
public function onPostLoadState($param)
{
- $this->raiseEvent('PostLoadState',$this,$param);
+ $this->raiseEvent('OnPostLoadState',$this,$param);
}
/**
- * Raises PreRunService event.
+ * Raises OnPreRunService event.
* This method is invoked right before the service is to be run.
* @param mixed event parameter
*/
public function onPreRunService($param)
{
- $this->raiseEvent('PreRunService',$this,$param);
+ $this->raiseEvent('OnPreRunService',$this,$param);
}
/**
- * Raises RunService event.
+ * Raises OnRunService event.
* This method is invoked when the service runs.
* @param mixed event parameter
*/
public function onRunService($param)
{
- $this->raiseEvent('RunService',$this,$param);
+ $this->raiseEvent('OnRunService',$this,$param);
if($this->_service)
$this->_service->run();
}
/**
- * Raises PostRunService event.
+ * Raises OnPostRunService event.
* This method is invoked right after the servie is run.
* @param mixed event parameter
*/
public function onPostRunService($param)
{
- $this->raiseEvent('PostRunService',$this,$param);
+ $this->raiseEvent('OnPostRunService',$this,$param);
}
/**
- * Raises SaveState event.
+ * Raises OnSaveState event.
* This method is invoked when the application needs to save state (probably stored in session).
* @param mixed event parameter
*/
public function onSaveState($param)
{
- $this->raiseEvent('SaveState',$this,$param);
+ $this->raiseEvent('OnSaveState',$this,$param);
$this->saveGlobals();
}
/**
- * Raises PostSaveState event.
+ * Raises OnPostSaveState event.
* This method is invoked right after the application state has been saved.
* @param mixed event parameter
*/
public function onPostSaveState($param)
{
- $this->raiseEvent('PostSaveState',$this,$param);
+ $this->raiseEvent('OnPostSaveState',$this,$param);
}
/**
- * Raises EndRequest event.
+ * Raises OnEndRequest event.
* This method is invoked when the application completes the processing of the request.
* @param mixed event parameter
*/
public function onEndRequest($param)
{
- $this->raiseEvent('EndRequest',$this,$param);
+ $this->raiseEvent('OnEndRequest',$this,$param);
}
}
diff --git a/framework/TComponent.php b/framework/TComponent.php
index aa060750..cc5fa1b5 100644
--- a/framework/TComponent.php
+++ b/framework/TComponent.php
@@ -35,8 +35,8 @@
* in the format of concatenated words, with the first letter of each word
* capitalized (e.g. DisplayMode, ItemStyle).
*
- * An event is defined by the presence of a method whose name is the event name prefixed with 'on'.
- * The event name is case-insensitive.
+ * An event is defined by the presence of a method whose name starts with 'on'.
+ * The event name is the method name and is thus case-insensitive.
* An event can be attached with one or several methods (called event handlers).
* An event can be raised by calling {@link raiseEvent} method, upon which
* the attached event handlers will be invoked automatically in the order they
@@ -48,15 +48,15 @@
* and $param refers to a structure that may contain event-specific information.
* To raise an event (assuming named as 'Click') of a component, use
* <code>
- * $component->raiseEvent('Click');
+ * $component->raiseEvent('OnClick');
* </code>
* To attach an event handler to an event, use one of the following ways,
* <code>
- * $component->Click=$callback; // or $component->Click->add($callback);
- * $$component->attachEventHandler('Click',$callback);
+ * $component->OnClick=$callback; // or $component->OnClick->add($callback);
+ * $$component->attachEventHandler('OnClick',$callback);
* </code>
- * The first two ways make use of the fact that $component->Click refers to
- * the event handler list {@link TList} for the 'Click' event.
+ * The first two ways make use of the fact that $component->OnClick refers to
+ * the event handler list {@link TList} for the 'OnClick' event.
* The variable $callback contains the definition of the event handler that can
* be either a string referring to a global function name, or an array whose
* first element refers to an object and second element a method name/path that
@@ -115,7 +115,7 @@ class TComponent
// getting a property
return $this->$getter();
}
- else if(method_exists($this,'on'.$name))
+ else if(strncasecmp($name,'on',2)===0 && method_exists($this,$name))
{
// getting an event (handler list)
$name=strtolower($name);
@@ -148,7 +148,7 @@ class TComponent
{
$this->$setter($value);
}
- else if(method_exists($this,'on'.$name))
+ else if(strncasecmp($name,'on',2)===0 && method_exists($this,$name))
{
$this->attachEventHandler($name,$value);
}
@@ -244,7 +244,7 @@ class TComponent
*/
public function hasEvent($name)
{
- return method_exists($this,'on'.$name);
+ return strncasecmp($name,'on',2)===0 && method_exists($this,$name);
}
/**
@@ -263,7 +263,7 @@ class TComponent
*/
public function getEventHandlers($name)
{
- if(method_exists($this,'on'.$name))
+ if(strncasecmp($name,'on',2)===0 && method_exists($this,$name))
{
$name=strtolower($name);
if(!isset($this->_e[$name]))
@@ -299,13 +299,13 @@ class TComponent
* event handlers. You may also do these operations like
* getting and setting properties, e.g.,
* <code>
- * $component->Click[]=array($object,'buttonClicked');
- * $component->Click->insert(0,array($object,'buttonClicked'));
+ * $component->OnClick[]=array($object,'buttonClicked');
+ * $component->OnClick->insert(0,array($object,'buttonClicked'));
* </code>
* which are equivalent to the following
* <code>
- * $component->getEventHandlers('Click')->add(array($object,'buttonClicked'));
- * $component->getEventHandlers('Click')->insert(0,array($object,'buttonClicked'));
+ * $component->getEventHandlers('OnClick')->add(array($object,'buttonClicked'));
+ * $component->getEventHandlers('OnClick')->insert(0,array($object,'buttonClicked'));
* </code>
*
* @param string the event name
diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php
index 418a0646..a87563b4 100644
--- a/framework/Web/UI/TControl.php
+++ b/framework/Web/UI/TControl.php
@@ -544,17 +544,6 @@ class TControl extends TComponent
}
/**
- * Returns a value indicating whether this control type can take attributes in template.
- * This method can be overriden.
- * Only framework developers and control developers should use this method.
- * @return boolean whether the control allows attributes in template (default=true)
- */
- public function getAllowCustomAttributes()
- {
- return true;
- }
-
- /**
* @return boolean whether viewstate is enabled
*/
public function getEnableViewState($checkParents=false)
@@ -1094,62 +1083,62 @@ class TControl extends TComponent
}
/**
- * This method is invoked when the control enters 'Init' stage.
- * The method raises 'Init' event.
+ * This method is invoked when the control enters 'OnInit' stage.
+ * The method raises 'OnInit' event.
* If you override this method, be sure to call the parent implementation
* so that the event handlers can be invoked.
* @param TEventParameter event parameter to be passed to the event handlers
*/
protected function onInit($param)
{
- $this->raiseEvent('Init',$this,$param);
+ $this->raiseEvent('OnInit',$this,$param);
}
/**
- * This method is invoked when the control enters 'Load' stage.
- * The method raises 'Load' event.
+ * This method is invoked when the control enters 'OnLoad' stage.
+ * The method raises 'OnLoad' event.
* If you override this method, be sure to call the parent implementation
* so that the event handlers can be invoked.
* @param TEventParameter event parameter to be passed to the event handlers
*/
protected function onLoad($param)
{
- $this->raiseEvent('Load',$this,$param);
+ $this->raiseEvent('OnLoad',$this,$param);
}
/**
- * Raises 'DataBinding' event.
+ * Raises 'OnDataBinding' event.
* This method is invoked when {@link dataBind} is invoked.
* @param TEventParameter event parameter to be passed to the event handlers
*/
protected function onDataBinding($param)
{
- $this->raiseEvent('DataBinding',$this,$param);
+ $this->raiseEvent('OnDataBinding',$this,$param);
}
/**
- * This method is invoked when the control enters 'Unload' stage.
- * The method raises 'Unload' event.
+ * This method is invoked when the control enters 'OnUnload' stage.
+ * The method raises 'OnUnload' event.
* If you override this method, be sure to call the parent implementation
* so that the event handlers can be invoked.
* @param TEventParameter event parameter to be passed to the event handlers
*/
protected function onUnload($param)
{
- $this->raiseEvent('Unload',$this,$param);
+ $this->raiseEvent('OnUnload',$this,$param);
}
/**
- * This method is invoked when the control enters 'PreRender' stage.
- * The method raises 'PreRender' event.
+ * This method is invoked when the control enters 'OnPreRender' stage.
+ * The method raises 'OnPreRender' event.
* If you override this method, be sure to call the parent implementation
* so that the event handlers can be invoked.
* @param TEventParameter event parameter to be passed to the event handlers
*/
protected function onPreRender($param)
{
- $this->raiseEvent('PreRender',$this,$param);
+ $this->raiseEvent('OnPreRender',$this,$param);
}
/**
@@ -1270,7 +1259,7 @@ class TControl extends TComponent
*/
protected function onSaveState($param)
{
- $this->raiseEvent('SaveState',$this,$param);
+ $this->raiseEvent('OnSaveState',$this,$param);
}
/**
@@ -1281,7 +1270,7 @@ class TControl extends TComponent
*/
protected function onLoadState($param)
{
- $this->raiseEvent('LoadState',$this,$param);
+ $this->raiseEvent('OnLoadState',$this,$param);
}
/**
diff --git a/framework/Web/UI/TPage.php b/framework/Web/UI/TPage.php
index 1dcc0b99..c58ebefe 100644
--- a/framework/Web/UI/TPage.php
+++ b/framework/Web/UI/TPage.php
@@ -389,69 +389,69 @@ class TPage extends TTemplateControl
}
/**
- * Raises PreInit event.
- * This method is invoked right before {@link onInit Init} stage.
+ * Raises OnPreInit event.
+ * This method is invoked right before {@link onInit OnInit} stage.
* You may override this method to provide additional initialization that
- * should be done before {@link onInit Init} (e.g. setting {@link setTheme Theme} or
+ * should be done before {@link onInit OnInit} (e.g. setting {@link setTheme Theme} or
* {@link setStyleSheetTheme StyleSheetTheme}).
* Remember to call the parent implementation to ensure PreInit event is raised.
* @param mixed event parameter
*/
protected function onPreInit($param)
{
- $this->raiseEvent('PreInit',$this,$param);
+ $this->raiseEvent('OnPreInit',$this,$param);
}
/**
- * Raises InitComplete event.
- * This method is invoked right after {@link onInit Init} stage and before {@link onLoad Load} stage.
+ * Raises OnInitComplete event.
+ * This method is invoked right after {@link onInit OnInit} stage and before {@link onLoad OnLoad} stage.
* You may override this method to provide additional initialization that
- * should be done after {@link onInit Init}.
+ * should be done after {@link onInit OnInit}.
* Remember to call the parent implementation to ensure InitComplete event is raised.
* @param mixed event parameter
*/
protected function onInitComplete($param)
{
- $this->raiseEvent('InitComplete',$this,$param);
+ $this->raiseEvent('OnInitComplete',$this,$param);
}
/**
- * Raises PreLoad event.
- * This method is invoked right before {@link onLoad Load} stage.
+ * Raises OnPreLoad event.
+ * This method is invoked right before {@link onLoad OnLoad} stage.
* You may override this method to provide additional page loading logic that
- * should be done before {@link onLoad Load}.
+ * should be done before {@link onLoad OnLoad}.
* Remember to call the parent implementation to ensure PreLoad event is raised.
* @param mixed event parameter
*/
protected function onPreLoad($param)
{
- $this->raiseEvent('PreLoad',$this,$param);
+ $this->raiseEvent('OnPreLoad',$this,$param);
}
/**
- * Raises LoadComplete event.
- * This method is invoked right after {@link onLoad Load} stage.
+ * Raises OnLoadComplete event.
+ * This method is invoked right after {@link onLoad OnLoad} stage.
* You may override this method to provide additional page loading logic that
- * should be done after {@link onLoad Load}.
+ * should be done after {@link onLoad OnLoad}.
* Remember to call the parent implementation to ensure LoadComplete event is raised.
* @param mixed event parameter
*/
protected function onLoadComplete($param)
{
- $this->raiseEvent('LoadComplete',$this,$param);
+ $this->raiseEvent('OnLoadComplete',$this,$param);
}
/**
- * Raises PreRenderComplete event.
- * This method is invoked right after {@link onPreRender PreRender} stage.
+ * Raises OnPreRenderComplete event.
+ * This method is invoked right after {@link onPreRender OnPreRender} stage.
* You may override this method to provide additional preparation for page rendering
- * that should be done after {@link onPreRender PreRender}.
+ * that should be done after {@link onPreRender OnPreRender}.
* Remember to call the parent implementation to ensure PreRenderComplete event is raised.
* @param mixed event parameter
*/
protected function onPreRenderComplete($param)
{
- $this->raiseEvent('PreRenderComplete',$this,$param);
+ $this->raiseEvent('OnPreRenderComplete',$this,$param);
$cs=$this->getClientScript();
if($this->_theme)
{
@@ -470,15 +470,15 @@ class TPage extends TTemplateControl
}
/**
- * Raises SaveStateComplete event.
- * This method is invoked right after {@link onSaveState SaveState} stage.
+ * Raises OnSaveStateComplete event.
+ * This method is invoked right after {@link onSaveState OnSaveState} stage.
* You may override this method to provide additional logic after page state is saved.
* Remember to call the parent implementation to ensure SaveStateComplete event is raised.
* @param mixed event parameter
*/
protected function onSaveStateComplete($param)
{
- $this->raiseEvent('SaveStateComplete',$this,$param);
+ $this->raiseEvent('OnSaveStateComplete',$this,$param);
}
/**
@@ -620,7 +620,7 @@ class TPage extends TTemplateControl
/**
* Processes post data.
* @param TMap post data to be processed
- * @param boolean whether this method is invoked before {@link onLoad Load}.
+ * @param boolean whether this method is invoked before {@link onLoad OnLoad}.
*/
protected function processPostData($postData,$beforeLoad)
{
@@ -661,7 +661,7 @@ class TPage extends TTemplateControl
}
/**
- * Raises PostDataChangedEvent for controls whose data have been changed due to the postback.
+ * Raises OnPostDataChangedEvent for controls whose data have been changed due to the postback.
*/
private function raiseChangedEvents()
{
@@ -670,7 +670,7 @@ class TPage extends TTemplateControl
}
/**
- * Raises PostBack event.
+ * Raises OnPostBack event.
*/
private function raisePostBackEvent()
{
diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php
index b293c4bc..5a2ba069 100644
--- a/framework/Web/UI/TTemplateManager.php
+++ b/framework/Web/UI/TTemplateManager.php
@@ -301,8 +301,6 @@ class TTemplate extends TComponent implements ITemplate
{
if($control->hasProperty($name))
$this->configureProperty($control,$name,$value);
- else if($control->getAllowCustomAttributes())
- $this->configureAttribute($control,$name,$value);
else
throw new TTemplateRuntimeException('template_property_undefined',get_class($control),$name);
}
diff --git a/framework/Web/UI/TThemeManager.php b/framework/Web/UI/TThemeManager.php
index 83b29255..f2243e7c 100644
--- a/framework/Web/UI/TThemeManager.php
+++ b/framework/Web/UI/TThemeManager.php
@@ -333,8 +333,6 @@ class TTheme extends TComponent
else
throw new TConfigurationException('theme_property_readonly',$type,$name);
}
- else if($control->getAllowCustomAttributes())
- $control->getAttributes()->add($name,$value);
else
throw new TConfigurationException('theme_property_undefined',$type,$name);
}
diff --git a/framework/Web/UI/WebControls/TBaseDataList.php b/framework/Web/UI/WebControls/TBaseDataList.php
index 351fbbc9..c68be5f9 100644
--- a/framework/Web/UI/WebControls/TBaseDataList.php
+++ b/framework/Web/UI/WebControls/TBaseDataList.php
@@ -230,14 +230,14 @@ abstract class TBaseDataList extends TDataBoundControl
}
/**
- * Raises SelectedIndexChanged event.
+ * Raises OnSelectedIndexChanged event.
* This method is invoked when a different item is selected
* in a data listing control between posts to the server.
* @param mixed event parameter
*/
public function onSelectedIndexChanged($param)
{
- $this->raiseEvent('SelectedIndexChanged',$this,$param);
+ $this->raiseEvent('OnSelectedIndexChanged',$this,$param);
}
}
diff --git a/framework/Web/UI/WebControls/TBoundColumn.php b/framework/Web/UI/WebControls/TBoundColumn.php
index 84f52034..e9dc0412 100644
--- a/framework/Web/UI/WebControls/TBoundColumn.php
+++ b/framework/Web/UI/WebControls/TBoundColumn.php
@@ -108,13 +108,13 @@ class TBoundColumn extends TDataGridColumn
$control=$textBox;
}
if(($dataField=$this->getDataField())!=='')
- $control->attachEventHandler('DataBinding',array($this,'dataBindColumn'));
+ $control->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
break;
case 'Item':
case 'AlternatingItem':
case 'SelectedItem':
if(($dataField=$this->getDataField())!=='')
- $cell->attachEventHandler('DataBinding',array($this,'dataBindColumn'));
+ $cell->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
break;
}
}
diff --git a/framework/Web/UI/WebControls/TBulletedList.php b/framework/Web/UI/WebControls/TBulletedList.php
index 63183233..d36268ce 100644
--- a/framework/Web/UI/WebControls/TBulletedList.php
+++ b/framework/Web/UI/WebControls/TBulletedList.php
@@ -29,7 +29,7 @@ Prado::using('System.Web.UI.WebControls.TListControl');
* is displayed as a hyperlink whose URL is given by the item value, and the
* {@link setTarget Target} property can be used to specify the target browser window;
* When the mode is 'LinkButton', each item is displayed as a link button which
- * posts back to the page if a user clicks on that and the event {@link onClick Click}
+ * posts back to the page if a user clicks on that and the event {@link onClick OnClick}
* will be raised under such a circumstance.
*
* @author Qiang Xue <qiang.xue@gmail.com>
@@ -55,7 +55,7 @@ class TBulletedList extends TListControl implements IPostBackEventHandler
* This method is required by {@link IPostBackEventHandler} interface.
* If {@link getCausesValidation CausesValidation} is true, it will
* invoke the page's {@link TPage::validate validate} method first.
- * It will raise {@link onClick Click} events.
+ * It will raise {@link onClick OnClick} events.
* This method is mainly used by framework and control developers.
* @param TEventParameter the event parameter
*/
@@ -202,14 +202,14 @@ class TBulletedList extends TListControl implements IPostBackEventHandler
}
/**
- * Raises 'Click' event.
+ * Raises 'OnClick' event.
* This method is invoked when the {@link getDisplayMode DisplayMode} is 'LinkButton'
* and end-users click on one of the buttons.
* @param TBulletedListEventParameter event parameter.
*/
public function onClick($param)
{
- $this->raiseEvent('Click',$this,$param);
+ $this->raiseEvent('OnClick',$this,$param);
}
/**
diff --git a/framework/Web/UI/WebControls/TButton.php b/framework/Web/UI/WebControls/TButton.php
index 02f35389..968a783a 100644
--- a/framework/Web/UI/WebControls/TButton.php
+++ b/framework/Web/UI/WebControls/TButton.php
@@ -22,7 +22,7 @@
* associated with the button. This allows you to create multiple TLinkButton
* components on a Web page and programmatically determine which one is clicked
* with what parameter. You can provide an event handler for
- * {@link onCommand Command} event to programmatically control the actions performed
+ * {@link onCommand OnCommand} event to programmatically control the actions performed
* when the command button is clicked. In the event handler, you can determine
* the {@link setCommandName CommandName} property value and
* the {@link setCommandParameter CommandParameter} property value
@@ -33,7 +33,7 @@
* A <b>submit</b> button does not have a command name associated with the button
* and clicking on it simply posts the Web page back to the server.
* By default, a TButton component is a submit button.
- * You can provide an event handler for the {@link onClick Click} event
+ * You can provide an event handler for the {@link onClick OnClick} event
* to programmatically control the actions performed when the submit button is clicked.
*
* Clicking on button can trigger form validation, if
@@ -118,26 +118,26 @@ class TButton extends TWebControl implements IPostBackEventHandler
/**
* This method is invoked when the button is clicked.
- * The method raises 'Click' event to fire up the event handlers.
+ * The method raises 'OnClick' 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.
* @param TEventParameter event parameter to be passed to the event handlers
*/
public function onClick($param)
{
- $this->raiseEvent('Click',$this,$param);
+ $this->raiseEvent('OnClick',$this,$param);
}
/**
* This method is invoked when the button is clicked.
- * The method raises 'Command' event to fire up the event handlers.
+ * The method raises 'OnCommand' event to fire up the event handlers.
* If you override this method, be sure to call the parent implementation
* so that the event handlers can be invoked.
* @param TCommandEventParameter event parameter to be passed to the event handlers
*/
public function onCommand($param)
{
- $this->raiseEvent('Command',$this,$param);
+ $this->raiseEvent('OnCommand',$this,$param);
$this->raiseBubbleEvent($this,$param);
}
@@ -146,7 +146,7 @@ class TButton extends TWebControl implements IPostBackEventHandler
* This method is required by {@link IPostBackEventHandler} interface.
* If {@link getCausesValidation CausesValidation} is true, it will
* invoke the page's {@link TPage::validate validate} method first.
- * It will raise {@link onClick Click} and {@link onCommand Command} events.
+ * It will raise {@link onClick OnClick} and {@link onCommand OnCommand} events.
* This method is mainly used by framework and control developers.
* @param TEventParameter the event parameter
*/
@@ -191,7 +191,7 @@ class TButton extends TWebControl implements IPostBackEventHandler
}
/**
- * @return string the command name associated with the {@link onCommand Command} event.
+ * @return string the command name associated with the {@link onCommand OnCommand} event.
*/
public function getCommandName()
{
@@ -199,7 +199,7 @@ class TButton extends TWebControl implements IPostBackEventHandler
}
/**
- * Sets the command name associated with the {@link onCommand Command} event.
+ * Sets the command name associated with the {@link onCommand OnCommand} event.
* @param string the text caption to be set
*/
public function setCommandName($value)
@@ -208,7 +208,7 @@ class TButton extends TWebControl implements IPostBackEventHandler
}
/**
- * @return string the parameter associated with the {@link onCommand Command} event
+ * @return string the parameter associated with the {@link onCommand OnCommand} event
*/
public function getCommandParameter()
{
@@ -216,7 +216,7 @@ class TButton extends TWebControl implements IPostBackEventHandler
}
/**
- * Sets the parameter associated with the {@link onCommand Command} event.
+ * Sets the parameter associated with the {@link onCommand OnCommand} event.
* @param string the text caption to be set
*/
public function setCommandParameter($value)
diff --git a/framework/Web/UI/WebControls/TButtonColumn.php b/framework/Web/UI/WebControls/TButtonColumn.php
index 34b4ba51..4555aa24 100644
--- a/framework/Web/UI/WebControls/TButtonColumn.php
+++ b/framework/Web/UI/WebControls/TButtonColumn.php
@@ -186,7 +186,7 @@ class TButtonColumn extends TDataGridColumn
$button->setCausesValidation($this->getCausesValidation());
$button->setValidationGroup($this->getValidationGroup());
if($this->getDataTextField()!=='')
- $button->attachEventHandler('DataBinding',array($this,'dataBindColumn'));
+ $button->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
$cell->getControls()->add($button);
}
}
diff --git a/framework/Web/UI/WebControls/TCheckBox.php b/framework/Web/UI/WebControls/TCheckBox.php
index 385eca06..ae6dc8e4 100644
--- a/framework/Web/UI/WebControls/TCheckBox.php
+++ b/framework/Web/UI/WebControls/TCheckBox.php
@@ -20,10 +20,10 @@
* property.
*
* To determine whether the TCheckBox component is checked, test the {@link getChecked Checked}
- * property. The {@link onCheckedChanged CheckedChanged} event is raised when
+ * property. The {@link onCheckedChanged OnCheckedChanged} event is raised when
* the {@link getChecked Checked} state of the TCheckBox component changes
* between posts to the server. You can provide an event handler for
- * the {@link onCheckedChanged CheckedChanged} event to to programmatically
+ * the {@link onCheckedChanged OnCheckedChanged} event to to programmatically
* control the actions performed when the state of the TCheckBox component changes
* between posts to the server.
*
@@ -71,7 +71,7 @@ class TCheckBox extends TWebControl implements IPostBackDataHandler, IValidatabl
/**
* Raises postdata changed event.
- * This method raises {@link onCheckedChanged CheckedChanged} event.
+ * This method raises {@link onCheckedChanged OnCheckedChanged} event.
* This method is primarly used by framework developers.
*/
public function raisePostDataChangedEvent()
@@ -87,14 +87,14 @@ class TCheckBox extends TWebControl implements IPostBackDataHandler, IValidatabl
}
/**
- * Raises <b>CheckedChanged</b> event when {@link getChecked Checked} changes value during postback.
+ * Raises <b>OnCheckedChanged</b> event when {@link getChecked Checked} changes value during postback.
* If you override this method, be sure to call the parent implementation
* so that the event delegates can be invoked.
* @param TEventParameter event parameter to be passed to the event handlers
*/
protected function onCheckedChanged($param)
{
- $this->raiseEvent('CheckedChanged',$this,$param);
+ $this->raiseEvent('OnCheckedChanged',$this,$param);
}
/**
diff --git a/framework/Web/UI/WebControls/TCustomValidator.php b/framework/Web/UI/WebControls/TCustomValidator.php
index 546f015b..e92ae828 100644
--- a/framework/Web/UI/WebControls/TCustomValidator.php
+++ b/framework/Web/UI/WebControls/TCustomValidator.php
@@ -22,7 +22,7 @@ Prado::using('System.Web.UI.WebControls.TBaseValidator');
* server-side or client-side or both) on an input component.
*
* To create a server-side validation function, provide a handler for
- * the {@link onServerValidate ServerValidate} event that performs the validation.
+ * the {@link onServerValidate OnServerValidate} event that performs the validation.
* The data string of the input control to validate can be accessed
* by {@link TServerValidateEventParameter::getValue Value} of the event parameter.
* The result of the validation should be stored in the
@@ -84,17 +84,17 @@ class TCustomValidator extends TBaseValidator
/**
* This method is invoked when the server side validation happens.
- * It will raise the <b>ServerValidate</b> event.
+ * It will raise the <b>OnServerValidate</b> event.
* The method also allows derived classes to handle the event without attaching a delegate.
* <b>Note</b> The derived classes should call parent implementation
- * to ensure the <b>ServerValidate</b> event is raised.
+ * to ensure the <b>OnServerValidate</b> event is raised.
* @param string the value to be validated
* @return boolean whether the value is valid
*/
public function onServerValidate($value)
{
$param=new TServerValidateEventParameter($value,true);
- $this->raiseEvent('ServerValidate',$this,$param);
+ $this->raiseEvent('OnServerValidate',$this,$param);
return $param->getIsValid();
}
diff --git a/framework/Web/UI/WebControls/TDataBoundControl.php b/framework/Web/UI/WebControls/TDataBoundControl.php
index aa177f07..5145b532 100644
--- a/framework/Web/UI/WebControls/TDataBoundControl.php
+++ b/framework/Web/UI/WebControls/TDataBoundControl.php
@@ -229,7 +229,7 @@ abstract class TDataBoundControl extends TWebControl
if(($view=$dataSource->getView($this->getDataMember()))===null)
throw new TInvalidDataValueException('databoundcontrol_datamember_invalid',$this->getDataMember());
if($this->_currentViewIsFromDataSourceID=$this->getUsingDataSourceID())
- $view->attachEventHandler('DataSourceViewChanged',array($this,'dataSourceViewChanged'));
+ $view->attachEventHandler('OnDataSourceViewChanged',array($this,'dataSourceViewChanged'));
$this->_currentView=$view;
}
else
@@ -264,17 +264,17 @@ abstract class TDataBoundControl extends TWebControl
abstract protected function performDataBinding($data);
/**
- * Raises <b>DataBound</b> event.
+ * Raises <b>OnDataBound</b> event.
* This method should be invoked after a databind is performed.
* It is mainly used by framework and component developers.
*/
public function onDataBound($param)
{
- $this->raiseEvent('DataBound',$this,$param);
+ $this->raiseEvent('OnDataBound',$this,$param);
}
/**
- * Sets page's <b>PreLoad</b> event handler as {@link onPagePreLoad}.
+ * Sets page's <b>OnPreLoad</b> event handler as {@link onPagePreLoad}.
* If viewstate is disabled and the current request is a postback,
* {@link setRequiresDataBinding RequiresDataBinding} will be set true.
* This method overrides the parent implementation.
@@ -284,7 +284,7 @@ abstract class TDataBoundControl extends TWebControl
{
parent::onInit($param);
$page=$this->getPage();
- $page->attachEventHandler('PreLoad',array($this,'onPagePreLoad'));
+ $page->attachEventHandler('OnPreLoad',array($this,'onPagePreLoad'));
}
/**
diff --git a/framework/Web/UI/WebControls/TDataGrid.php b/framework/Web/UI/WebControls/TDataGrid.php
index 318fc8b3..646ead01 100644
--- a/framework/Web/UI/WebControls/TDataGrid.php
+++ b/framework/Web/UI/WebControls/TDataGrid.php
@@ -554,12 +554,12 @@ class TDataGrid extends TBaseDataList
/**
* Handles <b>BubbleEvent</b>.
* This method overrides parent's implementation to handle
- * {@link onItemCommand ItemCommand} event which is bubbled from
+ * {@link onItemCommand OnItemCommand} event which is bubbled from
* {@link TDataGridItem} child controls.
* If the event parameter is {@link TDataGridCommandEventParameter} and
* the command name is a recognized one, which includes 'select', 'edit',
* 'delete', 'update', and 'cancel' (case-insensitive), then a
- * corresponding command event is also raised (such as {@link onEditCommand EditCommand}).
+ * corresponding command event is also raised (such as {@link onEditCommand OnEditCommand}).
* This method should only be used by control developers.
* @param TControl the sender of the event
* @param TEventParameter event parameter
@@ -619,100 +619,100 @@ class TDataGrid extends TBaseDataList
}
/**
- * Raises <b>CancelCommand</b> event.
+ * Raises <b>OnCancelCommand</b> event.
* This method is invoked when a button control raises<b>Command</b> event
* with<b>cancel</b> command name.
* @param TDataGridCommandEventParameter event parameter
*/
public function onCancelCommand($param)
{
- $this->raiseEvent('CancelCommand',$this,$param);
+ $this->raiseEvent('OnCancelCommand',$this,$param);
}
/**
- * Raises <b>DeleteCommand</b> event.
+ * Raises <b>OnDeleteCommand</b> event.
* This method is invoked when a button control raises <b>Command</b> event
* with <b>delete</b> command name.
* @param TDataGridCommandEventParameter event parameter
*/
public function onDeleteCommand($param)
{
- $this->raiseEvent('DeleteCommand',$this,$param);
+ $this->raiseEvent('OnDeleteCommand',$this,$param);
}
/**
- * Raises <b>EditCommand</b> event.
+ * Raises <b>OnEditCommand</b> event.
* This method is invoked when a button control raises <b>Command</b> event
* with <b>edit</b> command name.
* @param TDataGridCommandEventParameter event parameter
*/
public function onEditCommand($param)
{
- $this->raiseEvent('EditCommand',$this,$param);
+ $this->raiseEvent('OnEditCommand',$this,$param);
}
/**
- * Raises <b>ItemCommand</b> event.
+ * Raises <b>OnItemCommand</b> event.
* This method is invoked when a button control raises <b>Command</b> event.
* @param TDataGridItemCommandEventParameter event parameter
*/
public function onItemCommand($param)
{
- $this->raiseEvent('ItemCommand',$this,$param);
+ $this->raiseEvent('OnItemCommand',$this,$param);
}
/**
- * Raises <b>SortCommand</b> event.
+ * Raises <b>OnSortCommand</b> event.
* This method is invoked when a button control raises <b>Command</b> event
* with <b>sort</b> command name.
* @param TDataGridSortCommandEventParameter event parameter
*/
public function onSortCommand($param)
{
- $this->raiseEvent('SortCommand',$this,$param);
+ $this->raiseEvent('OnSortCommand',$this,$param);
}
/**
- * Raises <b>UpdateCommand</b> event.
+ * Raises <b>OnUpdateCommand</b> event.
* This method is invoked when a button control raises <b>Command</b> event
* with <b>update</b> command name.
* @param TDataGridCommandEventParameter event parameter
*/
public function onUpdateCommand($param)
{
- $this->raiseEvent('UpdateCommand',$this,$param);
+ $this->raiseEvent('OnUpdateCommand',$this,$param);
}
/**
- * Raises <b>ItemCreated</b> event.
+ * Raises <b>OnItemCreated</b> event.
* This method is invoked right after a datagrid item is created and before
* added to page hierarchy.
* @param TDataGridItemEventParameter event parameter
*/
public function onItemCreated($param)
{
- $this->raiseEvent('ItemCreated',$this,$param);
+ $this->raiseEvent('OnItemCreated',$this,$param);
}
/**
- * Raises <b>ItemDataBound</b> event.
+ * Raises <b>OnItemDataBound</b> event.
* This method is invoked for each datagrid item after it performs
* databinding.
* @param TDataGridItemEventParameter event parameter
*/
public function onItemDataBound($param)
{
- $this->raiseEvent('ItemDataBound',$this,$param);
+ $this->raiseEvent('OnItemDataBound',$this,$param);
}
/**
- * Raises <b>PageIndexChanged</b> event.
+ * Raises <b>OnPageIndexChanged</b> event.
* This method is invoked when current page is changed.
* @param TDataGridPageChangedEventParameter event parameter
*/
public function onPageIndexChanged($param)
{
- $this->raiseEvent('PageIndexChanged',$this,$param);
+ $this->raiseEvent('OnPageIndexChanged',$this,$param);
}
/**
diff --git a/framework/Web/UI/WebControls/TDataList.php b/framework/Web/UI/WebControls/TDataList.php
index 6f61f8ef..38045f77 100644
--- a/framework/Web/UI/WebControls/TDataList.php
+++ b/framework/Web/UI/WebControls/TDataList.php
@@ -71,20 +71,20 @@ Prado::using('System.Web.UI.WebControls.TRepeatInfo');
* The header and footer items can be accessed by {@link getHeader Header}
* and {@link getFooter Footer} properties, respectively.
*
- * When TDataList creates an item, it will raise an {@link onItemCreated ItemCreated}
+ * When TDataList creates an item, it will raise an {@link onItemCreated OnItemCreated}
* so that you may customize the newly created item.
* When databinding is performed by TDataList, for each item once it has finished
- * databinding, an {@link onItemDataBound ItemDataBound} event will be raised.
+ * databinding, an {@link onItemDataBound OnItemDataBound} event will be raised.
*
- * When an item is selected by an end-user, a {@link onSelectedIndexChanged SelectedIndexChanged}
+ * When an item is selected by an end-user, a {@link onSelectedIndexChanged OnSelectedIndexChanged}
* event will be raised. Note, the selected index may not be actually changed.
* The event mainly informs the server side that the end-user has made a selection.
*
- * TDataList raises an {@link onItemCommand ItemCommand} whenever a button control
+ * TDataList raises an {@link onItemCommand OnItemCommand} whenever a button control
* within some TDataList item raises a <b>Command</b> event. If the command name
* is one of the followings: 'edit', 'update', 'select', 'delete', 'cancel' (case-insensitive),
* another event will also be raised. For example, if the command name is 'edit',
- * then the new event is {@link onEditCommand SelectCommand}.
+ * then the new event is {@link onEditCommand OnSelectCommand}.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Revision: $ $Date: $
@@ -603,12 +603,12 @@ class TDataList extends TBaseDataList implements INamingContainer, IRepeatInfoUs
/**
* Handles <b>BubbleEvent</b>.
* This method overrides parent's implementation to handle
- * {@link onItemCommand ItemCommand} event which is bubbled from
+ * {@link onItemCommand OnItemCommand} event which is bubbled from
* {@link TDataListItem} child controls.
* If the event parameter is {@link TDataListCommandEventParameter} and
* the command name is a recognized one, which includes 'select', 'edit',
* 'delete', 'update', and 'cancel' (case-insensitive), then a
- * corresponding command event is also raised (such as {@link onEditCommand EditCommand}).
+ * corresponding command event is also raised (such as {@link onEditCommand OnEditCommand}).
* This method should only be used by control developers.
* @param TControl the sender of the event
* @param TEventParameter event parameter
@@ -652,7 +652,7 @@ class TDataList extends TBaseDataList implements INamingContainer, IRepeatInfoUs
/**
- * Raises <b>ItemCreated</b> event.
+ * Raises <b>OnItemCreated</b> event.
* This method is invoked after a data list item is created and instantiated with
* template, but before added to the page hierarchy.
* The {@link TDataListItem} control responsible for the event
@@ -663,11 +663,11 @@ class TDataList extends TBaseDataList implements INamingContainer, IRepeatInfoUs
*/
public function onItemCreated($param)
{
- $this->raiseEvent('ItemCreated',$this,$param);
+ $this->raiseEvent('OnItemCreated',$this,$param);
}
/**
- * Raises <b>ItemDataBound</b> event.
+ * Raises <b>OnItemDataBound</b> event.
* This method is invoked right after an item is data bound.
* The {@link TDataListItem} control responsible for the event
* can be determined from the event parameter.
@@ -677,62 +677,62 @@ class TDataList extends TBaseDataList implements INamingContainer, IRepeatInfoUs
*/
public function onItemDataBound($param)
{
- $this->raiseEvent('ItemDataBound',$this,$param);
+ $this->raiseEvent('OnItemDataBound',$this,$param);
}
/**
- * Raises <b>ItemCommand</b> event.
+ * Raises <b>OnItemCommand</b> event.
* This method is invoked when a child control of the data list
* raises an <b>Command</b> event.
* @param TDataListCommandEventParameter event parameter
*/
protected function onItemCommand($param)
{
- $this->raiseEvent('ItemCommand',$this,$param);
+ $this->raiseEvent('OnItemCommand',$this,$param);
}
/**
- * Raises <b>EditCommand</b> event.
+ * Raises <b>OnEditCommand</b> event.
* This method is invoked when a child control of the data list
* raises an <b>Command</b> event and the command name is 'edit' (case-insensitive).
* @param TDataListCommandEventParameter event parameter
*/
protected function onEditCommand($param)
{
- $this->raiseEvent('EditCommand',$this,$param);
+ $this->raiseEvent('OnEditCommand',$this,$param);
}
/**
- * Raises <b>DeleteCommand</b> event.
+ * Raises <b>OnDeleteCommand</b> event.
* This method is invoked when a child control of the data list
* raises an <b>Command</b> event and the command name is 'delete' (case-insensitive).
* @param TDataListCommandEventParameter event parameter
*/
protected function onDeleteCommand($param)
{
- $this->raiseEvent('DeleteCommand',$this,$param);
+ $this->raiseEvent('OnDeleteCommand',$this,$param);
}
/**
- * Raises <b>UpdateCommand</b> event.
+ * Raises <b>OnUpdateCommand</b> event.
* This method is invoked when a child control of the data list
* raises an <b>Command</b> event and the command name is 'update' (case-insensitive).
* @param TDataListCommandEventParameter event parameter
*/
protected function onUpdateCommand($param)
{
- $this->raiseEvent('UpdateCommand',$this,$param);
+ $this->raiseEvent('OnUpdateCommand',$this,$param);
}
/**
- * Raises <b>CancelCommand</b> event.
+ * Raises <b>OnCancelCommand</b> event.
* This method is invoked when a child control of the data list
* raises an <b>Command</b> event and the command name is 'cancel' (case-insensitive).
* @param TDataListCommandEventParameter event parameter
*/
protected function onCancelCommand($param)
{
- $this->raiseEvent('CancelCommand',$this,$param);
+ $this->raiseEvent('OnCancelCommand',$this,$param);
}
/**
diff --git a/framework/Web/UI/WebControls/TDataSourceControl.php b/framework/Web/UI/WebControls/TDataSourceControl.php
index eaf39199..51b06f9a 100644
--- a/framework/Web/UI/WebControls/TDataSourceControl.php
+++ b/framework/Web/UI/WebControls/TDataSourceControl.php
@@ -47,7 +47,7 @@ abstract class TDataSourceControl extends TControl implements IDataSource
public function onDataSourceChanged($param)
{
- $this->raiseEvent('DataSourceChanged',$this,$param);
+ $this->raiseEvent('OnDataSourceChanged',$this,$param);
}
public function focus()
diff --git a/framework/Web/UI/WebControls/TDataSourceView.php b/framework/Web/UI/WebControls/TDataSourceView.php
index ceed981f..ab79e74c 100644
--- a/framework/Web/UI/WebControls/TDataSourceView.php
+++ b/framework/Web/UI/WebControls/TDataSourceView.php
@@ -171,7 +171,7 @@ abstract class TDataSourceView extends TComponent
protected function onDataSourceViewChanged($param)
{
- $this->raiseEvent('DataSourceViewChanged',$this,$param);
+ $this->raiseEvent('OnDataSourceViewChanged',$this,$param);
}
}
diff --git a/framework/Web/UI/WebControls/TFileUpload.php b/framework/Web/UI/WebControls/TFileUpload.php
index ba47f4d9..4a3d3a08 100644
--- a/framework/Web/UI/WebControls/TFileUpload.php
+++ b/framework/Web/UI/WebControls/TFileUpload.php
@@ -23,7 +23,7 @@
* file size information. If the upload is not successful, {@link getErrorCode ErrorCode}
* contains the error code describing the cause of failure.
*
- * TFileUpload raises {@link onFileUpload FileUpload} event if a file is uploaded
+ * TFileUpload raises {@link onFileUpload OnFileUpload} event if a file is uploaded
* (whether it succeeds or not).
*
* @author Marcus Nyeholt <tanus@users.sourceforge.net>, Qiang Xue <qiang.xue@gmail.com>
@@ -224,14 +224,14 @@ class TFileUpload extends TWebControl implements IPostBackDataHandler, IValidata
/**
* This method is invoked when a file is uploaded during a postback.
- * The method raises <b>FileUpload</b> event to fire up the event handler.
+ * The method raises <b>OnFileUpload</b> event to fire up the event handler.
* If you override this method, be sure to call the parent implementation
* so that the event delegates can be invoked.
* @param TEventParameter event parameter to be passed to the event handlers
*/
protected function onFileUpload($param)
{
- $this->raiseEvent('FileUpload',$this,$param);
+ $this->raiseEvent('OnFileUpload',$this,$param);
}
/**
diff --git a/framework/Web/UI/WebControls/THiddenField.php b/framework/Web/UI/WebControls/THiddenField.php
index fe758c6b..7b112b0f 100644
--- a/framework/Web/UI/WebControls/THiddenField.php
+++ b/framework/Web/UI/WebControls/THiddenField.php
@@ -15,7 +15,7 @@
*
* THiddenField displays a hidden input field on a Web page.
* The value of the input field can be accessed via {@link getValue Value} property.
- * If upon postback the value is changed, a {@link onValueChanged ValueChanged}
+ * If upon postback the value is changed, a {@link onValueChanged OnValueChanged}
* event will be raised.
*
* @author Qiang Xue <qiang.xue@gmail.com>
@@ -94,14 +94,14 @@ class THiddenField extends TControl implements IPostBackDataHandler
/**
* This method is invoked when the value of the {@link getValue Value} property changes between posts to the server.
- * The method raises 'ValueChanged' event to fire up the event delegates.
+ * The method raises 'OnValueChanged' event to fire up the event delegates.
* If you override this method, be sure to call the parent implementation
* so that the attached event handlers can be invoked.
* @param TEventParameter event parameter to be passed to the event handlers
*/
public function onValueChanged($param)
{
- $this->raiseEvent('ValueChanged',$this,$param);
+ $this->raiseEvent('OnValueChanged',$this,$param);
}
/**
diff --git a/framework/Web/UI/WebControls/THyperLinkColumn.php b/framework/Web/UI/WebControls/THyperLinkColumn.php
index 34991845..6a14ea5b 100644
--- a/framework/Web/UI/WebControls/THyperLinkColumn.php
+++ b/framework/Web/UI/WebControls/THyperLinkColumn.php
@@ -176,7 +176,7 @@ class THyperLinkColumn extends TDataGridColumn
$link->setNavigateUrl($this->getNavigateUrl());
$link->setTarget($this->getTarget());
if($this->getDataTextField()!=='' || $this->getDataNavigateUrlField()!=='')
- $link->attachEventHandler('DataBinding',array($this,'dataBindColumn'));
+ $link->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
$cell->getControls()->add($link);
}
}
diff --git a/framework/Web/UI/WebControls/TImageButton.php b/framework/Web/UI/WebControls/TImageButton.php
index 7674cf56..dfa1752c 100644
--- a/framework/Web/UI/WebControls/TImageButton.php
+++ b/framework/Web/UI/WebControls/TImageButton.php
@@ -27,7 +27,7 @@ Prado::using('System.Web.UI.WebControls.TImage');
* associated with the button. This allows you to create multiple TLinkButton
* components on a Web page and programmatically determine which one is clicked
* with what parameter. You can provide an event handler for
- * {@link onCommand Command} event to programmatically control the actions performed
+ * {@link onCommand OnCommand} event to programmatically control the actions performed
* when the command button is clicked. In the event handler, you can determine
* the {@link setCommandName CommandName} property value and
* the {@link setCommandParameter CommandParameter} property value
@@ -38,9 +38,9 @@ Prado::using('System.Web.UI.WebControls.TImage');
* A <b>submit</b> button does not have a command name associated with the button
* and clicking on it simply posts the Web page back to the server.
* By default, a TImageButton control is a submit button.
- * You can provide an event handler for the {@link onClick Click} event
+ * You can provide an event handler for the {@link onClick OnClick} event
* to programmatically control the actions performed when the submit button is clicked.
- * The coordinates of the clicking point can be obtained from the {@link onClick Click}
+ * The coordinates of the clicking point can be obtained from the {@link onClick OnClick}
* event parameter, which is of type {@link TImageClickEventParameter}.
*
* Clicking on button can trigger form validation, if
@@ -147,26 +147,26 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven
/**
* This method is invoked when the button is clicked.
- * The method raises 'Click' event to fire up the event handlers.
+ * The method raises 'OnClick' 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.
* @param TImageClickEventParameter event parameter to be passed to the event handlers
*/
public function onClick($param)
{
- $this->raiseEvent('Click',$this,$param);
+ $this->raiseEvent('OnClick',$this,$param);
}
/**
* This method is invoked when the button is clicked.
- * The method raises 'Command' event to fire up the event handlers.
+ * The method raises 'OnCommand' event to fire up the event handlers.
* If you override this method, be sure to call the parent implementation
* so that the event handlers can be invoked.
* @param TCommandEventParameter event parameter to be passed to the event handlers
*/
public function onCommand($param)
{
- $this->raiseEvent('Command',$this,$param);
+ $this->raiseEvent('OnCommand',$this,$param);
$this->raiseBubbleEvent($this,$param);
}
@@ -175,7 +175,7 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven
* This method is required by {@link IPostBackEventHandler} interface.
* If {@link getCausesValidation CausesValidation} is true, it will
* invoke the page's {@link TPage::validate validate} method first.
- * It will raise {@link onClick Click} and {@link onCommand Command} events.
+ * It will raise {@link onClick OnClick} and {@link onCommand OnCommand} events.
* This method is mainly used by framework and control developers.
* @param TEventParameter the event parameter
*/
@@ -204,7 +204,7 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven
}
/**
- * @return string the command name associated with the {@link onCommand Command} event.
+ * @return string the command name associated with the {@link onCommand OnCommand} event.
*/
public function getCommandName()
{
@@ -212,7 +212,7 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven
}
/**
- * Sets the command name associated with the {@link onCommand Command} event.
+ * Sets the command name associated with the {@link onCommand OnCommand} event.
* @param string the text caption to be set
*/
public function setCommandName($value)
@@ -221,7 +221,7 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven
}
/**
- * @return string the parameter associated with the {@link onCommand Command} event
+ * @return string the parameter associated with the {@link onCommand OnCommand} event
*/
public function getCommandParameter()
{
@@ -229,7 +229,7 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven
}
/**
- * Sets the parameter associated with the {@link onCommand Command} event.
+ * Sets the parameter associated with the {@link onCommand OnCommand} event.
* @param string the text caption to be set
*/
public function setCommandParameter($value)
diff --git a/framework/Web/UI/WebControls/TLinkButton.php b/framework/Web/UI/WebControls/TLinkButton.php
index 113a3a69..c24119e5 100644
--- a/framework/Web/UI/WebControls/TLinkButton.php
+++ b/framework/Web/UI/WebControls/TLinkButton.php
@@ -24,7 +24,7 @@
* associated with the button. This allows you to create multiple TLinkButton
* components on a Web page and programmatically determine which one is clicked
* with what parameter. You can provide an event handler for
- * {@link onCommand Command} event to programmatically control the actions performed
+ * {@link onCommand OnCommand} event to programmatically control the actions performed
* when the command button is clicked. In the event handler, you can determine
* the {@link setCommandName CommandName} property value and
* the {@link setCommandParameter CommandParameter} property value
@@ -35,7 +35,7 @@
* A <b>submit</b> button does not have a command name associated with the button
* and clicking on it simply posts the Web page back to the server.
* By default, a TLinkButton component is a submit button.
- * You can provide an event handler for the {@link onClick Click} event
+ * You can provide an event handler for the {@link onClick OnClick} event
* to programmatically control the actions performed when the submit button is clicked.
*
* Clicking on button can trigger form validation, if
@@ -138,7 +138,7 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler
}
/**
- * @return string the command name associated with the {@link onCommand Command} event.
+ * @return string the command name associated with the {@link onCommand OnCommand} event.
*/
public function getCommandName()
{
@@ -146,7 +146,7 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler
}
/**
- * Sets the command name associated with the {@link onCommand Command} event.
+ * Sets the command name associated with the {@link onCommand OnCommand} event.
* @param string the text caption to be set
*/
public function setCommandName($value)
@@ -155,7 +155,7 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler
}
/**
- * @return string the parameter associated with the {@link onCommand Command} event
+ * @return string the parameter associated with the {@link onCommand OnCommand} event
*/
public function getCommandParameter()
{
@@ -163,7 +163,7 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler
}
/**
- * Sets the parameter associated with the {@link onCommand Command} event.
+ * Sets the parameter associated with the {@link onCommand OnCommand} event.
* @param string the text caption to be set
*/
public function setCommandParameter($value)
@@ -209,7 +209,7 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler
* This method is required by {@link IPostBackEventHandler} interface.
* If {@link getCausesValidation CausesValidation} is true, it will
* invoke the page's {@link TPage::validate validate} method first.
- * It will raise {@link onClick Click} and {@link onCommand Command} events.
+ * It will raise {@link onClick OnClick} and {@link onCommand OnCommand} events.
* This method is mainly used by framework and control developers.
* @param TEventParameter the event parameter
*/
@@ -223,26 +223,26 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler
/**
* This method is invoked when the button is clicked.
- * The method raises 'Click' event to fire up the event handlers.
+ * The method raises 'OnClick' 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.
* @param TEventParameter event parameter to be passed to the event handlers
*/
public function onClick($param)
{
- $this->raiseEvent('Click',$this,$param);
+ $this->raiseEvent('OnClick',$this,$param);
}
/**
* This method is invoked when the button is clicked.
- * The method raises 'Command' event to fire up the event handlers.
+ * The method raises 'OnCommand' event to fire up the event handlers.
* If you override this method, be sure to call the parent implementation
* so that the event handlers can be invoked.
* @param TCommandEventParameter event parameter to be passed to the event handlers
*/
public function onCommand($param)
{
- $this->raiseEvent('Command',$this,$param);
+ $this->raiseEvent('OnCommand',$this,$param);
$this->raiseBubbleEvent($this,$param);
}
}
diff --git a/framework/Web/UI/WebControls/TListControl.php b/framework/Web/UI/WebControls/TListControl.php
index d15a7bf1..38a43173 100644
--- a/framework/Web/UI/WebControls/TListControl.php
+++ b/framework/Web/UI/WebControls/TListControl.php
@@ -497,25 +497,25 @@ abstract class TListControl extends TDataBoundControl
}
/**
- * Raises SelectedIndexChanged event when selection is changed.
+ * Raises OnSelectedIndexChanged event when selection is changed.
* This method is invoked when the list control has its selection changed
* by end-users.
* @param TEventParameter event parameter
*/
public function onSelectedIndexChanged($param)
{
- $this->raiseEvent('SelectedIndexChanged',$this,$param);
+ $this->raiseEvent('OnSelectedIndexChanged',$this,$param);
}
/**
- * Raises TextChanged event when selection is changed.
+ * Raises OnTextChanged event when selection is changed.
* This method is invoked when the list control has its selection changed
* by end-users.
* @param TEventParameter event parameter
*/
public function onTextChanged($param)
{
- $this->raiseEvent('TextChanged',$this,$param);
+ $this->raiseEvent('OnTextChanged',$this,$param);
}
/**
diff --git a/framework/Web/UI/WebControls/TRadioButton.php b/framework/Web/UI/WebControls/TRadioButton.php
index d965b64f..ee53107a 100644
--- a/framework/Web/UI/WebControls/TRadioButton.php
+++ b/framework/Web/UI/WebControls/TRadioButton.php
@@ -29,10 +29,10 @@ Prado::using('System.Web.UI.WebControls.TRadioButtonList');
* property.
*
* To determine whether the TRadioButton component is checked, test the {@link getChecked Checked}
- * property. The {@link onCheckedChanged CheckedChanged} event is raised when
+ * property. The {@link onCheckedChanged OnCheckedChanged} event is raised when
* the {@link getChecked Checked} state of the TRadioButton component changes
* between posts to the server. You can provide an event handler for
- * the {@link onCheckedChanged CheckedChanged} event to to programmatically
+ * the {@link onCheckedChanged OnCheckedChanged} event to to programmatically
* control the actions performed when the state of the TRadioButton component changes
* between posts to the server.
*
diff --git a/framework/Web/UI/WebControls/TRepeater.php b/framework/Web/UI/WebControls/TRepeater.php
index a75fd63e..92d87b64 100644
--- a/framework/Web/UI/WebControls/TRepeater.php
+++ b/framework/Web/UI/WebControls/TRepeater.php
@@ -39,15 +39,15 @@ Prado::using('System.Web.UI.WebControls.TDataBoundControl');
* The header and footer items can be accessed by {@link getHeader Header}
* and {@link getFooter Footer} properties, respectively.
*
- * When TRepeater creates an item, it will raise an {@link onItemCreated ItemCreated}
+ * When TRepeater creates an item, it will raise an {@link onItemCreated OnItemCreated}
* so that you may customize the newly created item.
* When databinding is performed by TRepeater, for each item once it has finished
- * databinding, an {@link onItemDataBound ItemDataBound} event will be raised.
+ * databinding, an {@link onItemDataBound OnItemDataBound} event will be raised.
*
- * TRepeater raises an {@link onItemCommand ItemCommand} whenever a button control
+ * TRepeater raises an {@link onItemCommand OnItemCommand} whenever a button control
* within some repeater item raises a <b>Command</b> event. Therefore,
* you can handle all sorts of <b>Command</b> event in a central place by
- * writing an event handler for {@link onItemCommand ItemCommand}.
+ * writing an event handler for {@link onItemCommand OnItemCommand}.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Revision: $ $Date: $
@@ -415,7 +415,7 @@ class TRepeater extends TDataBoundControl implements INamingContainer
/**
* Handles <b>BubbleEvent</b>.
* This method overrides parent's implementation to handle
- * {@link onItemCommand ItemCommand} event which is bubbled from
+ * {@link onItemCommand OnItemCommand} event which is bubbled from
* {@link TRepeaterItem} child controls.
* This method should only be used by control developers.
* @param TControl the sender of the event
@@ -434,7 +434,7 @@ class TRepeater extends TDataBoundControl implements INamingContainer
}
/**
- * Raises <b>ItemCreated</b> event.
+ * Raises <b>OnItemCreated</b> event.
* This method is invoked after a repeater item is created and instantiated with
* template, but before added to the page hierarchy.
* The {@link TRepeaterItem} control responsible for the event
@@ -445,11 +445,11 @@ class TRepeater extends TDataBoundControl implements INamingContainer
*/
protected function onItemCreated($param)
{
- $this->raiseEvent('ItemCreated',$this,$param);
+ $this->raiseEvent('OnItemCreated',$this,$param);
}
/**
- * Raises <b>ItemDataBound</b> event.
+ * Raises <b>OnItemDataBound</b> event.
* This method is invoked right after an item is data bound.
* The {@link TRepeaterItem} control responsible for the event
* can be determined from the event parameter.
@@ -459,11 +459,11 @@ class TRepeater extends TDataBoundControl implements INamingContainer
*/
protected function onItemDataBound($param)
{
- $this->raiseEvent('ItemDataBound',$this,$param);
+ $this->raiseEvent('OnItemDataBound',$this,$param);
}
/**
- * Raises <b>ItemCommand</b> event.
+ * Raises <b>OnItemCommand</b> event.
* This method is invoked after a button control in
* a template raises <b>Command</b> event.
* The {@link TRepeaterItem} control responsible for the event
@@ -478,7 +478,7 @@ class TRepeater extends TDataBoundControl implements INamingContainer
*/
protected function onItemCommand($param)
{
- $this->raiseEvent('ItemCommand',$this,$param);
+ $this->raiseEvent('OnItemCommand',$this,$param);
}
}
diff --git a/framework/Web/UI/WebControls/TTextBox.php b/framework/Web/UI/WebControls/TTextBox.php
index 276982ac..12f90c7b 100644
--- a/framework/Web/UI/WebControls/TTextBox.php
+++ b/framework/Web/UI/WebControls/TTextBox.php
@@ -212,15 +212,16 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable
}
/**
+ * Raises <b>OnTextChanged</b> event.
* This method is invoked when the value of the {@link getText Text}
- * property changes on postback. The method raises <b>TextChanged</b> event.
+ * property changes on postback.
* If you override this method, be sure to call the parent implementation to ensure
* the invocation of the attached event handlers.
* @param TEventParameter event parameter to be passed to the event handlers
*/
protected function onTextChanged($param)
{
- $this->raiseEvent('TextChanged',$this,$param);
+ $this->raiseEvent('OnTextChanged',$this,$param);
}
/**
diff --git a/tests/UnitTests/framework/Web/UI/utControl.php b/tests/UnitTests/framework/Web/UI/utControl.php
index b96ef644..ed2ddd22 100644
--- a/tests/UnitTests/framework/Web/UI/utControl.php
+++ b/tests/UnitTests/framework/Web/UI/utControl.php
@@ -349,7 +349,7 @@ class utControl extends UnitTestCase
$this->button1->getEventHandlers('OnClick')->clear();
try
{
- $this->button1->attachEventHandler('Click','clicked');
+ $this->button1->attachEventHandler('OnClick','clicked');
$this->fail('no exception raised when undefined event is raised');
}
catch(TInvalidOperationException $e)
diff --git a/tests/UnitTests/framework/utComponent.php b/tests/UnitTests/framework/utComponent.php
index 32aa9ff3..98466b31 100644
--- a/tests/UnitTests/framework/utComponent.php
+++ b/tests/UnitTests/framework/utComponent.php
@@ -30,7 +30,7 @@ class NewComponent extends TComponent
public function onMyEvent($param)
{
- $this->raiseEvent('MyEvent',$this,$param);
+ $this->raiseEvent('OnMyEvent',$this,$param);
}
public function myEventHandler($sender,$param)
@@ -123,23 +123,23 @@ class utComponent extends UnitTestCase
public function testHasEvent()
{
- $this->assertTrue($this->component->hasEvent('MyEvent'));
- $this->assertTrue($this->component->hasEvent('myevent'));
- $this->assertFalse($this->component->hasEvent('YourEvent'));
+ $this->assertTrue($this->component->hasEvent('OnMyEvent'));
+ $this->assertTrue($this->component->hasEvent('onmyevent'));
+ $this->assertFalse($this->component->hasEvent('onYourEvent'));
}
public function testHasEventHandler()
{
- $this->assertFalse($this->component->hasEventHandler('MyEvent'));
- $this->component->attachEventHandler('MyEvent','foo');
- $this->assertTrue($this->component->hasEventHandler('MyEvent'));
+ $this->assertFalse($this->component->hasEventHandler('OnMyEvent'));
+ $this->component->attachEventHandler('OnMyEvent','foo');
+ $this->assertTrue($this->component->hasEventHandler('OnMyEvent'));
}
public function testGetEventHandlers()
{
- $list=$this->component->getEventHandlers('MyEvent');
+ $list=$this->component->getEventHandlers('OnMyEvent');
$this->assertTrue(($list instanceof TList) && ($list->getCount()===0));
- $this->component->attachEventHandler('MyEvent','foo');
+ $this->component->attachEventHandler('OnMyEvent','foo');
$this->assertTrue(($list instanceof TList) && ($list->getCount()===1));
try
{
@@ -154,7 +154,7 @@ class utComponent extends UnitTestCase
public function testAttachEventHandler()
{
- $this->component->attachEventHandler('MyEvent','foo');
+ $this->component->attachEventHandler('OnMyEvent','foo');
$this->assertTrue($this->component->getEventHandlers('MyEvent')->getCount()===1);
try
{
@@ -179,13 +179,13 @@ class utComponent extends UnitTestCase
public function testRaiseEvent()
{
- $this->component->attachEventHandler('MyEvent',array($this->component,'myEventHandler'));
+ $this->component->attachEventHandler('OnMyEvent',array($this->component,'myEventHandler'));
$this->assertFalse($this->component->isEventHandled());
- $this->component->raiseEvent('MyEvent',$this,null);
+ $this->component->raiseEvent('OnMyEvent',$this,null);
$this->assertTrue($this->component->isEventHandled());
- $this->component->attachEventHandler('MyEvent',array($this->component,'Object.myEventHandler'));
+ $this->component->attachEventHandler('OnMyEvent',array($this->component,'Object.myEventHandler'));
$this->assertFalse($this->component->Object->isEventHandled());
- $this->component->raiseEvent('MyEvent',$this,null);
+ $this->component->raiseEvent('OnMyEvent',$this,null);
$this->assertTrue($this->component->Object->isEventHandled());
}