summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxue <>2006-01-21 06:06:03 +0000
committerxue <>2006-01-21 06:06:03 +0000
commitdc4c82056f3c600267e75e1bb84869124870988f (patch)
tree0786c27c43fc602e3ac191d2d083a84bf32fb53c
parent7de06fe5ac3e9f2417e317fe8754cdf09574ccfb (diff)
Added description for the rest simple HTML controls in the quickstart demo.
-rw-r--r--demos/quickstart/protected/pages/Controls/Simple.page19
-rw-r--r--framework/Web/UI/WebControls/TImageButton.php2
-rw-r--r--framework/Web/UI/WebControls/TLinkButton.php26
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 <tt>CausesValidation</tt>is t
<com:RunBar PagePath="Controls.Samples.TButton.Home" />
<h2>TLinkButton</h2>
+<p>
+<tt>TLinkButton</tt> is similar to <tt>TButton</tt> in every aspect except that <tt>TLinkButton</tt> is displayed as a hyperlink. The link text is determined by its <tt>Text</tt> property. If the <tt>Text</tt> property is empty, then the body content of the button is displayed (therefore, you can enclose a &lt;img;&gt; tag within the button body and get an image button.
+</p>
+<com:RunBar PagePath="Controls.Samples.TLinkButton.Home" />
<h2>TImageButton</h2>
+<p>
+<tt>TImageButton</tt> is also similar to <tt>TButton</tt>, except that <tt>TImageButton</tt> displays the button as an image. The image is specified via <tt>ImageUrl</tt>, and the alternate text is specified by <tt>Text</tt>. 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 <tt>Click</tt> event (not <tt>Command</tt>).
+</p>
+<com:RunBar PagePath="Controls.Samples.TImageButton.Home" />
<h2>TCheckBox</h2>
+<p>
+<tt>TCheckBox</tt> displays a check box on a Web page. A caption can be specified via <tt>Text</tt> and displayed beside the check box. It can appear either on the right or left of the check box, which is determined by <tt>TextAlign</tt>. You may further specify attributes applied to the text by using <tt>LabelAttributes</tt>.
+</p>
+<p>
+To determine whether the check box is checked, test the <tt>Checked</tt> property. A <tt>CheckedChanged</tt> event is raised if the state of <tt>Checked</tt> is changed between posts to the server. If <tt>AutoPostBack</tt> is true, changing the check box state will cause postback action. And if <tt>CausesValidation</tt> is also true, upon postback validation will be performed for validators within the specified <tt>ValidationGroup</tt>.
+</p>
+<com:RunBar PagePath="Controls.Samples.TCheckBox.Home" />
<h2>TRadioButton</h2>
+<p>
+<tt>TRadioButton</tt> is similar to <tt>TCheckBox</tt> in every aspect, except that <tt>TRadioButton</tt> displays a radio button on a Web page. The radio button can belong to a specific group specified by <tt>GroupName</tt> such that only one radio button within that group can be selected at most.
+</p>
+<com:RunBar PagePath="Controls.Samples.TRadioButton.Home" />
</com:TContent> \ 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;
}
@@ -176,22 +172,6 @@ class TLinkButton extends TWebControl implements IPostBackEventHandler
}
/**
- * @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
*/
public function getCausesValidation()