eyal
unread,Feb 9, 2009, 5:57:20 PM2/9/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Castle Project Users
Hi All
I encountered an error that is generated on Monorail library class
BaseHttpHandler.cs
I have a View that loads a list of db records that used to work now it
goes directly to generalerror page.
I disabled the generalerror.vm to trap the actual error. This is what
I found. The error below refers to this pagination line (81) in my
view:
Showing $items.FirstItem - $items.LastItem of $items.TotalItems
The error message is:
ex = {"Invocation of method 'LastItem' in
Castle.Components.Pagination.GenericPage`1[[SN.Models.Item, SN,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], template items
\\list.vm Line 81 Column 41 threw an exception"}
Any idea why this is happening?
Thank you
Eyal
The error occurs exactly here
Code:
BaseHttpHandler.cs
public virtual void Process(HttpContext context)
{ ...
catch(Exception ex) { ...
{ throw new MonoRailException("Error processing
MonoRail request. Action " +
controllerContext.Action + "
on controller " + controllerContext.Name, ex);
}
Here is my code for the Pagination
Code:
PropertyBag["items"] =
PaginationHelper.CreatePagination<Item>(
this.Context,
Item.FindItemsByAccountId(AcctId), // list
15 // number of items per page
);