State and StateManager

hi,
I am comfused a bit about the state and its maintenance by the state manager. Here is the scenario that I have
In the evenResult when there is an event fired for the FIRST TIME I am creating a mutable state and setting some values to my state.
the next time when the even is fired if the state is availabe I am cloning the previous state and make it a mutable state and sending the same state back with some more values being set the second time. I did this some 20 times and then I tried to hit back button.
By the time I hit back 10 times the queue maintained by the StateManager is null.
Each time I hit back button the event is fired again becuz the url that is returned has the event appended to it. Thus instead of having the 20 states I have only 10 states......surprisingly the browser is caching the pages and by hitting back button it is, as a matter of fact returning the state of the page at that instance. But in the error log I get the state as NULL after 10 back hits. So is the state available at all?? If "yes" is there a way that I can get that state??
can we control the event when we hit the back button..logically its not an event invoked by hitting any submit button right!!!
I 've read the UIX controller section but couldn't extract this information for the notes provided in the guide.
I have a faint idea of what might be going on but am not quite convinced. Could any body please explain to me what is actually happening with the state and the StateManager.
regards,
vasanth

As I've read a little more and experimented a little, I now see two patterns and two philosophies about dealing with the browser navigation buttons here. Please correct me if my understanding is wrong:
Using a Struts-style token, if the user submits a form and then hits back, they will get an error page. If the request is re-submitted with the back navigation, the server checks the token and, finding it no longer matches the current session token, redirects to an error page. Here the goal is decidedly not to support back navigation.
I actually wound up implementing another pattern, where, instead of checking all tokens against a single valid session token that is updated with each request, I put a new token on each page render, and keep a list of which tokens have already been used or not. This way, if the user hits back, the event is re-fired, but the event handler sees that the token has already been used, and doesn't process the event. This prevents the State from being updated again, allows the user to see the page, and even allows them to make new selections and resubmit the page if they like. It will have been rendered with a new token, so the new submit is processed.
I can see uses for both patterns. Obviously, some submits should only happen once. You only want your credit card charged once. But what if you have a page with several tabs and you're maintaining the state of an object tree that gets updated as the user navigates the tabs? It seems there's no harm in letting the user hit back, which -- using UIX's State object -- acts as a kind of Undo, and allowing them to continue to edit the state from there.
So now I have three questions:
1) Is there support for a Synchronizer Token in UIX? If so, how?
2) If the goal of the State object is to allow using Back as an Undo (which is what the documentation suggests), don't you /need/ some kind of token pattern like I've suggested to keep the event from being handled again and thereby creating a /new/ State, as indicated by Vasanth's original post?
3) I'm now even more confused about how to manage the state than before. Struts and UIX seem to suggest opposed approaches here. Any comments/opinions/experience on why/when to use one or the other?

