Alpha Video Training
Results 1 to 8 of 8

Thread: List Control - Display a dirty warning message that prevents user from moving off the list control panel.

  1. #1
    Member
    Real Name
    Frank Zwolinski
    Join Date
    Aug 2013
    Location
    Vernon, NJ USA
    Posts
    125

    Default List Control - Display a dirty warning message that prevents user from moving off the list control panel.

    Since the last release of Alpha 5088 April 19,2018, my users have been getting an intermittent error on a clean list control.
    Steps
    1. Viewing schedule list.
    2. Tap Detail to move from list to detail view panel
    3. This message appears - "You must first save or undo the changes you have made to the List's Detail View."
    4. User unable to leave the list. The message displays BEFORE moving to panel.
    5. No edits have been made. The list is clean.
    6. The workaround is to swipe close and log back in.
    7. I was able to duplicate the error once in 70 tries. About 10 out of 250 users reported the error today.
    9. This is a disconnected app.

    This message comes from the customization properties of the list control detail view..
    Is there a way to turn off the detail view customization messages if this is a bug?
    I display my own custom messages so I don't need the customization messages.
    Never had this problem in the past 2 years.

    I recalculated all controls since the last version was over 6 months old.

    Any suggestions would be much appreciated.

  2. #2
    Member
    Real Name
    Frank Zwolinski
    Join Date
    Aug 2013
    Location
    Vernon, NJ USA
    Posts
    125

    Default Re: List Control - Display a dirty warning message that prevents user from moving off the list control panel.

    Even though something is making the list dirty behind the scenes, I changed the Auto-Commit detail view on row select property to checked. This will commit any detail view changes automatically and not show the message. I deployed this change early this morning and no one has reported an issue.

    If I remove the check box for the auto-commit option, I can use a custom java script function to determine which control is dirty in the detail view to help me understand what may be changing programatically. The javascript function is added to the list detail view customization warning message for "dirty Detail view record". See screen shot.

    function savedetail() {
    var columnNames = {dialog.Object}._dataBoundControls;
    for(var k in {dialog.Object}.columnInfo) columnNames.push(k);

    //need to figure out how to loop through all detail view controls and test for a5IsDirty property

    var lcompanyname = {dialog.Object}.getPointer('COMPANYNAME');
    var fnDirty = lcompanyname.attributes['a5isdirty'].value;
    alert(fnDirty);

    }
    Attached Images Attached Images

  3. #3
    Member jgrannis's Avatar
    Real Name
    Jeff Grannis
    Join Date
    Apr 2016
    Location
    New Iberia, LA
    Posts
    339

    Default Re: List Control - Display a dirty warning message that prevents user from moving off the list control panel.

    I have a similar issue so I came up with this bit of code that I can call from various points to try to see what is going on. I just look at all lists because the warning isn't clear as to which list/detail view is considered dirty.

    Code:
    var arrayLists = {dialog.object}._listControls;
    var lObj;
    var arrayCtrlsInDV = [];
    for (i = 0; i < arrayLists.length; i++) {
        lObj = {dialog.object}.getControl(arrayLists[i]);
        console.log('-------'+arrayLists[i]+'-------------------------------------');
        console.log('Number of rows: '+lObj._data.length);
        console.log('Number of visible rows: '+lObj._rData.length);
        if (typeof lObj._dvIsDirty != 'undefined'){
        	console.log('Detail View is dirty: '+lObj._dvIsDirty);
        	arrayCtrlsInDV = lObj._controlsInDV;
        	for (j = 0; j < arrayCtrlsInDV.length; j++) {
        		console.log('DV control, '+arrayCtrlsInDV[j]+', isDirty: '+{dialog.object}.getControlDirty(arrayCtrlsInDV[j]));
        	}
        } else {
        	console.log('Detail View is not configured');
        }
    }

  4. #4
    Member
    Real Name
    Frank Zwolinski
    Join Date
    Aug 2013
    Location
    Vernon, NJ USA
    Posts
    125

    Default Re: List Control - Display a dirty warning message that prevents user from moving off the list control panel.

    Thanks so much for that code. This is very helpful. Appreciate it.

  5. #5
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,631

    Default Re: List Control - Display a dirty warning message that prevents user from moving off the list control panel.

    Is there a way to turn off the detail view customization messages if this is a bug?
    If you don't want the message to appear, just clear out the default detail view error message settings. Then no error will pop up.

  6. #6
    Member
    Real Name
    Frank Zwolinski
    Join Date
    Aug 2013
    Location
    Vernon, NJ USA
    Posts
    125

    Default Re: List Control - Display a dirty warning message that prevents user from moving off the list control panel.

    Peter, I tried your suggestion and I get a java script error. The auto-commit was my solution.
    listview_nomessage_error.png

  7. #7
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,631

    Default Re: List Control - Display a dirty warning message that prevents user from moving off the list control panel.

    Can't say, Frank. It's worked for me. I've done that a couple of times. But it's hard to remember in which project or component(s).

  8. #8
    "Certified" Alphaholic
    Real Name
    Larry Grupido
    Join Date
    May 2010
    Posts
    1,720

    Default Re: List Control - Display a dirty warning message that prevents user from moving off the list control panel.

    Coming back to an old thread: We ended up getting this to work!


    We used two containers, both 1 px thick.

    The first container goes across the top of the UX at 100% width. (Actually, it is just above a Tab Control, but you get the picture.)

    The second container goes vertically on the left for the height of the page. (Of course, 100% height doesn't work.)

    In the mouse out event of both containers we save the UX.

    I was stumped on this for a long time because I was trying to put a single container all the way around the space I wanted to save - but the container events don't work that way. You "Mouse Out" of a container every time you go over another control inside the container. But by just making them long skinny containers up the left and over the top it worked.

    I now have a UX that autosaves if you try to leave, it doesn't do a million calls back to the server (like it would if I tried to save after every edit). It's not fool proof, someone could still find a way to close the browser without saving - but those fools don't need to use the app!

    Thanks all!

Similar Threads

  1. Disconnected List Control / Detail View - List remains dirty after sync
    By frankiez in forum Mobile & Browser Applications
    Replies: 5
    Last Post: 06-28-2017, 05:03 AM
  2. Dirty unbound grid control prevents navigation
    By Peter.Greulich in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 01-16-2016, 11:15 AM
  3. Using an image in a list control detail prevents save from working
    By gkpurcey in forum Mobile & Browser Applications
    Replies: 1
    Last Post: 07-17-2015, 12:19 PM
  4. UX Using a List control to fill in fields - works but not making them dirty
    By stewx in forum Application Server Version 11 - Web/Browser Applications
    Replies: 1
    Last Post: 08-12-2014, 08:31 PM
  5. List Control - Message to display when 0 records are returned
    By coleresources in forum Mobile & Browser Applications
    Replies: 4
    Last Post: 12-25-2013, 11:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •