New Posts New Posts RSS Feed: [COMPLETED] Widget View Template
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

[COMPLETED] Widget View Template

 Post Reply Post Reply Page  <1234>
Author
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Topic: [COMPLETED] Widget View Template
    Posted: 24-Sep-2007 at 5:19pm
Just in case anyone can help, here is the error that I get when attempting to open the ContactsView.cs in Design view:
 
X One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes.

Could not load type 'IdeaBlade.Cab.UI.Views.ControlViewWithToolbarHelper' from assembly 'IdeaBlade.Cab.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

Hide    

at IdeaBlade.Cab.DotNet.DotNetControlViewWithToolbar..ctor()
 
I did try the normal rebuild/debugging routines.  The one thing that I did not try was the close/reopen VS thingy.  I will try that and let you know if that worked.  There has been issues in the past where VS didn't renew its cache or something.  Stand by.


Edited by Linguinut - 24-Sep-2007 at 5:21pm
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 24-Sep-2007 at 4:22pm

Soooo close.

I was going to paste an image here, but the forum has blocked me from uploading.  It states that I do not have sufficient privileges.  Oh, well.
 
What I have gotten is my view loads in the tab detail area of the SearchMasterDetail page.  I can see the binding navigator in full living color!!  Now, I just need to get my designer to quit hollering at me about the helper class.  I'll post more here shortly once I figure out why this class is not getting called properly from the designer.  And, I can get my data to show up.
 
Almost there.
Back to Top
Bill Jensen View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Jul-2007
Location: United States
Posts: 229
Post Options Post Options   Quote Bill Jensen Quote  Post ReplyReply Direct Link To This Post Posted: 24-Sep-2007 at 3:38pm
I agree, this seems like a complex solution to me.  If it gets too deep, you might try the alternative of creating a layout view with a binding manager and a single SmartPartPlaceHolder, then hosting your control view within that.
 
Bill J.
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 24-Sep-2007 at 3:26pm
The following are the items that I have created in an attempt to duplicate the toolbar adapter in a loose control view context:
 
IdeaBlade.Cab.DevEx
  Views
    Base
      DotNetControlViewWithToolBar.cs
IdeaBlade.Cab.Interface
  Miscellaneous
    ControlViewToolStripAdapter.cs
  Views
    Base
      ControlViewContextBase.cs
      IControlViewWithToolbarPresenter.cs
IdeaBlade.Cab.UI
  Views
    Base
      ControlViewContext.cs
      ControlViewWithToolbarHelper.cs
      ControlViewWithToolbarPresenter.cs

    Widget
      BasicControlViewWithToolbarPresenter.cs
 
MyApp
  PageControllers
    ContactsViewTabViewController.cs
  Views
    ContactsView.cs
    ContactsViewPresenter.cs
 
So far, my efforts have resulted in white screens of death in the VS IDE.  Something is not quite right with linkage between the actual view in my app and the helper class in the IB.CAB.UI project.  Not sure if I have learned how this all works, yet.  I'll keep working on it.  I'm sure that I have not thrown the right switch somewhere.
 
More docs on how this stuff all works together would be great.  I think someone said there were some in the works.  Not only would a doc that states what is inherited from what, but the whys and wherefores would be excellent to have, too.
 
Bill
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 24-Sep-2007 at 9:55am

Thanks for the direction!  I am working on implementing a new ControlViewToolStripAdapter.  The context thing is a bit cryptic to me but I am making headway.  I am going to try to make the adapter dependent on the ViewContextBase rather than the GridViewContextBase.  I should have something going by the end of the day.  If not, I'll pop in more questions here.

Again, thanks!
Back to Top
Bill Jensen View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Jul-2007
Location: United States
Posts: 229
Post Options Post Options   Quote Bill Jensen Quote  Post ReplyReply Direct Link To This Post Posted: 21-Sep-2007 at 5:45pm

It works with a GridView because Ward has implemented a "GridViewToolStripAdapter" (an abstract class in IdeaBlade.Cab.Interface/Miscellaneous) and the concrete class DotNetNavigatorGridViewToolStripAdapter (in IdeaBlade.Cab.UI/Miscellaneous).

This is used by the GridViewPresenters to allow the navigation tool bar to manipulate the view's binding source.
 
Despite the name, there is very little in these classes that is dependent on GridViews  (The main thing that I see is a dependency on the ViewContext being a GridViewContext).
 
