Author |
Share Topic Topic Search Topic Options
|
mgood
IdeaBlade
Joined: 18-Nov-2010
Location: Emeryville, CA
Posts: 583
|
Post Options
Quote Reply
Topic: Multiple active views Posted: 25-May-2012 at 11:03pm |
If I understand you correctly, you want to be able to open the same entity in more than one tab. What's the use case for that? If you edit the same entity in multiple tabs you'll create a concurrency conflict with yourself. That doesn't make much sense. You don't open the same document twice in Word, either. If the document is already open, Word brings it to the foreground. The MDI TempHire example does the same. Anyway, the ObjectManager manages instances by keys. You pick the key that makes sense for your scenario. You can create an artificial key, for example a GUID for each of the open tabs instead of using the entity ID, but again, I'm not sure from a user experience opening the same entity in multiple tabs makes much sense.
I'm not quite understanding your second point. A word about deleting. I know in TempHire you can actually delete a StaffingResource, but deleting is very bad in general. It causes lots of problems if you actually delete records from the database. Generally, you should not delete, but instead mark the record as inactive/expired or something like that.
Edited by mgood - 25-May-2012 at 11:04pm
|
|
giotis
Groupie
Joined: 26-Apr-2012
Location: Greece
Posts: 53
|
Post Options
Quote Reply
Posted: 25-May-2012 at 6:13pm |
I studied extensively the cocktail and concluded that the object "DomainUnitOfWorkManager" manage the "DomainUnitOfWork" for the creation and sharing of multiple object instances at runtime but unique, one at a time. When we have same instance of "IWorkspace" more than once then we have a conflict because we need to manage same "DomainUnitOfWork" objects and "DomainUnitOfWorkManager"does not leave us because do not know who the owner is, behave as if there is only one owner, this is right but not an MDI enviroment. how to manage the incident?
comment Very rightly at the new version you introduced the method "Refresh",
which fits well because in one instance we can delete a record and another instance should be informed accordingly.
-About "Refresh" a point here I think must be disable when state entity is modify because a silly Secretary
may delete pending entities-
|
|
mgood
IdeaBlade
Joined: 18-Nov-2010
Location: Emeryville, CA
Posts: 583
|
Post Options
Quote Reply
Posted: 08-May-2012 at 5:10pm |
Yes, that can all be done. The answers are all in the MDI example.
|
|
giotis
Groupie
Joined: 26-Apr-2012
Location: Greece
Posts: 53
|
Post Options
Quote Reply
Posted: 08-May-2012 at 3:11pm |
|
|
giotis
Groupie
Joined: 26-Apr-2012
Location: Greece
Posts: 53
|
Post Options
Quote Reply
Posted: 08-May-2012 at 3:01pm |
or to create new Tab from StaffingResource.Id link http://docs.google.com/open?id=0BwsfMcd3_Ex2QTdlNDgySHRTR0E
Edited by giotis - 25-May-2012 at 4:55pm
|
|
giotis
Groupie
Joined: 26-Apr-2012
Location: Greece
Posts: 53
|
Post Options
Quote Reply
Posted: 08-May-2012 at 2:47pm |
Every time clicked the button "Resource Management" to create a new Tab
|
|
giotis
Groupie
Joined: 26-Apr-2012
Location: Greece
Posts: 53
|
Post Options
Quote Reply
Posted: 08-May-2012 at 2:41pm |
I tried to create a new MDI different version but failed,
is possible ?
link about image http://docs.google.com/open?id=0BwsfMcd3_Ex2akNSbk5sX0wxb1U
|
|
mikedfox
Newbie
Joined: 29-Apr-2010
Posts: 21
|
Post Options
Quote Reply
Posted: 10-Apr-2012 at 1:24pm |
thanks Marcel
|
|
mgood
IdeaBlade
Joined: 18-Nov-2010
Location: Emeryville, CA
Posts: 583
|
Post Options
Quote Reply
Posted: 09-Apr-2012 at 7:20pm |
Mike, I've created an MDI version of TempHire that demonstrates what you are looking for. Double clicking on a row opens the item. You can download it from my Skydrive.
https://skydrive.live.com/redir.aspx?cid=b37183c914f0fbe8&resid=B37183C914F0FBE8!209&parid=B37183C914F0FBE8!208&authkey=!AN0Ya37NsYMJIuw
You can use a diff tool to see what's different between the SDI and the MDI version. The difference is very minimal. Mostly changes around lifecycle and closing strategy of the VMs and a TabManager to manage the open tabs.
I've modified both the WPF and the Silverlight version. In Silverlight, because the TabControl is badly broken I opted for a row of buttons to switch between the open items. The WPF version uses a TabControl instead. The code is identical, just different views.
|
|
mgood
IdeaBlade
Joined: 18-Nov-2010
Location: Emeryville, CA
Posts: 583
|
Post Options
Quote Reply
Posted: 09-Apr-2012 at 10:39am |
I don't have a ready example that I can send you, but I'll take some time to create a multi-edit version of TempHire, since I brought it up on the video.
|
|
mikedfox
Newbie
Joined: 29-Apr-2010
Posts: 21
|
Post Options
Quote Reply
Posted: 09-Apr-2012 at 7:30am |
We currently are using PRISM for development, but it is more complicated that I'd like, so I'm very interested in the cocktail project.
One feature that makes PRISM so useful is the view/region management. In the TempHire video it was mentioned that it would be easy to implement multiple objects being editted at once, via a tab interface for example. However, other than with PRISM, I have never found that to be an easy thing to manage. Do you have any examples of using cocktail in a multi edit way, or any other kind of more complicated view composition?
|
|