Skip to content
This repository has been archived by the owner on Nov 19, 2022. It is now read-only.

Commit

Permalink
Backport of r109147
Browse files Browse the repository at this point in the history
svn path=/branches/mono-2-0/xsp/; revision=109149
  • Loading branch information
grendello committed Jul 29, 2008
1 parent bcaebd2 commit de202dd
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
12 changes: 12 additions & 0 deletions ChangeLog
@@ -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
Expand Down
15 changes: 12 additions & 3 deletions test/1.1/webcontrols/dbpage1.aspx
Expand Up @@ -117,6 +117,7 @@
"email like '" + filterMail + "'";
selectCommand.CommandText = selectCmd;
int rowCount = 0;
try {
reader = selectCommand.ExecuteReader ();
while (reader.Read ()) {
Expand All @@ -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);
Expand Down Expand Up @@ -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"/>
Expand Down

0 comments on commit de202dd

Please sign in to comment.