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 SolutionAllow 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 




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.

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: 

25 comments:

  1. 12 years is not bad :) i guess i start in my 8th year now ;)

    Thx for the Addition - nice feature, already using it a long time!

    Cheers
    Noxe

    ReplyDelete
    Replies
    1. 8 years is not that bad too;-)
      Great, I am happy to hear that!

      Delete
  2. 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!

    ReplyDelete
    Replies
    1. Wow, 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
      Feel free to send me a case study about your DevExpress/XAF experience at dennis at devexpress dot com as well;-)

      Delete
  3. I'm a 3 year old XAFer and I used the HiddenActions model node to hide actions independently, but I like the new approach.

    ReplyDelete
    Replies
    1. Not 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.

      Delete
  4. DevExpress since 2002, XAF since 2007!
    Currently stuck in v13.2 though.

    Robert

    ReplyDelete
    Replies
    1. Thanks for being our customer, Robert. It seems that you are one of the oldest DevExpress/XAF customers here, in all senses;-)
      Feel 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/).

      Delete
  5. 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 :-)

    ReplyDelete
    Replies
    1. Thanks, 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.

      Delete
  6. Jascha 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.

    ReplyDelete
    Replies
    1. Thanks for posting, Chris! Please greet Jascha from the whole XAF team.

      Delete
  7. Had 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.

    ReplyDelete
    Replies
    1. You're old too, Martin. Thanks for posting and our team is happy to hear that this addition was helpful for you.

      Delete
  8. hi from another old one and regards back to the team Dennis!

    ReplyDelete
    Replies
    1. Happy to hear from you, Jascha! Also, special 'hi' from Alex, Dan, Roman and others with whom we started years ago.

      Delete
  9. Hi, 5 years DevExpress controls, 4 years XAF - and still I feel like a newbie :D

    ReplyDelete
  10. 12 years impressing customers with DevEx winforms suite and 3 years of XAFing (Win and Web).

    Great improvement! I've done just that with HiddenActions, too. This saves some clicks, however.

    Cheers from Austria

    ReplyDelete
    Replies
    1. Another one from Austria - where are you?
      I'm in Tirol, as is Noxe.

      Cheers.

      Delete
    2. Great to see you guys get connected! Hope to visit Austria some time...

      Delete
  11. 2002 or 2003 with the VCL suite and the predecessor Step6.
    Willem jr.

    ReplyDelete
    Replies
    1. Thanks for your post, Willem! I think I must make a chart from our database to determine the oldest XAFer here:-)

      Delete