Alpha DevCon 2018
Results 1 to 11 of 11

Thread: Checking for dirty grids before closing pane on tabbedUI

  1. #1
    Member
    Real Name
    Richard Mumma
    Join Date
    Dec 2010
    Location
    Richland, WA
    Posts
    164

    Default Checking for dirty grids before closing pane on tabbedUI

    I am using a JavaScript Action button on an navigation bar in a component in a TabbedUI,
    The action button opens a new record input grid tab or pane on the TabbedUI

    It is possible for the user to close the tab pane before the new record has been submitted.
    I'm trying to trap for this condition, test if the grid in the pane is dirty and display a message stating the record must be save before closing the pane.

    I tried different variations of the code below in the onBeforRemove event with no luck.

    if ({grid.Object}.isDirty() == true){
    alert('You must save changes before closing pane');
    return false;
    }


    Can someone help?

  2. #2
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: Checking for dirty grids before closing pane on tabbedUI

    the actionbutton that opens the tabbedui_pane builder has a property if you click that one it should work, see here
    http://screencast.com/t/enWuw3xy
    Last edited by GGandhi; 02-14-2015 at 09:39 PM.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  3. #3
    Member
    Real Name
    Richard Mumma
    Join Date
    Dec 2010
    Location
    Richland, WA
    Posts
    164

    Default Re: Checking for dirty grids before closing pane on tabbedUI

    Quote Originally Posted by GGandhi View Post
    the actionbutton that opens the tabbedui_pane builder has a property if you click that one it should work, see here
    http://screencast.com/t/enWuw3xy

  4. #4
    Member
    Real Name
    Richard Mumma
    Join Date
    Dec 2010
    Location
    Richland, WA
    Posts
    164

    Default Re: Checking for dirty grids before closing pane on tabbedUI

    Thanks, I thought there must be an easy way to do this.

  5. #5
    Member
    Real Name
    Richard Mumma
    Join Date
    Dec 2010
    Location
    Richland, WA
    Posts
    164

    Default Re: Checking for dirty grids before closing pane on tabbedUI

    Thanks again, but unfortunatly, that property is only available if the action button opens a window, I'm using a Tabbed UI pane and the property is not available.

  6. #6
    Member
    Real Name
    David Mildenhall
    Join Date
    Jul 2009
    Location
    Reading, UK
    Posts
    235

    Default Re: Checking for dirty grids before closing pane on tabbedUI

    Not sure if it helps but take a look at the two videos in video finder number 93.

  7. #7
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: Checking for dirty grids before closing pane on tabbedUI

    I am using a JavaScript Action button on an navigation bar in a component in a TabbedUI,
    The action button opens a new record input grid tab or pane on the TabbedUI
    this is from your first post, are you doing something different?
    please post back how exactly you are opening the tabbed ui pane.

    edit: I see what you mean. sorry.
    I will test later to see what can be done.
    edit, later:
    I just checked without adding any code it seems to warn if the grid is dirty.
    I will see where that property is set.
    Last edited by GGandhi; 02-15-2015 at 11:07 AM.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  8. #8
    Member
    Real Name
    Richard Mumma
    Join Date
    Dec 2010
    Location
    Richland, WA
    Posts
    164

    Default Re: Checking for dirty grids before closing pane on tabbedUI

    This looks like exactly what I was needing. I haven't tried the code yet, but looks promising. What is really strange, I am opening a component directly with a tabbed UI button, like the first example in the video, yet I'm not getting the error message shown in the video. The component I am opening is a grid component A5 template for entering or editing a record, not a list grid, just a single record input.

  9. #9
    Member
    Real Name
    Richard Mumma
    Join Date
    Dec 2010
    Location
    Richland, WA
    Posts
    164

    Default Re: Checking for dirty grids before closing pane on tabbedUI

    The Tabbed UI is opening a A5 grid component with a search part. On this grid is an action button that opens an record insert grid in a new tabbed UI pane. It was my intention to allow the user to put a new record into the table using this single record form and submit the changes. The component is opening in a tabbed UI pane to allow the user to move between tabs and not have open window on the desktop.
    The new record is an incident for Sheriff Posse dispatch, i.e., the dispatcher get a call, finds the address in a database, then selects an action button in the navigation bar if they wish to start a new incident record. The action button opens the input grid. Since calls can span over a hour or so, it necessarily to keep the incident open on the tab until the call is closed. Also, multiple incidents can be open at once, so keeping the icidents in separate tabs allow the user to switch between the individual incidents and update.

  10. #10
    Member
    Real Name
    Richard Mumma
    Join Date
    Dec 2010
    Location
    Richland, WA
    Posts
    164

    Default Re: Checking for dirty grids before closing pane on tabbedUI

    The code found in video 93 worked but instead of placing the code in the Tabbed UI button I put it in the Action Button javascript, onBeforeRemove event since that was the button calling the pane.
    Works well.
    Thanks for the help

  11. #11
    Member
    Real Name
    Richard Mumma
    Join Date
    Dec 2010
    Location
    Richland, WA
    Posts
    164

    Default Re: Checking for dirty grids before closing pane on tabbedUI

    Just a follow-up for those following this tread.
    The code found in video 93 worked but instead of placing the code in the Tabbed UI button I put it in the Action Button javascript, onBeforeRemove event since that was the button calling the pane.
    Works well.
    Thanks for the help

Similar Threads

  1. Print a TabbedUI Pane
    By Sparticuz in forum Application Server Version 11 - Web/Browser Applications
    Replies: 11
    Last Post: 02-09-2015, 12:13 PM
  2. Updating grids or closing tabs in tabbedUI
    By Pat Bremkamp in forum Application Server Version 10 - Web/Browser Applications
    Replies: 2
    Last Post: 07-01-2011, 12:42 PM
  3. TabbedUI - Default Pane
    By leetv in forum Application Server Version 10 - Web/Browser Applications
    Replies: 8
    Last Post: 04-16-2011, 04:52 PM
  4. Close dirty grid (pane)
    By Peter.Greulich in forum Application Server Version 10 - Web/Browser Applications
    Replies: 2
    Last Post: 09-30-2010, 04:54 PM
  5. TabbedUI pane closes immediately
    By mansb in forum Application Server Version 10 - Web/Browser Applications
    Replies: 0
    Last Post: 08-20-2010, 06:05 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
  •