New Posts New Posts RSS Feed: CABANA with EF
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

CABANA with EF

 Post Reply Post Reply
Author
-ZI- View Drop Down
Newbie
Newbie
Avatar

Joined: 17-Mar-2008
Posts: 3
Post Options Post Options   Quote -ZI- Quote  Post ReplyReply Direct Link To This Post Topic: CABANA with EF
    Posted: 19-May-2008 at 1:56pm
I am in process of porting CABANA to work with DevForce EF. I am running into some issues and looking for some help. In my example code, I am using a SearchSummaryDetail page. All the three views (Search, Summary, and Detail with tabs) seem to work fine if only one of these views are loaded by controller. But as soon as I add more than one views (any combination), I get an exception "Datasource or BoundType must be set before adding bindings with this signature."
 
So for example, if I display just the search and gridview section, it works fine. When I add Summary View, it starts breaking. If I keep the summary view and comment out the gridbuilder code where it adds columns, it still works fine. Search still pulls results (with an empty grid of course) but I can navigate through the result set and see the records changing in summary view. Similarly if keep the summary view and add a detail view (while keeping the gridbuilder add columns section commented), it again starts breaking with same error message. Debugging and stepping through the code, it appears that whichever view gets first turn succeeds adding itself but subsequent views throw exceptions of datasource not being there.
 
I have a similar prototype working with cabana and IdeaBlade's classic persistence. The page controller code/logic and overrides etc are  pretty much same in both prototypes. Any ideas what could be wrong. Is it the new EntityManager that manages thing differently than the classic one. Any tips that can help. 
Back to Top
-ZI- View Drop Down
Newbie
Newbie
Avatar

Joined: 17-Mar-2008
Posts: 3
Post Options Post Options   Quote -ZI- Quote  Post ReplyReply Direct Link To This Post Posted: 20-May-2008 at 12:23pm
I have done some more debugging and found out the exact line of code where it breaks (bold red line below). This code snippet is from ControlViewPresenter.cs. I can not step in more than this since mBindingManager is of type IdeaBlase.UI.WinForms.ControlBindingManager. source is not null in this case.

private void SetBindingManagerBindingSource() {

BindingSource source = ViewContext.BindingSource;

Guard.ArgumentNotNull(source, "ViewContext.BindingSource");

mBindingManager.BindingSource = source;

IsBindingSourceReady = true; // presumptively so if set.

PlayDelayedCommandsQueue(); }

 
The exception I get is

"Object reference not set to an instance of an object."

I have done debugging with various combinations of views and got similar results.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down