Permalink
Browse files

Backport of r109147

svn path=/branches/mono-2-0/xsp/; revision=109149
  • Loading branch information...
grendello committed Jul 29, 2008
1 parent bcaebd2 commit de202dd78ffe637e733485a12b108943bb538559
Showing with 24 additions and 3 deletions.
  1. +12 −0 ChangeLog
  2. +12 −3 test/1.1/webcontrols/dbpage1.aspx
View
@@ -1,3 +1,15 @@
+2008-07-29 Marek Habersack <mhabersack@novell.com>
+
+ * 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 <mhabersack@novell.com>
* src/Mono.WebServer.Apache/ModMonoRequest.cs: fill the buffer
@@ -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'.
<p>
<asp:Label runat="server" Text="Person Filter: "/>
-<asp:TextBox id="PersonFilter" Text="" TextMode="singleLine" OnTextChanged="Filter_Changed" runat="server" maxlength="40" />
+<asp:TextBox id="PersonFilter" Text="" TextMode="singleLine" runat="server" maxlength="40" />
<p>
<asp:Label runat="server" Text="Mail Filter: " />
-<asp:TextBox id="MailFilter" Text="" TextMode="singleLine" OnTextChanged="Filter_Changed" runat="server" maxlength="40" />
+<asp:TextBox id="MailFilter" Text="" TextMode="singleLine" runat="server" maxlength="40" />
<p>
-<asp:Button id="btn" runat="server" Text="Submit" />
+<asp:Button id="btn" runat="server" Text="Submit" OnClick="Filter_Changed" />
<p>
<asp:Table id="myTable" HorizontalAlign="Left" Font-Size="12pt" GridLines="both"
CellPadding="5" runat="server"/>

0 comments on commit de202dd

Please sign in to comment.