From de202dd78ffe637e733485a12b108943bb538559 Mon Sep 17 00:00:00 2001 From: Marek Habersack Date: Tue, 29 Jul 2008 11:47:00 +0000 Subject: [PATCH] Backport of r109147 svn path=/branches/mono-2-0/xsp/; revision=109149 --- ChangeLog | 12 ++++++++++++ test/1.1/webcontrols/dbpage1.aspx | 15 ++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ac350a2c..a2ea9bea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2008-07-29 Marek Habersack + + * test/1.1/webcontrols/dbpage1.aspx: do not rely on the + OnTextChanged to fire the Filter_Changed handler method. Doing + that makes the sample miss situations when the user clicks Submit + several times in a row without changing the filters - the result + of this is that no table is show in the output. Filter_Changed is + fired as the OnClick handler of the Submit button. Fixes bug + #381972. + Should the filter fail to return any results, an appropriate + information is shown. + 2008-07-14 Marek Habersack * src/Mono.WebServer.Apache/ModMonoRequest.cs: fill the buffer diff --git a/test/1.1/webcontrols/dbpage1.aspx b/test/1.1/webcontrols/dbpage1.aspx index d0ebd89a..5675b1f0 100644 --- a/test/1.1/webcontrols/dbpage1.aspx +++ b/test/1.1/webcontrols/dbpage1.aspx @@ -117,6 +117,7 @@ "email like '" + filterMail + "'"; selectCommand.CommandText = selectCmd; + int rowCount = 0; try { reader = selectCommand.ExecuteReader (); while (reader.Read ()) { @@ -127,6 +128,14 @@ row.Cells.Add (cell); } myTable.Rows.Add (row); + rowCount++; + } + if (rowCount == 0) { + TableRow row = new TableRow (); + TableCell cell = new TableCell (); + cell.Controls.Add (new LiteralControl ("No results returned from query.")); + row.Cells.Add (cell); + myTable.Rows.Add (row); } } catch (Exception exc) { ShowError (exc); @@ -161,12 +170,12 @@ CREATE TABLE "test" ( Choose the SQL filters and click 'Submit'.

- +

- +

- +