Inform users on unsaved data when switching between/starting new TaskFlows?

Hi
In our case, we are using the multiTaskFlow concept to dynamically start new TaskFlows in Tabs. The simple requirement is to have a generic way to inform users on modified unsaved data when switching or starting new TaskFlow
I did research in google for answers, but did not found anything working.
For example, I added following checks (df=dirtyFlag) just before switching between Tabs and Menu-items:
boolean df1 = am.getApplicationModuleDef().isDirty();
boolean df2 = ControllerContext.getInstance().getCurrentRootViewPort().isDataDirty();
boolean df3 = ControllerContext.getInstance().getCurrentViewPort().isDataDirty();
boolean df4 = AdfFacesContext.getCurrentInstance().getDirtyPageHandler().isDataDirty();
boolean df5 = am.getTransaction().isDirty();
boolean df6 = am.getDBTransaction().isDirty();
boolean df7 = bindingContext.getDefaultDataControl().isTransactionDirty();
boolean df8 = dcBindingContainer.getDataControl().isTransactionModified();
boolean df9 = dcBindingContainer.getDataControl().isTransactionDirty();
Start Application and perform a TAB switch without searching or changing anything
df1 true
df2 false
df3 false
df4 false
df5 false
df6 false
df7 false
df8 false
df9 false
Within a TaskFlow I perform a SEARCH and perform a TAB switch, flags change to following:
df1 true
df2 true
df3 true
df4 true
df5 true
df6 true
df7 false
df8 false
df9 false
I MODIFY values within TF and perform a TAB switch, flags remain same and regardless what I do, they remain so:
df1 true
df2 true
df3 true
df4 true
df5 true
df6 true
df7 false
df8 false
df9 false
Do you know a working approach?
Thanks in advance!

Hi,
its for when you leave a view, not when you switch task flows in a page. To get back to your question, one thing you forgot to mention is what data control state is it that the task flows have: shared or isolated? If they have a shared state then only a single transaction is on and you should be able to tell the dirty state by calling
boolean df2 = ControllerContext.getInstance().getCurrentRootViewPort().isDataDirty();
However, if the task flow is in isolated mode then you will need to get a handle to the data control frame used by that task flow.
BindingContext ctx = oracle.adf.controller.binding.BindingUtils.getBindingContext();
String frameName = ctx.getCurrentDataControlFrame();
DataControlFrame frame = ctx.findDataControlFrame(frameName);
boolean isDirty = frame.isTransactionDirty();
//see: http://docs.oracle.com/cd/E15051_01/apirefs.1111/e10653/oracle/adf/model/DataControlFrame.htmlHowever, this information is only available from within the task flow, which means to check this from the outside you need to provide a mechanism to get to this information (contextual events would be an option. You define a contextual event receiver on the task flows that when called checks the current transaction state and then "fires" the answer back to the caller, which then obtains a map of task flow transaction states to check before navigating away or switching task flows.
Frank
Edited by: Frank Nimphius on Apr 11, 2013 2:48 PM

