Author: husted
Date: Tue Sep 13 14:36:10 2005
New Revision: 280675
URL: http://svn.apache.org/viewcvs?rev=280675&view=rev
Log:
OVR-21
* Correct paging.
Modified:
struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/Lister2.ascx
struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/Lister2.ascx.cs
struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory2.aspx.cs
Modified: struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/Lister2.ascx
URL:
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/Lister2.ascx?rev=280675&r1=280674&r2=280675&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/Lister2.ascx
(original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/Lister2.ascx Tue Sep
13 14:36:10 2005
@@ -1,5 +1,6 @@
<%@ Control Language="c#" AutoEventWireup="false" Codebehind="Lister2.ascx.cs"
Inherits="PhoneBook.Web.Controls.Lister2"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
-<asp:DataGrid id="list" Runat="server" AutoGenerateColumns=False>
+<asp:DataGrid id="list" Runat="server" AutoGenerateColumns=False
+ PageSize="2" AllowPaging="true" PagerStyle-Mode="NumericPages">
<HeaderStyle CssClass="HeaderStyle" BackColor="#CCCC99"></HeaderStyle>
<AlternatingItemStyle CssClass="AlternatingItemStyle"
BackColor="#CCCC99"></AlternatingItemStyle>
</asp:DataGrid>
Modified: struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/Lister2.ascx.cs
URL:
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/Lister2.ascx.cs?rev=280675&r1=280674&r2=280675&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/Lister2.ascx.cs
(original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/Lister2.ascx.cs Tue
Sep 13 14:36:10 2005
@@ -14,7 +14,6 @@
public void Open(IDictionary criteria)
{
- // list_ResetIndex(); -- what about saving the criteria?
IViewHelper helper = ReadExecute(App.ENTRY_LIST,
criteria);
bool ok = helper.IsNominal;
if (!ok) Page_Error = helper;
@@ -24,6 +23,12 @@
list.DataSource = result;
list.DataBind();
}
+ }
+
+ public void Reset(IDictionary criteria)
+ {
+ list_ResetIndex();
+ Open(criteria);
}
private static string LABEL = "_label";
Modified: struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory2.aspx.cs
URL:
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory2.aspx.cs?rev=280675&r1=280674&r2=280675&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory2.aspx.cs
(original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory2.aspx.cs Tue
Sep 13 14:36:10 2005
@@ -125,7 +125,7 @@
{
ViewArgs a = e as ViewArgs;
IViewHelper helper = a.Helper;
- lister.Open(helper.Criteria);
+ lister.Reset(helper.Criteria);
}
#endregion
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]