Bug Report T259102
Visible to All Users

Web - DetailView.ViewEditMode is not synchronized with the ViewShortcut's 'mode=edit' parameter in the XafApplication.ProcessShortcut method, which results in the read-only DetailView to be always opened from its URL

created 10 years ago (modified 10 years ago)

Steps to reproduce:

  1. Start MainDemo.Web and navigate to an editable DetailView, copy its URL (e.g., http://localhost:50292/Default.aspx#ViewID=Contact_DetailView&ObjectKey=67b41227-2df1-4bec-96b7-2f46e0e8d55b&ObjectClassName=MainDemo.Module.BusinessObjects.Contact&mode=Edit), navigate to another View, e.g. Position_ListView.
  2. Set a breakpoint at XafApplication.ProcessShortcut and paste the copied URL into the address bar and press Enter;
  3. Inspect the result of the CreateDetailView(objectSpace, viewParameters.ViewId, true, obj) method and notice that the essential "mode=Edit" parameter is ignored and is not propagated into the DetailView.ViewEditMode property. As a result, the DetailView will be opened in View mode.

Answers approved by DevExpress Support

created 10 years ago (modified 9 years ago)

We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

Additional information:

Starting with v15.1.5 we have added a virtual OnShortcutProcessed method into the XafApplication class, which can be overridden as follows in the YourSolutionName.Web/WebApplication.cs file:

C#
protected override void OnShortcutProcessed(ViewShortcut shortcut, View view) { base.OnShortcutProcessed(shortcut, view); String mode = ""; if (view is DetailView && shortcut.TryGetValue("mode", out mode) && (mode != null) && (mode.ToLower() == "edit")) { ((DetailView)view).ViewEditMode = ViewEditMode.Edit; } }

We have decided not to put this fix by default into the standard delivery, because it can be a breaking change for other customers. We will consider changing the default behavior in a future version once we receive more feedback from our users on this.

Update 8/6/2015:
Starting with v15.1.6 we have updated our XafApplication to correctly process ViewShortcuts with ViewEditMode set to "Edit". So, DetailView will be shown in Edit Mode if a link processed by WebBrowser contains ViewEditMode set to "Edit", but the ViewNavigationHistory will contain a link to the DetailView in View Mode.

    Show previous comments (8)
    Dennis Garavsky (DevExpress) 10 years ago

      @John: We apologize for the delay when preparing the hot fix as we needed additional time to review all the functional and installation tests for this intermediate build . Here you go:
      http://downloads.devexpress.com/Share/DXP/150712/DevExpressComponents-15.1.4.15193.exe

      http://downloads.devexpress.com/Share/DXP/150712/DevExpressComponents-14.2.8.15193.exe

      DL DL
      Dmitry Lazariev 9 years ago

        Hi Dennis,
        I need fix for 15.1.4, but link above doesn't work. Where can I download the fix?
        Thanks.

        Dennis Garavsky (DevExpress) 9 years ago

          @Dmitry: This old hot fix build is no longer available in our stores. Instead, please download the closest v15.1.5 or v15.1.6 from https://www.devexpress.com/ClientCenter/DownloadManager/.

          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.