I'll talk with Ward about how this is implemented, but I'm afraid this is a case where we've provided a working example of how to do something, but it's up to you to replicate it for a different scenario.
 
Another option:
 
Rather than following this pattern and making the navigation tool strip part of your control view, you might follow my LayoutDemo pattern and create a layout view with a tool strip and a single SmartPartPlaceholder.
 
Its controller (a TabViewController if it's going in a TabWorkspace) would get the binding source from the child view context and hook it up to the navigator.  (Use reflection to see if the child view context implements an interface (call it "IBoundContext").  If so, get the binding source through it and hook it up to the navigator.  If not, hide the navigator. 
 
Then simply make your control view use a special context object that implements IBoundContext and supplies its binding source.
 
I haven't tried this, but is seems like it should work.
 
Bill J.
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 21-Sep-2007 at 5:35pm
One last effort for today was to create a Contacts SummaryDetailPage using the wizard.  From this I pointed the recently created ContactViewTabController to use the new ContactMasterSummaryView created by the wizard.  My hope, albeit thin, was that the tab controller  would pick up the view with the binding navigator supplied through the summarydetailpagecontroller.  Unfortunately, that did not work out.  The reason is that the new controller for the view is never called.  Nevertheless, the view with data did show up in the tab, but no way to navigate it or update it.  At least, I see now how easy it is to transplant views.
 
Somehow, I need to get the tabcontroller to inherit from the summarydetailpagecontroller; or, perhaps, create a hybrid of these two calling it a ControlViewTabController, or something like that.  Wacko
 
Time for the weekend.
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 21-Sep-2007 at 3:23pm
Quick update:  I now have data showing up in the view (the mEmptyList was pointing to the wrong entitylist).  However, it is presented without any way to add/edit or delete.  So, the next step will be to try to wiggle a BindingNavigator onto the form.  I'd really like to use the one already designed (summarydetailpage?), so I'll keep digging into the code to figure it out.

Edited by Linguinut - 21-Sep-2007 at 3:24pm
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 21-Sep-2007 at 2:42pm
*bump*
 
The recent discussion on the new base view has been somewhat relevant and helpful; however, my basic question is still unanswered:  how do I create a view with navigation similar to the example provided above?
 
My efforts so far have gone one of two ways:  1)  the view shows up (no navigation), but no data is presented; or 2)  the error regarding the boundtype resurfaces.  I have tried the view/context/presenter route.  I have tried creating a new tabviewcontroller just for the view.  The GeneralTabViewController does not work either (boundtype error).  I am running out of options.
 
Any help would be greatly appreciated.
Thanks,
Bill
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 20-Sep-2007 at 11:59am
I am right there with you. Haven't been able to get a reply tho.
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 20-Sep-2007 at 11:53am
My example above is from a previous, non-CAB version of my application.  I have only been successful in recreating the top part of that window in the CAB app.  The tabular portion is not working (unless I introduce a gridview, but that is not what I want).  I am still trying to connect a widget view (loose controls with navigation) to the overall layout.
Back to Top
Bill Jensen View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Jul-2007
Location: United States
Posts: 229
Post Options Post Options   Quote Bill Jensen Quote  Post ReplyReply Direct Link To This Post Posted: 20-Sep-2007 at 10:00am
Look at a at the "NavBar Setup" region of a module controller.
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 19-Sep-2007 at 6:39pm
What did you do to add new buttons to the nav bar?
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 19-Sep-2007 at 6:38pm
Glad to hear I ain't the only one.
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 19-Sep-2007 at 3:35pm
This may be related to another concurrent thread; nevertheless, I thought I would get back to this today.
 
I am still getting the following error:

The item type of the BindingSource that you selected [Spiratex.Aspire.Model.CustomerMaster] does not match the BoundType of this BindingManager [Spiratex.Aspire.Model.ContactMaster].
 
I get this no matter how I try to connect a view to the customer summary/detail layout.  With or without a tabcontroller, this error keeps surfacing.  How do I properly connect a widget view to a layout view?
 
This is an example of what I am trying to do...both addresses and contacts are loose control views with navigation.  Orders and invoices will be simple grid views.
 
Customer%20Layout%20Example


Edited by Linguinut - 19-Sep-2007 at 3:42pm
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 13-Sep-2007 at 5:25pm
When you get back, I'd appreciate some help on that ListConverter thing, too.
 
Thanks!
Back to Top
 Post Reply Post Reply Page  <1234>

Forum Jump Forum Permissions View Drop Down