Similar Messages

  • How to reset data when switching between two subforms

    I have two subforms that are either shown or hidden based on a radio button selection.
    If Radio Button "1" is selected, subform1 is visible and subform2 is hidden and  vice-versa.
    This is hard for me to explain, so please bear with me.
    What I want to do is to clear the subform fields if you switch back and forth between subforms.
    For example:
    1.     Click Button "1" (subform1 visible)
    2.     Fill in subform1 fields.
    3.     Click Button "2" (subform1 now hidden)
    4.     Click Button "1" (subform1 is visible and  fields are blank)
    I found the below script in another post for a similar problem. I put it as a "click" event for each Radio Button Item, but I'm not sure where it's supposed to go as the other post didn't say. It works but it clears the entire form, not just the subform fields.
    xfa.host.resetData("xfa.form.form1.subform1");
    Can anyone tell me the proper script to make my form work?
    Please keep it simple. The extent of my JavaScript knowledge is basically cut and past and hope it works. If it does work, it's by the grace of God only. I couldn't tell you the difference between a SOM and an node.
    So, if anyone has an answer, please dumb it down to about the level of a third grader.

    Paul,
    Thanks for responding.
    I'm still confused as to which field the script goes in and how to enter it in relationship to any existing script.
    Instead of me trying to explain verbally, I'll show you what I have.
    Document Hierarchy:
    Subform path & script: (I'm assuming I need one for each subform)
    xfa.host.resetData("xfa.form1.Page1.subform1");
    xfa.host.resetData("xfa.form1.Page1.subform2");
    "Radio Button List" Click Event script that shows/hides subforms:
    form1.Page1.FLOC.RadioButtonList::click - (JavaScript, client)
    if (this.rawValue == 1)
        Subform1.presence = "visible";
        Subform2.presence = "hidden";
    else if (this.rawValue == 2)
        Subform2.presence = "visible";
        Subform1.presence = "hidden";
    if (this.rawValue == 1)
        Efficiency.presence = "visible";
    if (this.rawValue == 2)
        Efficiency.presence = "visible";
    I've tried putting the script  inside the curly brackets, outside the curly brackets, at various locations within the above script, but no matter where I put it, it clears the entire form.
    Would you be so kind as to re-write the above script  properly so I can see what it's supposed to look like.
    Thanks!

  • Enforcing commit when switching between windows

    Today our OracleForms application is built using the call_form built-in. The end user can navigate from FormA to FormB but he must close formB in order to continue work in FormA. This is the expected behavior of the call_form built in. We also ensured that all changes are committed when navigating between forms; posting is not used. This architure/technique ensures that end-users commit frequently; with 400concurrent users we must ensures locking is kept to a minimum. Consequence of this architecture is that we do not have a full MDI application.
    In order to have a full MDI application I have to use the open_form built-in but if possible i want to keep 1 session for each application user, not 1 session for each form opened. This in order to prevent an explosion of database sessions. Oke lets use the no_session parameter.
    Now what's my problem ? I order to keep locking to a minimum I want to enforce the end user to commit changes when switching between windows. Does somebody has an advice which trigger(s) would be the most appropriate one ?
    Note : that the "raise form_trigger_failure" has no effect in the "when-window-deactivated" trigger.
    Note : post-form does not fire since I'am not actually leaving the calling form
    Note : if possible I would like to program the validation in the calling form instead of the called form; this in order to prevent switching between windows - can cause screen flikkering.
    chris

    note the when-window-deactivate does not always fire when switching between windows of different forms !!!
    I simply want to keep the focus on the calling form when there are pending changes and throw a message to the enduser saying 'please commit before continuing...'
    I tried to program the when-form-navigate trigger but in this trigger I'am not able to retrieve the form_status of the called form.
    any other help would be appreciated.

  • Forced to Close all open applications when switching between users.

    I recently purchased a MacBook Pro 13 inch, and have 2 accounts set up on the computer.
    When switching between users on the computer, I am always forced to close all open applications on the current user, in order to switch to another user.
    I was wondering if there was ANY way to keep the pages (specifically Safari) open when switching to another user, so that I can go back to them when I log back in to the other account.
    thanks for the help!

    Enjoy!
    http://docs.info.apple.com/article.html?path=Mac/10.5/en/8672.html

  • When switching between user accounts, the background desktop picture disappears and goes to just a blue background. Whats up with that?

    When switching between user accounts, the background desktop picture disappears and goes to just a blue background. Whats up with that?

    All fixed! It was TeamViewer that was causing the problem.

  • Error when switching between drafts: "The instruction at "0x009f6487" ...

    Running Contribute CS3 and get this error frequently when switching between documents in the Draft Console:
    The instruction at "0x009f6487" referenced memory at "0x06bd7a24". The memory could not be "read".
    Click on OK to terminate the program
    Click on Cancel to debug the program
    I do not get this error any other time. Only when editing multiple documents and switching between them. Clicking Save for Later on the toolbar, instead of clicking directly on the document in the Draft Console does not help.
    Any help or suggestions are much appreciated.

    Can you please try clearning the Contribute preferences?
    To Clear the preference, quit Contribute, and then delete the Contribute CS3 folder in C:\Documents and Settings\<user>\Local Settings\Application Data\Adobe\ and also run the following command " reg delete "HKCU\Software\Adobe\Contribute 4.1" /f " if you are using Contribute CS3. Reconnect to the site and try the same scenario.
    Note that, if you clear the preferences then no connection will be listed in Contribute, you need to recreate the connections. It will be like a fresh installation.

  • Dreamweaver 6.1 - JavaScript error when switching between open tabs

    When switching between open tabs a sequence of javascript
    errors occurs. I had not used Dreamweaver for about 2 weeks, and
    last time I used it with no problems.
    I have tried uninstalling it, OKing removal of all files when
    asked, re-installing it and updating with dwmx61_updater.exe, but I
    still get the same errors.
    This has rendered the software virtually unuseable, so any
    help would be greatly appreciated, as I'm working to a
    rapidly-approaching deadline.
    "While executing Browse_Back enabled in toolbars.xml, a
    JavaScript error occurred"
    followed by
    "While executing Browse_Forward enabled in toolbars.xml, a
    JavaScript error occurred"
    followed by
    "While executing Browse_Stop enabled in toolbars.xml, a
    JavaScript error occurred"
    The relevant code seems to be :
    <!-- Browser nav toolbar -->
    <toolbar id="Browser_Toolbar" platform="win"
    label="Browser Navigation" container="document"
    initiallyVisible="false">
    <button id="Browse_Back"
    image="Toolbars/images/MM/back.gif"
    disabledImage="Toolbars/images/MM/back_dis.gif"
    tooltip="Back"
    label="Back"
    enabled="dw.getDocumentDOM().browser.isCmdEnabled('back')"
    command="dw.getDocumentDOM().browser.backPage()"
    update="onEveryIdle"/>
    <button id="Browse_Forward"
    image="Toolbars/images/MM/forward.gif"
    disabledImage="Toolbars/images/MM/forward_dis.gif"
    tooltip="Forward"
    label="Forward"
    enabled="dw.getDocumentDOM().browser.isCmdEnabled('forward')"
    command="dw.getDocumentDOM().browser.forwardPage()"
    update="onEveryIdle"/>
    <button id="Browse_Stop"
    image="Toolbars/images/MM/stop.gif"
    disabledImage="Toolbars/images/MM/stop_dis.gif"
    tooltip="Stop"
    label="Stop"
    enabled="dw.getDocumentDOM().browser.getPageBusy()"
    command="dw.getDocumentDOM().browser.stopPage()"
    update="onBrowserPageBusyChange"/>
    <button id="Browse_Refresh"
    image="Toolbars/images/MM/browserRefresh.gif"
    tooltip="Refresh"
    label="Refresh"
    enabled="true"
    command="dw.getDocumentDOM().browser.refreshPage()"/>
    presumably the next error is caused by the previous ones
    failing :
    "While executing getCurrentValue in AddressURL.htm, a
    JavaScript error occurred"
    the relevan tcode :
    function getCurrentValue()
    var dom = dw.getDocumentDOM();
    var value = dom.browser.getURL();
    if (value && value.length)
    //check if is it not a temp file
    //extract the tail of the url
    var filename = value;
    var slashIndex = filename.lastIndexOf("/");
    filename = filename.substring(slashIndex+1);
    var tempIndex = filename.indexOf("TMP");
    if (tempIndex != 0)
    addRecentAddress(value);
    return value;

    You can try this simple fix -
    Quit DW.
    Find this folder -
    C:\Documents and Settings\<username>\Application
    Data\Macromedia\Dreamweaver
    8\Configuration\WinFileCache-*.dat
    (these folders are normally hidden - you may have to use
    Explorer > Tools >
    Folder Options to unhide them)
    and delete it.
    Restart DW. Works better?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "earthdoctor" <[email protected]> wrote in
    message
    news:[email protected]...
    > When switching between open tabs a sequence of
    javascript errors occurs. I
    > had
    > not used Dreamweaver for about 2 weeks, and last time I
    used it with no
    > problems.
    >
    > I have tried uninstalling it, OKing removal of all files
    when asked,
    > re-installing it and updating with dwmx61_updater.exe,
    but I still get the
    > same
    > errors.
    >
    > This has rendered the software virtually unuseable, so
    any help would be
    > greatly appreciated, as I'm working to a
    rapidly-approaching deadline.
    >
    >
    > "While executing Browse_Back enabled in toolbars.xml, a
    JavaScript error
    > occurred"
    > followed by
    > "While executing Browse_Forward enabled in toolbars.xml,
    a JavaScript
    > error
    > occurred"
    > followed by
    > "While executing Browse_Stop enabled in toolbars.xml, a
    JavaScript error
    > occurred"
    >
    > The relevant code seems to be :
    >
    > <!-- Browser nav toolbar -->
    >
    > <toolbar id="Browser_Toolbar" platform="win"
    label="Browser
    > Navigation"
    > container="document" initiallyVisible="false">
    >
    > <button id="Browse_Back"
    > image="Toolbars/images/MM/back.gif"
    > disabledImage="Toolbars/images/MM/back_dis.gif"
    > tooltip="Back"
    > label="Back"
    >
    enabled="dw.getDocumentDOM().browser.isCmdEnabled('back')"
    > command="dw.getDocumentDOM().browser.backPage()"
    > update="onEveryIdle"/>
    >
    > <button id="Browse_Forward"
    > image="Toolbars/images/MM/forward.gif"
    > disabledImage="Toolbars/images/MM/forward_dis.gif"
    > tooltip="Forward"
    > label="Forward"
    >
    enabled="dw.getDocumentDOM().browser.isCmdEnabled('forward')"
    > command="dw.getDocumentDOM().browser.forwardPage()"
    > update="onEveryIdle"/>
    >
    > <button id="Browse_Stop"
    > image="Toolbars/images/MM/stop.gif"
    > disabledImage="Toolbars/images/MM/stop_dis.gif"
    > tooltip="Stop"
    > label="Stop"
    > enabled="dw.getDocumentDOM().browser.getPageBusy()"
    > command="dw.getDocumentDOM().browser.stopPage()"
    > update="onBrowserPageBusyChange"/>
    >
    > <button id="Browse_Refresh"
    > image="Toolbars/images/MM/browserRefresh.gif"
    > tooltip="Refresh"
    > label="Refresh"
    > enabled="true"
    > command="dw.getDocumentDOM().browser.refreshPage()"/>
    >
    >
    >
    > presumably the next error is caused by the previous ones
    failing :
    >
    > "While executing getCurrentValue in AddressURL.htm, a
    JavaScript error
    > occurred"
    > the relevan tcode :
    >
    >
    > function getCurrentValue()
    > {
    > var dom = dw.getDocumentDOM();
    > var value = dom.browser.getURL();
    > if (value && value.length)
    > {
    > //check if is it not a temp file
    > //extract the tail of the url
    > var filename = value;
    > var slashIndex = filename.lastIndexOf("/");
    > filename = filename.substring(slashIndex+1);
    > var tempIndex = filename.indexOf("TMP");
    > if (tempIndex != 0)
    > {
    > addRecentAddress(value);
    > }
    > }
    > return value;
    > }
    >
    >

  • Legend behavior when switching between plots in graph.

    I am trying to plot two plots on a single XY graph. The user should be able to switch between the individual plots as well as showing them together. I do not use the Plot.Visible property but instead change Plot.Color to transparent to make sure the Y-scale keeps updating also when the plot is hidden. This works fine, but the Curve in the legend disappears for one of the graphs when it is hidden but not for the other one. I guess that the correct behavior is that they disappear but if it would be possible to make them both visible in the legend the entire time this would be desirable. I have made and attached a simplified VI of what I am trying to accomplish.
    Any ideas about what the problem is and how I could solve it?
    Thanks,
    Johan Gustafsson
    Attachments:
    Prototype_Plot_Switch1.vi ‏31 KB

    Hi,
    i'd changed a little bite your code. Cause if you set the line color to transparent, the legend must also be transparent. So, I think that you can't go that way.
    See my approach.
    Software developer
    www.mcm-electronics.com
    PS: Don't forget to rate a good anwser ; )
    Currently using Labview 2011
    PORTUGAL
    Attachments:
    Prototype_Plot_Switch1 changedvi.vi ‏24 KB

  • Getting the spinning wheel when switching between accounts

    Hi all,
    I am getting the spinning wheel when switching between accounts on a mac mini. There are two accounts and quite often when we go from one to the other we get the spinning beachball after putting in the password to log in. I am finding the only real solution to be is to put the machine to sleep (button at the back for a sec or two) wait for it to go to sleep and then wake it up and it mostly will then log in and keep working.
    It's an older intel dual core mac mini with an upgraded HDD. I previously had an iMac running snow leopard where the same problem occured and recently migrated over the account to the mini running Lion. It seems to be happening more often.
    I also seem to remember that occasionally when using say Pages you would get the spinning beachball and then you would have to hit the desktop or go to another program and then back to pages to get it working again.

    Does it occur no matter which way you're going say? i.e, both from
    User 1 -> User 2
    User 2 -> User 1
    If its only one way, have a look at the 3rd party loginitems for the account your going to. If its both ways, see what 3rd party loginitems both accounts have in common. The best (though time consuming) way to eliminate the culprit is to remove all 3rd party apps from loginitems and add them in one at a time, testing for the problem each time.
    If you get the BSOD while actually logged in (say, while using Pages), try running activity monitor (or use terminal.app with the command 'top -u' (without the quotation marks)), and see if you can notice any process running at more than 30%CPU.

  • Graphic distortion when switching between external and built-in display (rMBP)

    Recently (within the past two weeks or so) I've noticed a strange issue when switching between my external display (Thunderbolt) and my built-in display on my 15" rMBP. The following issue seems to be specific to Photoshop CS6.
    Typically, I'll have a PS document open on my external display and I'll wind up taking my to another location. If I close the PS document while on my built-in and then re-open it, I get all kinds of distortion and pixellation. Closing out PS and reopining, restarting, logging on/off; none of it seems to work. It seems like the issue is with the PSD itself, but it doesn't make any sense to me. Any ideas? Screenshot: http://i.imgur.com/iCipSc7.jpg

    Do you have intel gpy as well as other graphic card?  You may be viewing document on different gpu's.  PS does not like multiple gpu's.

  • How to keep location in a table persistent when switching between pages

    Hi -
    How would I keep my last location persistent in a table when switching between pages? If I am on cell X and switch to another page, when returning to the previous page, I return to the top of the table. This can be very annoying when trying to find the same location in a large table (or even in a small one).
    Thanks.

    If by "page" you mean "sheet", you can do it. To get back to the same place you were in the other sheet, click on the sheet in the sidebar (the list of sheets/tables/charts/etc on the left). Don't click on the table, click on the sheet.

  • Auto show/hide Plug-in when switching between patches in Mainstage 2

    Hi, I was wondering if there is a way to have Mainstage 2 automatically reveal a plug-in when switching between patches. For instance, when switching to a Clav patch, have it reveal the EVD6 plug-in. Then, if you switch to a Rhodes patch, it automatically closes the EVD6 and reveals the EVP88.

    As far as I know, no. I haven't found a way to do this. It would be useful in certain setups.

  • Hanging when switching between programs?

    Is there a soluton to programs hanging when switching between one program to another?

    Safe Mode deletes some system caches that may help..
    Startup your Mac in Safe Mode
    A Safe Mode boot takes longer than a normal boot so be patient.
    Once you are in Safe Mode, click Restart from the Apple () menu then try switching between applications.

  • Yosemite 10.10.1 - DNS cache does not clear when switching between WiFi networks

    Before updating to Yosemite, DNS caches would clear when switching between WiFi networks, as they should.
    For Example, when using an Exchange server, your server name might be something like mail.company.com. Outside of the corporate LAN the IP would resolve to the outside (WAN) address. When you move the laptop inside the corporate LAN, it should clear the cache so mail.company.com resolves to the internal (LAN) address.  This is just one example of a dumb DNS transition not taking place switching from outside to inside (and vice versa).
    Instead, OS X is holding onto the outside DNS record even when moving to the Corporate LAN. The only way to fix is to run the DNS cache command (which is MUCH more convoluted in Yosemite now), or more easily, to quickly turn off then turn on WiFi.
    This is an irritation as I have to perform this action every morning, and every time I come back to my desk from offsite.

    Well, clearing the caches is as simple as this, no?
    Clear MDNS Cache
    sudo discoveryutil mdnsflushcache
    Clear UDNS Cache
    sudo discoveryutil udnsflushcaches
    One other thing: Have you tried 10.10.2? There are many many fixes in 10.10.2 over 10.10.1.

  • Music pauses on my iPhone 5C when switching between apps or when receiving alerts/notifications sometimes (not always) and I have to manually restart the song. I'm running the latest 7.0.1 software. It's a bit annoying.

    Music pauses on my iPhone 5C when switching between apps or when receiving alerts/notifications sometimes (not always) and I have to manually restart the song. I'm running the latest 7.0.1 software. It's a bit annoying.

    I have had a similar problem with my system. I just recently (within a week of this post) built a brand new desktop. I installed Windows 7 64-bit Home and had a clean install, no problems. Using IE downloaded an anti-virus program, and then, because it was the latest version, downloaded and installed Firefox 4.0. As I began to search the internet for other programs to install after about maybe 10-15 minutes my computer crashes. Blank screen (yet monitor was still receiving a signal from computer) and completely frozen (couldn't even change the caps and num lock on keyboard). I thought I perhaps forgot to reboot after an update so I did a manual reboot and it started up fine.
    When ever I got on the internet (still using firefox) it would crash after anywhere between 5-15 minutes. Since I've had good experience with FF in the past I thought it must be either the drivers or a hardware problem. So in-between crashes I updated all the drivers. Still had the same problem. Took the computer to a friend who knows more about computers than I do, made sure all the drivers were updated, same problem. We thought that it might be a hardware problem (bad video card, chipset, overheating issues, etc.), but after my friend played around with my computer for a day he found that when he didn't start FF at all it worked fine, even after watching a movie, or going through a playlist on Youtube.
    At the time of this posting I'm going to try to uninstall FF 4.0 and download and install FF 3.6.16 which is currently on my laptop and works like a dream. Hopefully that will do the trick, because I love using FF and would hate to have to switch to another browser. Hopefully Mozilla will work out the kinks with FF 4 so I can continue to use it.
    I apologize for the lengthy post. Any feedback would be appreciated, but is not necessary. I will try and post back after I try FF 3.16.6.

Maybe you are looking for