Unsaved data handling in ADF

Hi All,
Is there any way to warn the user about unsaved data when the user navigates to some other page from the current page (wherein unsaved data exist), out of the box in ADF?

Hi,
what is "another page" ? Is it another page in the same application, or a page outside of it ? You should be able to check the state of the AM transaction, calling isDirty() to check whether there is uncommitted data. This could be done in a PhaseListener. However, when the user navigates off the application then chances are not good you catch this
Frank

Similar Messages

  • How to handle unsaved data in portal through webdynpro ABAP ?

    Hi Experts ,
         I  need to handle unsaved data in SAP Enterprise Portal through webdynpro for ABAP . I got a sdn link which explained some code for this..
    http://help.sap.com/saphelp_nw70/helpdata/EN/45/b76f4169e25858e10000000a1550b0/frameset.htm
    I tired to implement this in EXIT method of the view. but im not able to get this . Can any one help me in this ? .
    Regards ,
    Kalpana .

    Hi ,
    Yes i have checked the code . But the example itself not working when i linked the same with portal . If EXIT is not the right method , Can you help in placing the code in right method ? The code i pasted in EXIT method is 
    data L_COMPONENTCONTROLLER type ref to IG_COMPONENTCONTROLLER .
    data L_API_COMPONENTCONTROLLER type ref to IF_WD_COMPONENT.
    data L_PORTAL_MANAGER type ref to IF_WD_PORTAL_INTEGRATION.
    L_COMPONENTCONTROLLER =   WD_THIS->GET_COMPONENTCONTROLLER_CTR( ).
    L_API_COMPONENTCONTROLLER = L_COMPONENTCONTROLLER->WD_GET_API( ).
    L_PORTAL_MANAGER = L_API_COMPONENTCONTROLLER->GET_PORTAL_MANAGER( ).
    call method L_PORTAL_MANAGER->SET_APPLICATION_DIRTY_FLAG
      exporting
        DIRTY_FLAG = ABAP_TRUE .

  • 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

  • Populate BAM data object through adf form.

    I want to populate a BAM data object using adf form as we do in case of database table by creating a data control. How to do this?

    Hi Simanta
    1. I am seeing lot of posts from you regarding this Java to BAM Data Objects integration.
    2. What exactly are you trying to do. Dataobjects are very tightly coupled with actual Database component that is used to create that like Table or View etc.
    3. Best way is. Create a data object. Export that DataObject using "icommand". See docs for this command usage.It generate a pure .XML file with all the details like DataObject name, external referenced Database details (datasource name), external Table or View details. Then mapping for EACH column on this object and that database stuff. Just see the xml file, Its pretty straight forward. When you Export Reports also, it creates an XML File exactly like this only but with more details like all column Formatting information etc etc. Export one Report also and see that xml 4. file.
    4. Both above XML Files are stored in ORABAM Schema. Tables of interest are :SysIterDataset, SysIterParameter, SysIterParameterValue, SysIterReport etc.
    5. Oracle do NOT expose any Public APIs to handle above stuff. But if you really really want, you can always manipulate XML content and reload to those columns any time. Need to add few query parameters to get exact row like ReportId, or DataObject Id which are just PKs etc.
    Still, I am curious why and what is the usecase where you want to do all this from Java code. Because DataObject is a one time thing. And note that it is used in Report. So if you modify data object like remove a column, then Report will die.
    By the way, all the WebServices exposed may be for ReadOnly purposes. I am not sure if you have services to modify them.
    Thanks
    Ravi Jegga

  • Confirm Dialog on Closing Web Application with unsaved data?

    Hi all,
    I am searching for best-practices or official solutions for implementing the following functionalty:
    User is trying to close the browser window or tab (Mozilla Firefox) by hitting the "X". We need to ask him if he is sure cause there might be unsaved data.
    The only solution we now see is the following:
    - event "onbeforeunlad":
    window.onbeforeunload = function (oEvent) {
      oEvent.returnValue = 'Sure? Unchanged data might be lost'
    Problem is that this event also runs, when youre navigating in the analysis item, e.g. expanding a hierarchy. You have to switch it of for every single Item with onmouseover and switch it on again later.
    And further on: It still has to be bound to the data... if data hasn't changed, it shouldnt pop up.
    Question: Are there any official suggestions from SAP? Seems to be a standard requirement. If not, do you know any better solutions for implementing this functionality?
    Thanks in advance for your help,
    Michael

    try capturing the onBeforeUnload event and display a modal confirmation dialog asking the user if he really wants to navigate away from the page; and warning him that if he does so, all the changes he made hitherto will be gone.
    However, you need to handle this intelligently since you need to identify if any fields in the form have changed and only then warn the user to confirm his decision to go away from this page.
    You can do this by having a flag which is initialized to false but when onBeforeUnload event is fired, you would check if any of the form fields in the page have changed by iterating over each and every form field,and then setting the flag to true if some thing changed
    the onBeforeUnload Handler will always return this flag, if it is true, you will get this confirmation popup, else the page will go away. To show a customized confirmation dialog, perhaps you would have to invoke the custom dialog call from with in the onBeforeUnload handler. When the user says yes, return false;else true.

  • My computer crashed.    How do I sync with a new computer without losing unsaved data?

    My computer crashed.    How do I sync with a new computer without losing unsaved data?

    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    For items you cannot get the above way use a third-party utility such as Phone to PC

  • How to get selected row data of an ADF table in HashMap?

    Hi,
    Can anyone please tell me how to selected row data of an ADF table in HashMap like :
    Object obj = pageTable.getSelectedRowData();
    JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)obj;
    Now in above code I want the convert rowData in HashMap.
    Can anyone please tell me how to do that? Its urgent.
    Thanks,
    Vik

    Vik,
    No need to ask the same question 3 times...
    In [url http://forums.oracle.com/forums/message.jspa?messageID=4590586]this post, Nick showed you how to get the Row.
    If it were so urgent, you could have done a little reading of the javadocs to come up with code like this (not tested, up to you to do that)
    HashMap m = new HashMap();
    Row r = get it like Nick showed you to;
    Object values[]=r.getAttributeValues();
    String names[]=r.getAttributeNames();
    for (int i=0; i<r.getAttributeCount(); i++)
    m.put(names, values[i]);

  • Exception Handling in ADF

    Jdeveloper version 11.1.1.5.0
    Use Case :
    My application has :- 1 Jspx page ( testPage.jspx ) , 1 taskflow ( testExceptionFlow.xml ) , 1 pageFragment ( testOperation.jsff ).
    I have employee table dragged as table on testOperation.jsff with 4 buttons :
    1. Delete - Executes the VO's Delete action.
    2. Commit - AM's commit operation ( through datacontrol )
    3. CustomDeleteAndCommit - One method in VOImpl which deletes the currentRow and calls this.getDBTransaction().commit() method.
    4. CustomCommitThroughBean - Action listener in beans calls the commit through operation binding.
    I have secured my application and create two users in jazn.xml User1 and User2. Now both users are logged in to the application using different browser.
    Both users can see employee with empId 100.
    User1 selects a employee with empId 100 and clicks Delete button. Further clicks Commit button.
    User2 selects the same employee with empId 100 and clicks Delete button. Further he can choose to commit through different options :
    a) Commit
    b) CustomCommitThroughBean
    OR
    CustomDeleteAndCommit
    Obviously there will be jboException stating that row is already delete. When I am calling it through CustomCommitThroughBean operationBinding.getErrors() has errors, so I don't see error on UI.
    I see a couple of posts about different ways of handling Exception :
    [Using Exception Handler in an ADF Task Flow | https://blogs.oracle.com/ADFProgrammers/entry/using_exception_handler_in_an]
    [Extending the ADF Controller exception handler | https://blogs.oracle.com/jdevotnharvest/entry/extending_the_adf_controller_exception_handler]
    [Task Flow Exception Handler | http://adfpractice-fedor.blogspot.com/2011/12/task-flow-exception-handler-you-must.html]
    [Exception Handling in adf (Part 1) | http://adfwithejb.blogspot.com/2012/05/exception-handling-in-adf-part-1.html ]
    Which method of exception handling is applicable should be chosen ?
    I just want to notify user about exception through some custom message and table should get refreshed for further operation.
    My observations :
    I get an error dialog in case :
    Commit & CustomDeleteAndCommit
    whereas no default error in case : CustomCommitThroughBean
    I have uploaded my application [here | http://dl.dropbox.com/u/70986236/BlogApplication/OperationBindingExecuteErrorApp.zip ] . Want to implement exception handling in this application.
    Thanks,
    Rajdeep
    Edited by: Rajdeep on Jul 26, 2012 9:45 PM

    When you invoke an operation programmatically through an ADF OperationBinding, the eventual exception is not thrown to you but it is reported to the BindingContainer and the BindingContainer automatically adds a FacesMessage of ERROR severity to the FacesContext. If you have an <af:messages> tag in your ADF Faces page, this error message should be displayed automatically.
    Dimitar

  • Date Format in ADF

    How can i set Date format for Input Date Field in ADF ,I am using JDeveloper 11

    You can try using a domain for all your date fields.
    I'm not sure how to wire up this in the UI but I guess it's possible.
    If you just want the format the UI part for all dates, you can use a converter for every dte files and read the pattern for the converter from a bean via EL.
    Timo

  • Missing Article: Warning of Unsaved Data Functional Pattern

    Hi
    I bookmarked an article a while back which showed a functional pattern for warning of unsaved data when navigating away from a page.
    However, now that I need to investigate and impliment this the link is broken.
    Does anybody have the new link, link to a similar article / blog?
    Thanks,
    Mario

    Hi,
    if you are on a recent version of JDeveloper 11g then this functionality is provided out of the box. Also have a look at the af:document tag on your pages. It has a property "uncommittedDataWarning" you can set to on or off so this functionality is present event for single pages
    Frank

  • Plan data handling profile

    Dear Gurus,
    There is a customzing point under Project System -> Costs -> Planned Costs -> Maintain plan data handling profile.
    Does anyone have any idea about:
    - where can it be used?
    - what is it used for?
    I was looking for any tool which makes plan figures on WBS elements out of purchase orders and I found this but there is no info at all, no where.
    Thanks in advance,
    Jeno

    This profile is aimed to be used in transaction AD31 (and associated Tcode AD32). Those belongs to an add-on of IS A&D solution.
    The purpose is to provide a functionality to calculate the plan cost at completion by adding the actuals costs (including or not the commitments form PO and/or PR) to the cost to complete entered in a specific planning version.
    This functionality can also be used to calculate the cost to complete by calculating the difference between the plan costs at completion stored on a dedicated planning version, and actuals costs (including or not the commitments form PO and/or PR).
    As SAP provides, independently, the possibility to copy actual to plan, the profile gives the flexibility to calculate the cost to complete by adding 2 planning versions.

  • Date Format in ADF BC + Customization + JDev 10.1.3.3

    Hi,
    Currently we are specifying the date format in ADF BC EO component as MM/dd/yyyy for each attribute which is taking too much time.Specially when we do regionwide deployment of application where date format very specific,then again we need to go to each component and change the format which is nothing but re doing the same work
    Is there common place I can specify the default date format is MM/dd/yyyy for the attributes which has type of date irrespctive of the EO.?
    please advice.
    thx

    Not that I know in ADF BC
    JHeadstart allows it by specifying the Date format in one file "dateformat.properties" where you can specify date formats common to all Date and DateTime attributes in an application:
    dateclass=java.sql.Date
    datetimeclass=java.sql.Timestamp
    datepattern=dd/MM/yyyy
    datetimepattern=dd-MMM-yyyy HH:mmRegards,
    Didier.

  • Data handling issue

    The problem is that my application receives sterilized java object in zip format from third party system then my application can update into DB2 tables in a given time frame (max 1 min). This results into a buffer overflows which implies that data are discarded due to buffer size limit. Every min, my application receives the data from third party.
    At present, application data handling is implemented in queuing mechanism. Application expected to handle 100000 java objects per min. Do you have any idea to implement the solution for above issue.
    At present I have an idea to implement virtual table (array list) and keep the data into memory..use it after 1 min. required your valuable input.

    831403 wrote:
    The problem is that my application receives sterilized java object in zip format from third party system then my application can update into DB2 tables in a given time frame (max 1 min). This results into a buffer overflows which implies that data are discarded due to buffer size limit. Every min, my application receives the data from third party.
    At present, application data handling is implemented in queuing mechanism. Application expected to handle 100000 java objects per min. Do you have any idea to implement the solution for above issue.
    At present I have an idea to implement virtual table (array list) and keep the data into memory..use it after 1 min. required your valuable input.My valuable input: Re-read your own question and try again. What do you actually want? What you've written is totally incomprehensible.
    Question: What is a "sterilized" object? I'm familiar with several euphemisms, but that's a new one on me.
    This for nothing:
    1. Simply reading 100,000 objects could take a reasonable percentage of your 1 minute, let alone marshalling and then sending them to a database for update. This suggests to me that your solution isn't scalable.
    2. Buffer overflows (if that's indeed what it is; you haven't supplied an exception) are a result of bad programming. Find the bug, and fix it.
    Winston

  • Data handling tool

    plz enlist  data handling tools in labview?

    What do you mean by data handling?  What exactly are you trying to do?
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Data Binding in ADF UIX example trouble

    Two related questions:
    From the help example 3. Data Binding in ADF UIX example trouble in JDeveloper on UIX. If this worked I was going to run a small java class that captures the login and passes it as a messagebox with a Welcome login name on the first page, but I can't get past the example and path problems.
    From the example..."
    package yourpackage;
    import java.util.Date;
    public class CurrentDateBean
    public CurrentDateBean() { }
    public String getTime()
    return (new Date()).toString();
    Now, we want to change the page so it uses getTime(). We need to do three things: Tell UIX to data bind the text attribute. Add a <dataScope> to the page to provide data to the content. Write a small "data provider" in Java that can access the bean. First, we'll data bind "text": <text xmlns="http://xmlns.oracle.com/uix/ui"
    text="${uix.data.currentDate.time}"/>The example has one small change. The value is changed to ${uix.data.currentDate.time}, which is an expression that defines the data. This is shorthand for "get the time property from currentDate." If you tried running this example, you'd see nothing. That iss because we haven't given currentDate to the page, so the databinding failed, and the "text" is left to null. We do this by adding <dataScope> to the page: <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
    <provider>
    Q#1?? Trying to follow the demo. The method class and method name do not seem to match the names in the above class from the demo. Am I missing a point here, please help.
    <data name="currentDate">
    <method class="yourpackage.DataDemo" method="getCurrentDate"/>
    </data>
    </provider>
    <contents>
    <text text="${uix.data.currentDate.time}"/>
    </contents>
    </dataScope>
    Q#2?? When I try and apply the demo class to my home.uix XML file with
    "<?xml version = '1.0' encoding = 'windows-1252'?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40" expressionLanguage="el">
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
    <provider>
    <!-- start Add DataProviders (<data> elements) here -->
    <data name="currentDate">
    <method class="us.mn.state.dot.apptrack.security.CurrentDateBean" method="getTime()"/>
    </data>
    <!-- end Add DataProviders (<data> elements) here -->
    </provider>
    <contents>
    <text text="${uix.data.currentDate.time}"/>
    <document>
    <metaContainer>"
    I get the following, and I don't know how to make the UIX XML accept the correct path, please help:
    �file:/C:/JDeveloper905p/jdev/mywork/ProjTrack/AppTrack/ViewController/public_html/home.uix: Parsing error, line 12, column 97: Could not find class us.mn.state.dot.apptrack.security.CurrentDateBean

    for question 1 the name of the class CurrentDateBean
    actually has nothing to do with the el expression
    uix.data.currentDate.time. The currentDate part of the
    el expression is coming from the method data provider part
    of your page:
    <data name="currentDate">
    <method class="yourpackage.DataDemo"
    method="getCurrentDate"/>
    </data>
    so if you changed the name of the data provider to "foo":
    <data name="foo">
    <method class="yourpackage.DataDemo"
    method="getCurrentDate"/>
    </data>
    your el would look like this:
    uix.data.foo.time
    by the way the uix.data part tells UIX to look for
    a <data> element define in the <provider> section of
    your dataScope.
    For question #2, do you have the java file
    us.mn.state.dot.apptrack.security.CurrentDateBean on
    your classpath and is it compiled? You will get that
    warning if it is not on your classpath.
    Also you are incorrectly interpreting the example. What
    you are doing is trying to reference the actual bean
    object and its getTime() method. What you want to do
    is write a method data provider that returns your
    CurrentDataBean. so uix.data.currentDate would return
    a CurrentDateBean instance object. the .time part of the
    el expression would tell UIX to look for a method named
    getTime() and use that value.
    let me know if you have any more questions.

Maybe you are looking for

  • Combine two select statements in one SQL statements

    I have the following two queries that I need to combine into one query, where it updates a single row at the same time. SELECT count(*) FROM database.USAGE WHERE SERVICE_TYPE = 'C' AND ACCOUNT = "4837" SELECT sum(minutes) FROM database.USAGE WHERE SE

  • Licensing requirement in VMs & downgrading WS2012 to WS2008

    Need clarity on few licensing requirements that we have - Background - We have purchased WS 2012 SE licenses for one of our client. Few of client applications are supported only on WS 2008 environment. As per our setup, we had planned for few VMs alo

  • Excel 2010 does not close

    Excel doesn't close correctly when I hit the X on the top right. When I click the X the Excel window is still open but the workbooks are gone. I can still control the window and resize/minimize/etc. Task manager says the program is running. CPU usage

  • Development or Deployment Configuration Management

    Forte Users: I have been using Forte for awhile and have experienced various levels of pleasure and pain with regard to configuration management. I have been witness to various strategies for keeping things clean and smooth. I was at Forte Forum to h

  • Error in getting value after rule execution

    hi, in the application we have a particular way to calculate the periodic value which is current accumulated - prior accumulated. now the problem is that for the current month the acccumulated value for a particular account has not been fed in the sy