diff options
author | xue <> | 2006-01-21 04:10:28 +0000 |
---|---|---|
committer | xue <> | 2006-01-21 04:10:28 +0000 |
commit | 7de06fe5ac3e9f2417e317fe8754cdf09574ccfb (patch) | |
tree | 5760d4f2e6edfa8de13a3b84afb5842a2c53beb1 | |
parent | 1540d094408633a6b01b333b193e731a75457c17 (diff) |
Removed UseSubmitBehavior and PostBackUrl properties from TButton. TButton demo completed.
-rw-r--r-- | demos/quickstart/protected/pages/Controls/Samples/TButton/Home.page | 18 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TButton.php | 40 |
2 files changed, 2 insertions, 56 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TButton/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TButton/Home.page index b2fe4c6c..7c5b90b4 100644 --- a/demos/quickstart/protected/pages/Controls/Samples/TButton/Home.page +++ b/demos/quickstart/protected/pages/Controls/Samples/TButton/Home.page @@ -46,24 +46,6 @@ A button causing validation: <com:TButton Text="submit" ValidationGroup="Group" />
</td></tr>
-<tr><td class="samplenote">
-UseSubmitBehavior
-</td><td class="sampleaction">
-<com:TButton
- Text="click me"
- UseSubmitBehavior="false"
- Click="buttonClicked" />
-</td></tr>
-
-<tr><td class="samplenote">
-PostBackUrl
-</td><td class="sampleaction">
-<com:TButton
- Text="click me"
- PostBackUrl="/" />
-</td></tr>
-
-
</table>
</com:TContent>
\ No newline at end of file diff --git a/framework/Web/UI/WebControls/TButton.php b/framework/Web/UI/WebControls/TButton.php index 85473349..02f35389 100644 --- a/framework/Web/UI/WebControls/TButton.php +++ b/framework/Web/UI/WebControls/TButton.php @@ -41,8 +41,6 @@ * And the validation may be restricted within a certain group of validator
* controls by setting {@link setValidationGroup ValidationGroup} property.
* If validation is successful, the data will be post back to the same page.
- * You can change the postback target by setting the {@link setPostBackUrl PostBackUrl}
- * property.
*
* TButton displays the {@link setText Text} property as the button caption.
*
@@ -70,7 +68,7 @@ class TButton extends TWebControl implements IPostBackEventHandler {
$page=$this->getPage();
$page->ensureRenderInForm($this);
- $writer->addAttribute('type',$this->getUseSubmitBehavior()?'submit':'button');
+ $writer->addAttribute('type','submit');
if(($uniqueID=$this->getUniqueID())!=='')
$writer->addAttribute('name',$uniqueID);
$writer->addAttribute('value',$this->getText());
@@ -87,7 +85,7 @@ class TButton extends TWebControl implements IPostBackEventHandler }
/**
- * @return boolean true if validators are active and can cause validation.
+ * @return boolean whether to perform validation if the button is clicked
*/
protected function canCauseValidation()
{
@@ -105,8 +103,6 @@ class TButton extends TWebControl implements IPostBackEventHandler {
$options['CausesValidation'] = $this->getCausesValidation();
$options['ValidationGroup'] = $this->getValidationGroup();
- $options['PostBackUrl'] = $this->getPostBackUrl();
- $options['ClientSubmit'] = !$this->getUseSubmitBehavior();
return $options;
}
@@ -229,22 +225,6 @@ class TButton extends TWebControl implements IPostBackEventHandler }
/**
- * @return boolean whether to use the button as a submit button, default is true.
- */
- public function getUseSubmitBehavior()
- {
- return $this->getViewState('UseSubmitBehavior',true);
- }
-
- /**
- * @param boolean whether to use the button as a submit button
- */
- public function setUseSubmitBehavior($value)
- {
- $this->setViewState('UseSubmitBehavior',TPropertyValue::ensureBoolean($value),true);
- }
-
- /**
* @return string the group of validators which the button causes validation upon postback
*/
public function getValidationGroup()
@@ -259,22 +239,6 @@ class TButton extends TWebControl implements IPostBackEventHandler {
$this->setViewState('ValidationGroup',$value,'');
}
-
- /**
- * @return string the URL of the page to post to when the button is clicked, default is empty meaning post to the current page itself
- */
- public function getPostBackUrl()
- {
- return $this->getViewState('PostBackUrl','');
- }
-
- /**
- * @param string the URL of the page to post to from the current page when the button is clicked, empty if post to the current page itself
- */
- public function setPostBackUrl($value)
- {
- $this->setViewState('PostBackUrl',$value,'');
- }
}
?>
\ No newline at end of file |