summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknut <>2008-08-18 23:22:07 +0000
committerknut <>2008-08-18 23:22:07 +0000
commit8047f7b1482f10690836d8cf553c151e3bf993da (patch)
tree2d7246de69017c34c9bbe48ee15d14da94842cdb
parentb26ef59b9ffbc9b8dfa15b6456fd0071474b9608 (diff)
fixed #823
-rw-r--r--.gitattributes2
-rw-r--r--HISTORY1
-rw-r--r--framework/Web/UI/WebControls/TListControl.php8
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket823.page5
-rw-r--r--tests/FunctionalTests/tickets/tests/Ticket823TestCase.php13
5 files changed, 25 insertions, 4 deletions
diff --git a/.gitattributes b/.gitattributes
index ba36f9df..dd98e463 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -3083,6 +3083,7 @@ tests/FunctionalTests/tickets/protected/pages/Ticket722.page -text
tests/FunctionalTests/tickets/protected/pages/Ticket745.page -text
tests/FunctionalTests/tickets/protected/pages/Ticket769.page -text
tests/FunctionalTests/tickets/protected/pages/Ticket785.page -text
+tests/FunctionalTests/tickets/protected/pages/Ticket823.page -text
tests/FunctionalTests/tickets/protected/pages/Ticket828.page -text
tests/FunctionalTests/tickets/protected/pages/Ticket849.page -text
tests/FunctionalTests/tickets/protected/pages/Ticket876.page -text
@@ -3154,6 +3155,7 @@ tests/FunctionalTests/tickets/tests/Ticket703TestCase.php -text
tests/FunctionalTests/tickets/tests/Ticket708TestCase.php -text
tests/FunctionalTests/tickets/tests/Ticket72TestCase.php -text
tests/FunctionalTests/tickets/tests/Ticket769TestCase.php -text
+tests/FunctionalTests/tickets/tests/Ticket823TestCase.php -text
tests/FunctionalTests/tickets/tests/Ticket876TestCase.php -text
tests/FunctionalTests/tickets/tests/Ticket886TestCase.php -text
tests/FunctionalTests/tickets/tests/Ticket897TestCase.php -text
diff --git a/HISTORY b/HISTORY
index e28a637b..7c515716 100644
--- a/HISTORY
+++ b/HISTORY
@@ -19,6 +19,7 @@ BUG: Ticket#904 - TDbConnection: Add emulate prepares workaround for boolean com
BUG: Ticket#908 - TDbCache::init / Exception (Knut)
ENH: Added Prado.Validation.validateControl(id) on client side to validate a specific control (Michael)
ENH: Added MessageSource_Database to I18N (uses TDbConnection) (Michael)
+ENH: Ticket#823 - PromptText/PromptValue only populated if there is data (Knut)
ENH: Ticket#876 - Assign empty string to CssUrl on TTabPanel to avoid loading extra css (GoDZilla, Knut)
ENH: Ticket#890 - Minor optimization: Use $var===null over is_null($var) (Knut)
ENH: Ticket#893 - Added page parameter to queryForPagedList() to specify the initial page to load (Michael)
diff --git a/framework/Web/UI/WebControls/TListControl.php b/framework/Web/UI/WebControls/TListControl.php
index c02f890b..84c23f88 100644
--- a/framework/Web/UI/WebControls/TListControl.php
+++ b/framework/Web/UI/WebControls/TListControl.php
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2008 PradoSoft
+ * @copyright Copyright &copy; 2005-2008 PradoSoft
* @license http://www.pradosoft.com/license/
* @version $Id$
* @package System.Web.UI.WebControls
@@ -792,11 +792,11 @@ abstract class TListControl extends TDataBoundControl implements IDataRenderer
*/
public function renderContents($writer)
{
+ $this->renderPrompt($writer);
+
if($this->_items)
{
$writer->writeLine();
- if($this->_items->getCount())
- $this->renderPrompt($writer);
$previousGroup=null;
foreach($this->_items as $item)
{
@@ -1067,4 +1067,4 @@ interface IListControlAdapter
}
-?>
+?>
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket823.page b/tests/FunctionalTests/tickets/protected/pages/Ticket823.page
new file mode 100644
index 00000000..8da83c65
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket823.page
@@ -0,0 +1,5 @@
+<com:TContent ID="Content">
+
+ <com:TDropDownList ID="DropDownList" PromptText="Choose..."/>
+
+</com:TContent>
diff --git a/tests/FunctionalTests/tickets/tests/Ticket823TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket823TestCase.php
new file mode 100644
index 00000000..c42990de
--- /dev/null
+++ b/tests/FunctionalTests/tickets/tests/Ticket823TestCase.php
@@ -0,0 +1,13 @@
+<?php
+
+class Ticket823TestCase extends SeleniumTestCase {
+
+ public function test() {
+ $this->open('tickets/index.php?page=Ticket823');
+ $this->assertTitle("Verifying Ticket 823");
+ $base = 'ctl0_Content_';
+ $this->assertElementPresent('xpath=//option[@value="Choose..."]');
+ }
+}
+
+?>