Ticket S133980
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

SystemModules.Link - Provide events to create and customize a custom Link ListView

Refactor LinkUnLinkController to provide suitable interception events

created 15 years ago

Without inheriting from the LinkUnlinkController it is vary difficult to modify behaviour for specific requirements. Unlike (say) the NewObjectViewController, the LinkAction or UnLinkAction Execute events cannot be properly intercepted to provide for alternative behaviour.
Proposed Solution:
Implement a similar event sequence to other controllers. For example:
controller.LinkExecuting(object, CancelEventArgs)
controller.LinkExecuted(object, LinkExecutedEventArgs)
controller.UnLinkExecuting(object, UnLinkExecutingEventArgs) (from CancelEventArgs)
controller.UnLinkExecuted(object, EventArgs)

Comments (3)
Dennis Garavsky (DevExpress) 15 years ago

    Hello John,
    Before introducing these events, we need to know exactly which custom functionality you would like to provide in the LinkUnLinkController.
    For example, we already have a similar SystemModules.Link - Provide events to create and customize a custom Link ListView suggestion on our list, and we clearly know why it's required. Unfortunately, it's not clear from your proposal. Also, the Action itself already provides corresponding Executing and Executed events.
    Why cannot they be used here?
    Thanks,
    Dennis

      Hi Dennis
      I tried subscribing to the LinkAction.Executing event but I think it must fire after the Popup window has appeared.
      The idea is that you can harness the Link (or UnLink) action in a different way. In my case I wanted to do the following:
      We have BOs Company and Contact with a many to many relationship (Company.Employees and Contact.Employers)
      When a user adds a new contact to a Company (e.g. Link) we want to show a much more specialised search window based on a detailview for a non-persistent object which shows its results in an associated listview. On the ListView we have a New button so that if a user cannot find the right (say) Contact then they can create a new one. Basically much the same functionality as the standard Link button would give you but much more suitable for a) searching large databases (250,000 Contacts plus) and b) much more comprehensive searching capability which can include searching with aggregates and fuzzy name searches.
      I did look at modifying the popup dialog and controller however changing it to use a detailview etc. seemed a bit over the top. Whereas if you had some suitable interception points for customising the way the controller works one could intercept things before the popup and do your own thing.
      It is resolved at present by disabling the Link action and replacing it with a lookalike (Simple Action with the same image) however it did seem that the controller had little in the way of customisation - I am sure that the outcome of the suggestion you identified (sorry I missed it :-) ) will be fine.
      Best wishes
      John
      P.S. The Many to Many association "features" of XAF/XPO continues to be exceeding challenging here in the real word, another story of course but this was the reason for raising the suggestion.

      Dennis Garavsky (DevExpress) 13 years ago

        Hi John,
        I have made it possible to accomplish your scenario with ease in 12.1. Find further details at SystemModules.Link - Provide events to create and customize a custom Link ListView an let me know whether this meets your needs or not.
        Thanks,
        Dennis

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.