Search This Blog
Monday, February 29, 2016
A simpler and more atomic control over associated collections using the AllowLink/AllowUnlink commands in the Model Editor
One of our recent team OKRs was and still is "improving developer experience when accomplishing common tasks", and in this blog post, I will cover yet another small, but important improvement in XAF v15.2.4+ that adds to this larger goal.
Let me quote Mark, the owner of the original suggestion in the Support Center, to quickly define the problem:
If you set AllowNew to false, both the link and new buttons are missing
If you set AllowDelete to false, both the delete and unlink buttons are missing.
There are scenarios where it would not be desirable to allow add new or add delete but to still have link and unlink (as those are very independent types of activities).
Proposed Solution: Allow for independent control of the link and unlink buttons.
As a side note, I wanted to note that we seem to have started exploring XAF with Mark almost at the same time in 2007. And from what I gather, he is still using our business application framework for his projects today in 2016, with 12 years of overall DevExpress experience in total! Who has more "oscars"?;-) - tell me your years with XAF/DevExpress in comments, please!
Back to the topic, previously there was a way to manage this using a custom ViewController (by managing the ActionBase.Active state), but this was not straightforward for most users. Since there were many other sensible scenarios from users where simplification for these popular commands would be required, we have implemented a simpler and more flexible solution at the Application Model level.
Now, in addition to the AllowNew, AllowEdit and AllowDelete quick options for the ListView node in the Model Editor, you can use the new
IModelListView.AllowLink and IModelListView.AllowUnlink properties:
Similarly, the ListView class now provides the two more BoolList type properties:
public BoolList AllowLink { get; }
public BoolList AllowUnlink { get; }
They specify whether the associated objects can be linked and unlinked in the current Nested List View and operate independently from the base AllowNew/AllowDelete options. As a result, you have a more atomic control over what your application does.
public BoolList AllowLink { get; }
public BoolList AllowUnlink { get; }
They specify whether the associated objects can be linked and unlinked in the current Nested List View and operate independently from the base AllowNew/AllowDelete options. As a result, you have a more atomic control over what your application does.
And here is the result in the application UI:
I hope you welcome this improvement as other XAFers did. As always, I am open to hear what you think.
See Also:
My earlier post about another usability improvement for nested ListView:
Subscribe to:
Post Comments (Atom)
12 years is not bad :) i guess i start in my 8th year now ;)
ReplyDeleteThx for the Addition - nice feature, already using it a long time!
Cheers
Noxe
8 years is not that bad too;-)
DeleteGreat, I am happy to hear that!
I'm starting my 3rd year now. Thank you guys for making developer life a living joy. Let me know you where I can send you a case of wine from Argentina!
ReplyDeleteWow, thanks and happy XAFing! While my team and I would prefer sending it to Russia:-), I think that our US office is fine too: https://www.devexpress.com/Home/ContactUs.xml
DeleteFeel free to send me a case study about your DevExpress/XAF experience at dennis at devexpress dot com as well;-)
I'm a 3 year old XAFer and I used the HiddenActions model node to hide actions independently, but I like the new approach.
ReplyDeleteNot bad too, Erik! Thanks for sharing your experience. Yes, the https://documentation.devexpress.com/#eXpressAppFramework/clsDevExpressExpressAppSystemModuleIModelHiddenActionstopic feature is fine for certain scenarios too. I forgot to mention that the ListView class also provides the corresponding options allowing you to have more control over this behavior.
DeleteDevExpress since 2002, XAF since 2007!
ReplyDeleteCurrently stuck in v13.2 though.
Robert
Thanks for being our customer, Robert. It seems that you are one of the oldest DevExpress/XAF customers here, in all senses;-)
DeleteFeel free to contact us in case of any upgrade questions or difficulties - there have been quite many additions to the Universal Suite recently (https://www.devexpress.com/Support/WhatsNew/).
Im starting my 5. year at the moment. I currently start to migrate from 13.2 to 15.2 and have some problems with old reports. The feature you have told us above makes Xaf again a bit more better than it was :-)
ReplyDeleteThanks, Thomas! BTW, did you know that the "old" reports can coexist with the new ones (ReportsV2)? Hopefully, this would solve your problems in the interim period. Otherwise, feel free to contact our support team.
DeleteJascha and I were at this point in May 2008 ( https://www.devexpress.com/Home/Case-Studies/LineOfBusinessSystems/ ), so I think we've been "looking at" XAF since 2007. For once, we're also in Synch with DX release versions for our own release development.
ReplyDeleteThanks for posting, Chris! Please greet Jascha from the whole XAF team.
DeleteHad to check but my first order was in March 2002 (ExpressMasterView). Still an active subscriber (XAF). Just debated this issue with another XAF user last week :-) Nice to have.
ReplyDeleteYou're old too, Martin. Thanks for posting and our team is happy to hear that this addition was helpful for you.
Deletehi from another old one and regards back to the team Dennis!
ReplyDeleteHappy to hear from you, Jascha! Also, special 'hi' from Alex, Dan, Roman and others with whom we started years ago.
DeleteHi, 5 years DevExpress controls, 4 years XAF - and still I feel like a newbie :D
ReplyDeleteThanks for your post, Pawel!:-)
Delete12 years impressing customers with DevEx winforms suite and 3 years of XAFing (Win and Web).
ReplyDeleteGreat improvement! I've done just that with HiddenActions, too. This saves some clicks, however.
Cheers from Austria
Another one from Austria - where are you?
DeleteI'm in Tirol, as is Noxe.
Cheers.
So are we, Innsbruck ;-)
DeleteNice! I'm from Vienna.
DeleteGreat to see you guys get connected! Hope to visit Austria some time...
Delete2002 or 2003 with the VCL suite and the predecessor Step6.
ReplyDeleteWillem jr.
Thanks for your post, Willem! I think I must make a chart from our database to determine the oldest XAFer here:-)
Delete