From dc4c82056f3c600267e75e1bb84869124870988f Mon Sep 17 00:00:00 2001
From: xue <>
Date: Sat, 21 Jan 2006 06:06:03 +0000
Subject: Added description for the rest simple HTML controls in the quickstart
demo.
---
.../protected/pages/Controls/Simple.page | 19 ++++++++++++++++
framework/Web/UI/WebControls/TImageButton.php | 2 --
framework/Web/UI/WebControls/TLinkButton.php | 26 +++-------------------
3 files changed, 22 insertions(+), 25 deletions(-)
diff --git a/demos/quickstart/protected/pages/Controls/Simple.page b/demos/quickstart/protected/pages/Controls/Simple.page
index a244429d..874d274c 100644
--- a/demos/quickstart/protected/pages/Controls/Simple.page
+++ b/demos/quickstart/protected/pages/Controls/Simple.page
@@ -48,11 +48,30 @@ Clicking on button can trigger form validation, if CausesValidationis t
TLinkButton
+
+TLinkButton is similar to TButton in every aspect except that TLinkButton is displayed as a hyperlink. The link text is determined by its Text property. If the Text property is empty, then the body content of the button is displayed (therefore, you can enclose a <img;> tag within the button body and get an image button.
+
+
TImageButton
+
+TImageButton is also similar to TButton, except that TImageButton displays the button as an image. The image is specified via ImageUrl, and the alternate text is specified by Text. In addition, it is possible to obtain the coordinate of the point where the image is clicked. The coordinate information is contained in the event parameter of the Click event (not Command).
+
+
TCheckBox
+
+TCheckBox displays a check box on a Web page. A caption can be specified via Text and displayed beside the check box. It can appear either on the right or left of the check box, which is determined by TextAlign. You may further specify attributes applied to the text by using LabelAttributes.
+
+
+To determine whether the check box is checked, test the Checked property. A CheckedChanged event is raised if the state of Checked is changed between posts to the server. If AutoPostBack is true, changing the check box state will cause postback action. And if CausesValidation is also true, upon postback validation will be performed for validators within the specified ValidationGroup.
+
+
TRadioButton
+
+TRadioButton is similar to TCheckBox in every aspect, except that TRadioButton displays a radio button on a Web page. The radio button can belong to a specific group specified by GroupName such that only one radio button within that group can be selected at most.
+
+
\ No newline at end of file
diff --git a/framework/Web/UI/WebControls/TImageButton.php b/framework/Web/UI/WebControls/TImageButton.php
index b8e14717..7674cf56 100644
--- a/framework/Web/UI/WebControls/TImageButton.php
+++ b/framework/Web/UI/WebControls/TImageButton.php
@@ -48,8 +48,6 @@ Prado::using('System.Web.UI.WebControls.TImage');
* 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.
*
* TImageButton displays the {@link setText Text} property as the hint text to the displayed image.
*
diff --git a/framework/Web/UI/WebControls/TLinkButton.php b/framework/Web/UI/WebControls/TLinkButton.php
index b8d1ccaa..113a3a69 100644
--- a/framework/Web/UI/WebControls/TLinkButton.php
+++ b/framework/Web/UI/WebControls/TLinkButton.php
@@ -43,8 +43,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.
*
* TLinkButton will display the {@link setText Text} property value
* as the hyperlink text. If {@link setText Text} is empty, the body content
@@ -84,10 +82,9 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler
if($this->getEnabled(true))
{
- $url = $this->getPostBackUrl();
//create unique no-op url references
$nop = "#".$this->getClientID();
- $writer->addAttribute('href', $url ? $url : $nop);
+ $writer->addAttribute('href', $nop);
$this->getPage()->getClientScript()->registerPostBackControl($this);
}
else if($this->getEnabled()) // in this case, parent will not render 'disabled'
@@ -103,10 +100,9 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler
{
$options['EventTarget'] = $this->getUniqueID();
$options['CausesValidation'] = $this->getCausesValidation();
- $options['ValidationGroup'] = $this->getValidationGroup();
- $options['PostBackUrl'] = $this->getPostBackUrl();
+ $options['ValidationGroup'] = $this->getValidationGroup();
$options['StopEvent'] = true;
-
+
return $options;
}
@@ -175,22 +171,6 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler
$this->setViewState('CommandParameter',$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,'');
- }
-
/**
* @return boolean whether postback event trigger by this button will cause input validation
*/
--
cgit v1.2.3