Similar Messages

  • Error in updating OBNK Table ( Bank Statements and Reconciliations,Manual)

    PLease advise ,
    Bank Statements and Reconciliations,Manual Reconciliation
    Client is receiving the following message:
    Error in updating OBNK Table
    Edited by: Philip Eller on May 20, 2008 9:03 AM

    Hi Darpal Thiarha,
    Please kindly refer to note 1132591 and note 1128677 to see if these are relevant to this issue. Upgrading to  2007A PL15 or above may avoid such issues relevant with the error 'Error in updating OBNK Table'.
    Regards,
    Candice Ren
    SAP Business One Forums Team

  • DAX - IF statement and filters within calculated column

    Hi all,
    I've got a bit of a complex formula I'm trying to run, but I'm not quite there yet.  I don't know where/how/if I can place a filter within my IF statement for a calculated column due to so many variables.  I either get errors or wrong numbers. 
    Hope the following makes sense. 
    Here is my formula for the calculated column [Years Since Last Task]:
    =IF (ISBLANK([Last Task Date]) && ([Current Role]<>BLANK()), DIVIDE([Quarters],4), FLOOR(1. * ( today() - [Last Task Date]) / 365, 0.25))
    Problem:  I am getting "114.25" for Ken....but I want a blank result instead.  Meaning, I need to also filter out any name (row) who has a blank [Current Role].  How do
    I add a filter to this current formula?  Is one more step of filtering possible in this IF statement?  (Maybe I shouldn't use an IF statement, and try CALCULATE instead?)
    Below is the table 'Work' for you to see what's happening.
    Name
    Quarters
    Last Task Date
    Current Role
    Years Since Last Task
    John
    1
    1
    0.25
    Mike
    4
    2/7/2011
    3
    3
    Todd
    5
    4/20/2009
    4
    5
    Jeff
    9/1/2013
    3
    0.5
    Ken
    0
    114.25
    Steve
    2
    12/3/2011
    2
    2.25
    Nate
    2
    1/1/2014
    2
    0.25
    Greg
    1
    8/11/2013
    1
    0.5
    Ross
    4
    11/9/2010
    4
    3.25
    Hope all this made sense.  Let me know if you have any thoughts.
    Thanks,
    ~UG1

    you can use nested IF-statements here:
    =IF (ISBLANK([Current Role]),
    BLANK(),
    IF(ISBLANK([Last Task Date]),
    DIVIDE([Quarters],4),
    FLOOR(1. * ( today() - [Last Task Date]) / 365,0.25)
    hth,
    gerhard
    Gerhard Brueckl
    blogging @ http://blog.gbrueckl.at
    working @ http://www.pmOne.com

  • Closing Statements and ResultSets

    I just recently realized that you need to close Statements and ResultSets in order to avoid getting the "Too many cursors"-message.
    My question is:
    Do you need to close both Statements and ResultSets?
    - not that it's a problem...
    if so:
    Does it matter which one you close first?

    I usually place the stmt.close() code in my finally block, to ensure that the statement gets closed, even if a SQLException occurs during the query/update. The ResultSet does not explicitly have to be closed, ... it is automatically closed when the Statement is closed, or if a new query is run on the same statement.

  • JDBC: Closing Connection does it close statement and resultset

    In my application I am facing ORA-0100 Maximum open cursors exceeded problem. We are executing quite a few queries and stored procedures before we close the connection object. But in few places statements and resultsets are not closed. Can these be a problem? Shouldn't they be automatically closed when the connection is closed?
    We are executing this block of code in a loop.

    in few places statements and
    resultsets are not closed. Can these be a problem?Yes.

  • Urgent:Difference amount in customer a/c statement and customer ledger bal

    Currently I am facing a problem whererby the same customer  having the same variable - cutoff giviing  me 2 different sets of figure.
    1)Using the statement of account  - cutoff as at 31 Oct 07, gives me ending figure of  -$658,526.98 (Attached file for your reference)
    [2)Using the FBL5N - the same customer cutoff as at 31 Oct 07, gives me ending figure of -$658,629.98
    So the difference figure is 103. so where can i check exactly.
    I have checked with the details  from the 2 different report , everything is inside, but the total using the 2 report - statement and FBL5N gives 2 different total.

    Hello,
    The amount diff. fr Stat. to FBL5N due to some reasons:
    1. Customer statement may or may not have similar slection critieria to FBL5N
    2. Check once other selection while executing the statement
    Regards
    partha
    [email protected]

  • I need to know all the questions below.  I had to restore my computer to original state and now even if I sign on it won't let me sync my ipad or iphone.  the message is that it is synced to another library and it could wipe out my data on the ipad.

    I need to know all the questions below.  I had to restore my computer to original state and now even if I sign on it won't let me sync my ipad or iphone.  the message is that it is synced to another library and it could wipe out my data on the ipad.  Am I understanding correctly? I am running Windows 7 but have never had any problems.  Thanks

    You need iTunes on the computer. There is no iTunes for your phone. See:
    Locked Out, Forgot Lock or Restrictions Passcode, or Need to Restore Your Device: Several Alternative Solutions
    1. iOS- Forgotten passcode or device disabled after entering wrong passcode
    2. iPhone, iPad, iPod touch: Wrong passcode results in red disabled screen
    3. Restoring iPod touch after forgotten passcode
    4. What to Do If You've Forgotten Your iPhone's Passcode
    5. iOS- Understanding passcodes
    6. iTunes 10 for Mac- Update and restore software on iPod, iPhone, or iPad
    Forgotten Restrictions Passcode Help
    You will need to restore your device as New to remove a Restrictions passcode. Go through the normal process to restore your device, but when you see the options to restore as New or from a backup, be sure to choose New.
    Also, see iTunes- Restoring iOS software.

  • Questions on Xontrol--H​ow to update the state and data

    Hello, everyone. I am new to use the XControl. I don't understand how the program in the facade update the "state" and "Data" after we click the button. I cannot do that, please give me some help on the XControl.
    My vi is in the attachment.
    Message Edited by McArthur on 03-24-2010 02:19 AM
    Working...
    Attachments:
    Button.zip ‏51 KB

    McArthur wrote: Now I understand the reason why the state can not update, because I didn't do as TCPlomp mentioned. It seems working now....
     I mentioned this too, however without a pretty picture.
    quote: 
    When you modify data or state, you need to update the action cluster to indicate that fact.
    McArthur wrote: The example is just a dummy, not really make sense.
    The example is really quite good and shows these things too as well as many other important points. Please try to fully understand it. 
    I would strongly advise you to also look at my other suggestions. You still haven't explained the purpose of the xcontrol. I am still curious.  
    LabVIEW Champion . Do more with less code and in less time .

  • Bind Variable in SELECT statement and get the value  in PL/SQL block

    Hi All,
    I would like  pass bind variable in SELECT statement and get the value of the column in Dynamic SQL
    Please seee below
    I want to get the below value
    Expected result:
    select  distinct empno ,pr.dept   from emp pr, dept ps where   ps.dept like '%IT'  and pr.empno =100
    100, HR
    select  distinct ename ,pr.dept   from emp pr, dept ps where   ps.dept like '%IT'  and pr.empno =100
    TEST, HR
    select  distinct loc ,pr.dept   from emp pr, dept ps where   ps.dept like '%IT'  and pr.empno =100
    NYC, HR
    Using the below block I am getting column names only not the value of the column. I need to pass that value(TEST,NYC..) into l_col_val variable
    Please suggest
    ----- TABLE LIST
    CREATE TABLE EMP(
    EMPNO NUMBER,
    ENAME VARCHAR2(255),
    DEPT VARCHAR2(255),
    LOC    VARCHAR2(255)
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (100,'TEST','HR','NYC');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (200,'TEST1','IT','NYC');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (300,'TEST2','MR','NYC');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (400,'TEST3','HR','DTR');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (500,'TEST4','HR','DAL');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (600,'TEST5','IT','ATL');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (700,'TEST6','IT','BOS');
    INSERT INTO EMP (EMPNO,ENAME,DEPT,LOC) VALUES (800,'TEST7','HR','NYC');
    COMMIT;
    CREATE TABLE COLUMNAMES(
    COLUMNAME VARCHAR2(255)
    INSERT INTO COLUMNAMES(COLUMNAME) VALUES ('EMPNO');
    INSERT INTO COLUMNAMES(COLUMNAME) VALUES ('ENAME');
    INSERT INTO COLUMNAMES(COLUMNAME) VALUES ('DEPT');
    INSERT INTO COLUMNAMES(COLUMNAME) VALUES ('LOC');
    COMMIT;
    CREATE TABLE DEPT(
    DEPT VARCHAR2(255),
    DNAME VARCHAR2(255)
    INSERT INTO DEPT(DEPT,DNAME) VALUES ('IT','INFORMATION TECH');
    INSERT INTO DEPT(DEPT,DNAME) VALUES ('HR','HUMAN RESOURCE');
    INSERT INTO DEPT(DEPT,DNAME) VALUES ('MR','MARKETING');
    INSERT INTO DEPT(DEPT,DNAME) VALUES ('IT','INFORMATION TECH');
    COMMIT;
    PL/SQL BLOCK
    DECLARE
      TYPE EMPCurTyp  IS REF CURSOR;
      v_EMP_cursor    EMPCurTyp;
      l_col_val           EMP.ENAME%type;
      l_ENAME_val       EMP.ENAME%type;
    l_col_ddl varchar2(4000);
    l_col_name varchar2(60);
    l_tab_name varchar2(60);
    l_empno number ;
    b_l_col_name VARCHAR2(255);
    b_l_empno NUMBER;
    begin
    for rec00 in (
    select EMPNO aa from  EMP
    loop
    l_empno := rec00.aa;
    for rec in (select COLUMNAME as column_name  from  columnames
    loop
    l_col_name := rec.column_name;
    begin
      l_col_val :=null;
       l_col_ddl := 'select  distinct :b_l_col_name ,pr.dept ' ||'  from emp pr, dept ps where   ps.dept like ''%IT'' '||' and pr.empno =:b_l_empno';
       dbms_output.put_line('DDL ...'||l_col_ddl);
       OPEN v_EMP_cursor FOR l_col_ddl USING l_col_name, l_empno;
    LOOP
        l_col_val :=null;
        FETCH v_EMP_cursor INTO l_col_val,l_ename_val;
        EXIT WHEN v_EMP_cursor%NOTFOUND;
          dbms_output.put_line('l_col_name='||l_col_name ||'  empno ='||l_empno);
       END LOOP;
    CLOSE v_EMP_cursor;
    END;
    END LOOP;
    END LOOP;
    END;

    user1758353 wrote:
    Thanks Billy, Would you be able to suggest any other faster method to load the data into table. Thanks,
    As Mark responded - it all depends on the actual data to load, structure and source/origin. On my busiest database, I am loading on average 30,000 rows every second from data in external files.
    However, the data structures are just that - structured. Logical.
    Having a data structure with 100's of fields (columns in a SQL table), raise all kinds of questions about how sane that structure is, and what impact it will have on a physical data model implementation.
    There is a gross misunderstanding by many when it comes to performance and scalability. The prime factor that determines performance is not how well you code, what tools/language you use, the h/w your c ode runs on, or anything like that. The prime factor that determines perform is the design of the data model - as it determines the complexity/ease to use the data model, and the amount of I/O (the slowest of all db operations) needed to effectively use the data model.

  • Capture all SQL statements and archive to file in real time

    Want to Capture all SQL statements and archive to file in real time?
    Oracle Session Manager is the tool just you need.
    Get it at http://www.wangz.net
    This tools monitor how connected sessions use database instance resources in real time. You can obtain an overview of session activity sorted by a statistic of your choosing. For any given session, you can then drill down for more detail. You can further customize the information you display by specifying manual or automatic data refresh, the rate of automatic refresh.
    In addition to these useful monitoring capabilities, OSM allows you to send LAN pop-up message to users of Oracle sessions.
    Features:
    --Capture all SQL statement text and archive to files in real time
    --Pinpoints problematic database sessions and displays detailed performance and resource consumption data.
    --Dynamically list sessions holding locks and other sessions who are waiting for.
    --Support to kill several selected sessions
    --Send LAN pop-up message to users of Oracle sessions
    --Gives hit/miss ratio for library cache,dictionary cache and buffer cache periodically,helps to tune memory
    --Export necessary data into file
    --Modify the dynamic system parameters on the fly
    --Syntax highlight for SQL statements
    --An overview of your current connected instance informaiton,such as Version, SGA,License,etc
    --Find out object according to File Id and Block Id
    Gudu Software
    http://www.wangz.net

    AnkitV wrote:
    Hi All
    I have 3 statements and I am writing some thing to a file using UTL_FILE.PUT_LINE after each statement is over. Each statement takes mentioned time to complete.
    I am opening file in append mode.
    statement1 (takes 2 mins)
    UTL_FILE.PUT_LINE
    statement2 (takes 5 mins)
    UTL_FILE.PUT_LINE
    statement3 (takes 10 mins)
    UTL_FILE.PUT_LINE
    I noticed that I am able to see contents written by UTL_FILE.PUT_LINE only after statement3 is over, not IMMEDIATELY after statement1 and statement2 are done ?
    Can anybody tell me if this is correct behavior or am I missing something here ?Calling procedure must terminate before data is actually written to the file.
    It is expected & correct behavior.

  • Session state and browser cache - Back button problem

    Hi all,
    I have a problem (and unless I'm missing something I think we all do) with session state and use of the browser's Back button. I really hope I'm just being dumb...
    Background scenario:
    Page P has a sidebar list allowing the user to select what content is displayed (e.g. 'stuff relating to X, Y or Z' where X, Y and Z are rows in, say, a table of projects). When a list entry is clicked, we branch to page P with the value of the list item placed in an application-level item (call it G_PROJECT). Reports on page P use G_PROJECT in their WHERE clauses.
    So, click list entry X and G_PROJECT is set to X and page P shows reports for project X.
    Page P also has a set of buttons which branch to various edit pages which allow attributes of page P's current project to be updated. These pages similarly use G_PROJECT in their WHERE clauses.
    Problem scenario:
    1. The user goes to page P and picks project X off the list. Project X's stuff is displayed (G_PROJECT = X).
    2. The user then picks project Y off the list. Project Y's stuff is displayed (G_PROJECT = Y).
    3. The user then clicks the browser's Back button. The page is served from browser cache, so project X's stuff is displayed, but G_PROJECT still = Y.
    4. The user clicks an 'Edit' button; we submit, and branch to an edit page which displays (and will edit) data for project Y because G_PROJECT still = Y.
    This is SERIOUSLY BAD NEWS - apart from being confusing, the user's edit permissions on projects X and Y may differ, and so the user may be able to perform 'illegal' updates.
    I've read what I can on this forum and the rest of the web looking for ways to a) inhibit browsers' 'Back' functions and/or b) prevent pages being cached by the browser, but none of them have worked for me.
    Short of waiting for browser manufacturers to recognise that the web is now full of applications as well as static pages, and enable robust programmatic control of cache behaviour, does anybody know how the problem can be avoided - or at least detected?
    Thanks,
    jd
    Failed attempts to date:
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="cache-control" content="no-store">
    <meta http-equiv="cache-control" content="private">
    <meta http-equiv="cache-control" content="max-age=0, must-revalidate">
    <meta http-equiv="expires" content="Wed, 09 Aug 2000 01:01:01 GMT">
    <meta http-equiv="pragma" content="no-cache">
    Disallowing duplicate submission (page attribute).
    window.history.go(1);

    Thanks Scott,
    I may be being dumb here but I don't see how that would help...
    P250_PROJECT and G_PROJECT are currently kept in sync by app logic. Whichever is used to drive, if the page is rendered from cache then the app logic is not executed, so the rendered page contents are not those keyed by P250_PROJECT, as illustrated in steps 1-4 of the problem above.
    The user sees X, the session items say Y. The engine doesn't know what the user is seeing.
    when page P is POSTed, its hidden item P250_PROJECT should always be used to derive the application item G_PROJECT. Then whether the page was pulled from cache or rendered anew via a click from the sidebar link, the project ID is determined by the contents of that page.
    As I said above I tried this, with the 'Edit' branch set to:
    Set these items: G_PROJECT
    With these values: &P250_PROJECT.
    but it makes no difference. The project ID is not determined by the rendered page contents - the engine gets the value of P250_PROJECT from session state.
    I can code the 'Edit' pages such that they check permissions and if necessary redirect back to p250 (conditional before-header branch), but that's a clunky cure rather than the prevention I was hoping for.
    Please tell me if my understanding is incorrect.
    jd

  • Session state and item values

    Hi,
    Is it any possibility to bring the session state and an item value to a table?
    Thank you

    Hi,
    For session id use APP_SESSION substitution string
    http://download.oracle.com/docs/cd/E23903_01/doc/doc.41/e21674/concept_sub.htm#sthref160
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • HT204053 I had been in Canada and created my apple ID for my phone there. Since I am back in the States and had to create a second apple ID. how can I deactivate one of them can use my normal email address?

    I had been in Canada and obtained my i4s. I created my Apple ID using my normal email address.  I returned to the States and still had my Canadian number. I was told the Canadian version of the iPhone 4s would not work with any phone company in the States, so I had to purchase yet another phone and create another Apple ID. 
    I have since deactivated the Canadian number. I cannot deactivate that Apple ID though.  So I am stuck with two (2) Apple IDs. (not to mention 2 iPhone 4s)
      I would very much like to only have one assiciated with the phone I have now. Is there a way to deactivate one of the Apple ID accounts?

    Welcome to the Apple Community.
    I'm not sure you needed to purchase a new phone, you certainly didn't need to create a new ID.
    However now you have done, you can't de-activate the old account, just log into your new one and stop using your old one.

  • My sons dad bought him and ipod and my niece used her itunes library to add music and videos on it. They live in another state and we have questions because we don't want him to lose all of the music or any of the apps.

    My son's dad bought him an ipod and my niece used her itune library to put music and videos on his ipod. The problem we are haveing is that she lives in another state and we are not sure how to manange his account without losing some of the songs and all of his apps. There are some songs that are on his ipod that are duplicates, there are some songs that he doesn't like or listen to, and there are some songs on there that I do NOT want him to listen to because of the language and the lyrics. He is 10 there are just some things I feel that he is too young to listen to.

    Welcome to the Apple Community.
    You can use different ID's for iTunes and iCloud.
    Just delete the account in settings > iCloud and create them their own account.
    if the children are minors, you wiil need to create and be responsible for each account yourself.

  • ID 5.5 Interact. PDF, cannot remove white background for Multi-States and buttons.

    Hi
    I am working on an Interactive PDF Portfolio document. The problem I have is with Multi-State object feature with several buttons going to states that need to be exported as a SWF and imported back into InDesign 5.5. See, the background of my entire doc. is GREY, but when I import the SWF (as directed in Lynda.com videos correctly) and export the entire doc as Interactive PDF and view it in Adobe Acrobat Pro (version 10.1.1) is when all the trouble starts.
    When I try to get rid of the WHITE background around the Multi-State objects and the buttons for them (using Select Object Tool and then control+click on it to change the Properties to Transparent Background Appearance) it does not change, even when I go forward and backward to the page.
    Does the option of removing white background and making it transparent work only for Animation, but not Multi-State feature with buttons?
    Can anyone suggest any other tecnique to create a nice slide show that works in Interactive PDF in ID CS5.5? Please..
    Sincerely,
    in need of help,
    Eve

    I have 8 Multi-State objects in one stack on the left and the 8 buttons for each state in the stack on the right. The background of my document is dark grey. There is space inbetween Multi-State objects and the buttons that show the grey background. But after exporting as SWF the Multi-States together with the buttons and placing the SWF back in the PDF file, the space inbetween Multi-States and buttons that is supposed to show the grey background appears white. The problem is that I cannot even change this white background to transparent in Acrobat Pro, as well. I used to do that to animations and it worked, but not in this case.

Maybe you are looking for

  • Smart Object opening as .jpg instead of .psb

    I received a file from another person – I didn't create it. It contains a Smart Object, which is indicated in the layer thumbnail. When I double-click to edit the smart object, a .jpg file opens, not a .psb. I know I can flatten it after making the c

  • Escape sequence on sender file adapter

    Hello XI experts, My scenario is,    Customer System =>  <CSV File> => File Adapter => Integration Engine I'm thinking of using Sender File Adapter with File Content Conversion and setting "," as  FieldSeparator. If there is "," in a text field and I

  • BAPI for material creation which returns the new material number

    Hi, I need a single BAPI or a remote enabled function module to create a material which would return the new Material number generated. Regards, Tanveer S.

  • Error in web template executing

    I gt the following error in web application desginer when I run my template: At executing Web Planning Template in web-brouser system return errors: Message: "The status of "QUERY_VIEW_DATA_PROVIDER" "DP_1" may only change during command processing".

  • Exchange 2013 with 2008 R2, unable to connect ECP, OWA and powershell

    Hi, Please find powershell error below. "VERBOSE: Connecting to EXCHNIV.IVSGU.CHN. New-PSSession : [exchniv.ivsgu.chn] Connecting to remote server exchniv.ivsgu.chn failed with the following error message : The WinRM client received an HTTP server er