How to Save State on an Entry Form prior to Submitting the Form?

I want to be able to save the values the user enters to fields on the entry form if they navigate away from the page and come back (without the user clicking the submit button for the form.) For example, one of the input fields has a goLink to go to another page to lookup a field value - when the user returns from the page, all other form field values are cleared. If the user does submit the form by clicking the command button, then all form field values are saved (if the user navigates from the page and comes back, all values are retained.) What I'm trying to do then is somehow save the values (passivate the state) for the field the user has filled in when the user navigates from the page without submitting the form. Any suggestions?
I am using a read-only View Object with all transient values. The VO is configured to passivate state including all transient values. The initial row is created programmatically; there will only be one row for the VO used as an entry form. I am not using a backing bean for the values and would prefer not to use one, but would rather use the VO's capability to passivate state to save the data values. The question then seems to be how to force the VO to passivate state prior to the form being submitted.
thanks
Message was edited by:
javaX

"My hunch is that the real problem is that the fields are not being set into the bindings due to the use of immediate="true"."
Yes. Now I see that is the real problem. Is there anyway to force setting the bindings from the input form field values if the user navigates from the page using a goLink, or commandButton with immediate="true" other than overriding the default FacesPageLifecycle classes?
I'd prefer not to have to do that unless necessary, and, if I over-ride that method, then how could I get it to work normally when the user presses the commandButton at the end of the form and I do want all validation checks to be performed (immediate=false for the form's submit button; immediate=true only for lookup commandButtons used for certain fields)?
Here's an overview of how I set the page up:
1. create transient view object; all attributes marked as always updateable; passivate state=true for VO and all transient values; no key id field selected (will only ever be one row - just using VO to save values that will eventually be used to do an insert to the database);
2. transient VO added to Application Module
3. Add data control to .jspx page as an ADF Form (not an ADF Creation Form)
4. Add code to AM to create the initial row for the input form
protected void prepareSession(Session session) {
super.prepareSession(session);
insertTransientViewObjRows();
private void insertTransientViewObjRows() {
ViewObject transientvo = getViewObj1();
transientvo.clearCache();
transientvo.insertRow(transientvo.createRow());
--- Entry Form .jspx pagedef.xml snippet ---
<executables>
<iterator id="MyIterator" RangeSize="10" Binds="MyView"
DataControl="AMDataControl"/>
</executables>
<bindings>
<attributeValues id="sponsorid" IterBinding="MyIterator">
<AttrNames>
<Item Value="sponsorid"/>
</AttrNames>
</attributeValues>
--- Entry Form .jspx page snippet ---
<h:form>
<af:panelForm>
<af:panelLabelAndMessage label="#{bindings.sponsorid.label}">
<af:panelGroup layout="horizontal">
<af:inputText value="#{bindings.sponsorid.inputValue}"/>
// state will not be saved for other form field values if use immediate="true" when temporarily navigate away from page and return; don't want to validate other form fields here
<af:commandButton text="Lookup Details"
action="lookup-page" immediate="true"/>
</af:panelGroup>
</af:panelLabelAndMessage>....
// state will be saved with immediate="false" when user submit forms at end of entry (need to perform validation of form's required fields here)
<af:commandButton text="Continue to Next Step" immediate="false"
action="nextpage"/>
Message was edited by:
javaX

Similar Messages

  • How to save formula items in oracle forms?

    Dear All........
    I am nw in this forrum, can anybody plz tell me how to save forumula items in database, I also make that fields as a database field but it is not save in database. plz tell me. thx.

    Dear!
    Steps to take formula column value into database field, follow following steps:
    1. Draw a text field named "Formula_Cell"and set its properties which you want for formula. Now, goto its "Database" property set to "No".
    Now, goto its "Canvas" Property set to "Null".
    2. Now, in Pre-Insert or Pre-Update trigger use following code:
    Suppose database field name is AMOUNT then:
    :AMOUNT := :FORMULA_CELL;
    If you want to mension block names with this then you may do.
    Remeber, Formula Column's property of Database must be set to No.
    Now, try to save I hope you will got a good solution...

  • HOW TO SAVE DOCUMENTATION AS FILE IN MY SYSTEM BY CLICKING THE BUTTON

    HI DEARS,
    i want source code for how to save the file by clicking the button in my system useing java

    cotton.m wrote:
    sabre150 wrote:
    chowdary2118 wrote:
    HI DEARS,
    i want source code for how to save the file by clicking the button in my system useing javaI want a new car. Can we do a trade?
    new car();
    But what code do I use for class 'car'?
    P.S. Please use the standard 'camel case' for class names.

  • How to trigger a value change listener in JSF without submitting the form

    hi friends,
    I have a JSF Page which contains a check box and a text box.
    I made the text box property as readonly.
    when i click the check box , i want to make my text box as editable.
    i achieved the above task by submitting the whole form when i click the check box.
    i want to acheive the same functionality with out submitting the form.
    In one of the references it is stated that "Value-changed handlers are executed if the page is submitted and the value of the component has changed."
    hope you got the question.
    please let me know, if you know the answer.

    Hi,
    If at all you dont want to submit the form and wanna reflect same form's field(s) as per the change in drop-down/check-box,
    you can simply achive it using traditional way of 'JavaScript'.
    For that you may typically give <h:form> tag any specific id say
    <h:form id="myForm"> and for dropdown/checkbox also you may give id say
    <h:selectBooleanCheckbox id="group" onchange="javascript:reflectChangedValue();"  ... >
    </h:selectBooleanCheckbox>and in the same JSP you can write any JS function say reflectChangedValue() as
    function reflectChangedValue()  {
         var formPrefix  = "myForm:";
         var groupId = formPrefix + "group";
         var value = document.getElementById(groupId).value;
          if(value) {
               // enale textbox here
          } else {
               // disable textbox here
    }For formPrefix and groupId, f you are having any doubts, you can refer to 'view source' from the browser,
    generated HTML of the working JSP.

  • HOW: To save/refresh data from different forms but in same session

    Hi
    I have 2 screens
    Screen-1
         Tabluar form with 10 rows and each row corresponds to one edit image
    Screen-2
         Forms type form with multiple text items and list items and one OK and cancel button
         If I click on OK button, whatever I enter in screen-2 is updated but till now no commit only EXIT_FORM and the screen is going back to Screen-1
    In Screen-1 I have written trigger When-Wiindow-Activated, which has to refresh the screen-1 values with the changed values from above screen-2
    BUT this is not happening. (I am using SET_BLOCK_PROPERTY... and EXECUTE_QUERY to refresh, by passing the query string)
    Also I have one save button in Screen-2 which should commit whatever I have updated in Screen-2 (once or muyltiple times)
    I am opening the Screen-2 from Screen-1 by using OPEN_FORM built in with form name and ACTIVATE,NO_SESSION and also the parameter.
    Please let me know if I am doing any mistake in calling or some properties need to be set.
    I assume that, as the aplication is in the same session then the newly edited record in screen2 should get reflect in screen-1, and should get saved once I click on save button in screen-1 (FORMS_DDL('COMMIT'))
    regards
    JC

    I assume that Screen 2 is not based on table as it doesn't prompt you "Do you want to save chages" on exit.
    So you probably just updating with update statement.
    You will need to call POST; before exit_form in screen 2.
    Post;
    Exit_Form(NO_COMMIT, NO_ROLLBACK); Also in screen 1, instead of OPEN_FORM and re-query in WHEN-WINDOW-ACTIVATED, I would suggest to use call_form and re-query just after call_form:
       CALL_FORM('xxx',no_hide, no_replace, no_query_only, pl_id);
       SET_BLOCK_PROPERTY ('YOUR_BLOCK' ...
       GO_BLOCK('YOUR_BLOCK');
       EXECUTE_QUERY;

  • How to save encrypted mail in decrypted form?

    This should not be so difficult on a Mac. Searching archives found a locked thread in 10.4 which was not properly resolved.
    How to to save an encrypted email in decrypted form?
    The wrong answer is to say, "You don't have to, only a certificate's ability to encrypt expires." As to why this is wrong, 1) I want to. And 2) Because the US Government in their infinite infallible wisdom deletes my prior certificate from CAC when issuing a new CAC. Can't copy certificates off a smart card.
    So once the integrity of the email has been verified I want to strip the encryption off so it will be accessible in the future and accessible without having to dig for the CAC, have a smart card reader, and have the necessary software installed.
    Using redirect shift-option-E to send the email back to myself only changed the certificate (to mine) but with the original From address so it was flagged as broken. All the while I thought I was forwarding it w/out encryption. And if thats not bad enough the original disappeared. The good news is a copy was left in my Send folder in the format desired, no encryption.

    Once the cert expires, you will no longer be able to use it to encrypt or sign mail. However, you can still use it to decrypt messages that you have received. Just leave it in your keychain, and everything will continue to work without changes. If you look at your keychain, you will see it listed, but marked expired.
    Likewise, other people that have the expired public key will be able to use that key to verify the signature or decrypt your messages; they will be notified as appropriate that the key has expired.
    If you do not want to spend money on a new cert, you may be able to get a free one from Thawte, or perhaps use the one available from Apple. Enable encryption in iChat, which generates a .Mac cert for you. Once that process has completed, open Keychain Access, go to preferences, and set "Search .Mac for certificates" and restart mail. That should allow you to use the iChat certificate for mail.

  • How to maintain state in multi select form. ( ASP classic )

    I have a mutli select form fields e.g.:
    <select name="Location" multiple="multiple" >
    <option value="8">Anglesey</option>
    <option value="11">Cheshire</option>
    <option value="5">Conwy</option>
    </select>
    say i select the first 2 of the 3 options and submit my page
    e.g. :
    mypage.asp?Location=8&Location=11
    how would i then set the state of the options to selected
    e.g. :
    <option value="8"
    selected="selected">Anglesey</option>
    <option value="11"
    selected="selected">Cheshire</option>
    <option value="5">Conwy</option>
    help and suggestions appreciated

    Hi Arvind, your best bet might be to pass the filter value via a QueryString and then apply a QueryString filter to those other pages. Overview of QueryString Filters:
    http://office.microsoft.com/en-us/sharepoint-server-help/connect-a-query-string-url-filter-web-part-to-another-web-part-HA010250999.aspx (I know it's for 2007, but the same applies to 2013).
    Dimitri Ayrapetov (MCSE: SharePoint)

  • How to save state of a flash cs5 application for iphone

    Hi,
    I was wondering if anyone could tell me if it is possible to somehow save the state of a flash application so it is able to resume where it left off after being closed. For example, is it possible for a user to save games in an iPhone game written in Flash? if so could anyone point me in the right direction on where to read up on how to do this.
    cheers
    Brendan

    http://www.adobe.com/devnet/flash/articles/saving_state_air_apps.html

  • How to Save a File in Oracle Forms 6 ?

    Dear All,
    I am using Oracle Forms 6. I need to save a file in .lst format.
    I am using,
    flnm:=get_file_name('E:\',file_filter=>'Text Files(*.lst|*.lst|');
    I f I use this, It prompts me to save the file. I want to save it automatically without asking me to enter the file name. We can get file name too from the above syntax
    flnm:=get_file_name('E:\','Test',file_filter=>'Text Files(*.lst|*.lst|');
    But i dont want the system to prompt me to save manually. It must be saved in the proper location as mentioned.
    Advance thanks for all.
    Kindly help me to overcome this issue

    Here's an example of a way to write out a file which writes out data from a particular block. The field names are hard coded so need to
    be customized:
    /* write out data as tab delimited file for import into
    excel etc */
    function write_file (myfile in varchar2) return varchar2 IS
      out_file          text_io.file_type;
      item_name varchar2(32);
      errnum number := ERROR_CODE;
      errtxt varchar2(80) := ERROR_TEXT;
      myblock varchar2(32) := 'MY_BLOCK';
      addrno integer := 0;
    BEGIN
      go_block(myblock);
      go_record(1);
      out_file := text_io.fopen(myfile,'w');
    /* output field header for excel or word */
      text_io.putf(out_file,'%s\n', 'notes' || chr(9) || 'subR' || chr(9)||'X' || 'someid' || chr(9)  ||
        'title' ||chr(9)||
            'first_name'||chr(9)||'last_name'||chr(9)||
          'home_address'||chr(9)||'home_city'||chr(9)||'home_state'||chr(9)||'home_zip');
      LOOP
            if (addrno > 0) then
                   text_io.putf(out_file,'\n');
            end if;
            addrno := addrno + 1;
            text_io.putf(out_file,'%s',:MY_BLOCK.some_notes || chr(9));
            text_io.putf(out_file,'%s',:MY_BLOCK.sub_ripple || chr(9));
            text_io.putf(out_file,'%s','X' || :MY_BLOCK.someid || chr(9));
            text_io.putf(out_file,'%s',:MY_BLOCK.title || chr(9) || :MY_BLOCK.first_name
                            || chr(9) || :MY_BLOCK.last_name || chr(9));
            text_io.putf(out_file,'%s',:MY_BLOCK.home_address || chr(9));
            text_io.putf(out_file,'%s',:MY_BLOCK.home_city || chr(9) || :MY_BLOCK.home_state ||
               chr(9) || :MY_BLOCK.home_zip);
            IF :SYSTEM.LAST_RECORD = 'TRUE' THEN
             EXIT;
         END IF;
         NEXT_RECORD;
      END LOOP;
    text_io.fclose (out_file);
    return 'Y';
       exception
         when others then
             message ('ERROR write_file '|| myfile || ' ' || :system.cursor_block || ' '
             || :system.cursor_record || ' ' ||:system.cursor_field || ' '
              || errnum || ' ' || errtxt);
             bell;
             synchronize;
             return 'N';
    END;

  • How to save data from a JSP Form to a xml file

    Hi All,
    I want to save JSP Form Fields (like name, contact etc) to a xml.
    When i chick on submit button of form all the entered fields should be saved into a xml file.
    Can any one send me a sample code, as I am new to JSP and XML.
    Thanks you All.

    You could
    - send the form input as request parameters (e.g. site.jsp?name=value&name=value) (done in html)
    - get the parameters with request.getParameter("name")
    - use [Java's xml lib|http://developerlife.com/tutorials/?p=25] to create the xml file [(jDom.org|http://jdom.org/] is another nice and simple xml lib)

  • How to save a value in a .txt n retrive back the exact value from the file?

    Well I have a number. Let's say 600. I need to save this value in a .txt file so that I can retrive this value. I tried using the below source code. It can be executed but I'll get num 49 everytime I execute it even though the value in my .txt is 600.
    try {
                   File inputFile = new File("Lt.txt");
                   File outputFile = new File("outagain.txt");
    FileReader in = new FileReader("Lt.txt");
    FileWriter out = new FileWriter(outputFile);
    int c;
              c = in.read();
              in.close();
    System.out.print("\nggggggggg"+c);
    in.close();
                   } catch (IOException ex) {
                   System.out.println("IOException:"+ex.toString());

    Thank you. I execute the program below. I can now retrive the data from the Lt.txt. But the value is limited to 3 digits. For example, the content of my file is 777888.
    When I run the program, I only get 777. How can I retrive the whole exact number?               
    import java.io.*;
                   class Test {     
                   public static void main(String args[]) {          
                   try {               
                   File inputFile = new File("Lt.txt");               
                   File outputFile = new File("outagain.txt");                    
                   FileReader in = new FileReader("Lt.txt");               
                   FileWriter out = new FileWriter(outputFile);               
                   char[] tmp = new char[3];               
                   int cnt = in.read(tmp);                              
                   System.out.print("\nRead: ");               
                   for (int i = 0; i < cnt; i++) {                    
                   System.out.print(tmp);               }               
                   System.out.println(" ");               
                   in.close();          }
                   catch (IOException ex) {               
                   System.out.println("IOException:"+ex.toString());          }     }}

  • How to save and work with a Word document stored in the Oracle 8i Database?

    Hi,
    If you have any experience with saving and working with a Word document (stored in 8i) from Forms 6.0, then please let me know how.
    Thanks ...
    Peter Nielsen

    hi
    i had worked storing word documents in oracle8i.tell me what exactly u want to know.
    null

  • How to get count of transaction entries in SM58 including all the status

    Hi,
    How can we get the count of total number of transactions present in SM58.
    Please help.
    Regards,
    Subbu

    I don't think there is a direct way of doing that. However, you can try running the same query from the selection criteria of SM58 on the ARFCSSTATE table.
    Try activating the SQL trace on ST05 (for your user), run the SM58 and click on "Execute". Stop the ST05 trace and display it. The same query performed by the transaction will be displayed there, allowing you to run it manually and check the number of records.

  • How to save contents of a JTextArea to a file without the newline blocks?

    Hello everyone
    I have created a GUI with a JTextArea and a button to save the contents of the JTextArea to a text file. I am working on a windows platform. Problem is that when saving the contents to the file, the newline block appears within the file ignoring the newline in the JTextArea.
    Is there a way of saving these contents the way they appear in the JTextArea preserving the format they are displayed? I want to create a file that looks exactly the way my JTextArea looks like.
    Up to the moment i am using the following code which produces a rather confusing file:
    save.addActionListener(
                        new ActionListener() {
                             public void actionPerformed(ActionEvent e) {
                                  String textCaptured = textArea.getText();
                                  File file = new File("Log.txt");
                                  try {
                                       BufferedWriter out = new BufferedWriter(new FileWriter(file));
                                       out.write(textCaptured);
                                       out.flush();
                                       out.close();
                                  } catch (IOException e1) {
                                       // TODO Auto-generated catch block
                                       e1.printStackTrace();
                                  finally{
                                       JOptionPane.showMessageDialog(null,"Your log file has been created");
              );Thank you all in advance
    Christophoros

    Thanks uncle_alice.
    Your solution worked like a charm :)
    Have a nice day
    To anyone who might face similar problems heres the code:
    File file = new File("Log.txt");
                                  try {
                                       BufferedWriter out = new BufferedWriter(new FileWriter(file));
                                       textArea.write(out);
                                       out.flush();
                                       out.close();
                                  } catch (IOException e1) {
                                       // TODO Auto-generated catch block
                                       e1.printStackTrace();

  • Two forms on same page..save state of one form while submitting other.

    Hi....
    I have 2 form on same page....
    first is form on table....
    nd another is tabular form.....
    now if I make an entry in both table ,,,,and after entering data in tabular form if click on submit button of tabular for the data of tabular form get submitted,,but the data I have been enter in first form get erased.....
    now my question is how can I save state of my first form even after clicking on submit button...........
    pls,help.

    Hi Shirish,
    in your scenario you can write manual process for one form in your both forms, using this way you can achieve you functionality.
    do the above and for that manual process keep the button name as your second form button means, for two forms saving with only one button.
    i am not sure in this, but you can try something.
    Thanks
    Chandran
    Edited by: Chandran on Nov 28, 2011 2:21 AM

Maybe you are looking for

  • Error "This web part was unable to load"

    Hi! I'm designing workflow in Sharepoint designer 2013 for Project Server. I have 3 stages. In second stage I have "start a task process (task outcome to variable: outcome)" and in "transition to stage" I have: If variable: outcome equalls approved  

  • Model 6102b phone wont turn on/ wont charge proble...

    so ive had this phone (6102b) for a few years and its been working fine. a few months ago it turned off and wouldnt charge. Randomly a month later it just started working again. About a week ago the phone died again. When i put the charger in to char

  • Search Help with value on SE11

    Hi Gurus, I have two parameters on my screen, PARTNER and PSOBKEY. I have created a Search Help on SE11 for the second parameter, and this search help has that 2 parameters too. First I enter PARTNER, then I open the search help for PSOBKEY, and I wa

  • Applications

    I don't seem to be able to use applications after i have synced my iPod. i downloaded them straight to the iPod usin it's wireless connection

  • Ios 6.0.2 introduces keychain bug?

    Since I updated to iOS 6.0.2, I've experienced problems with some apps that can't seem to remember password credentials after each reload. I have to RE-ENTER the login credentials repeatedly. What a pain! iOS just can't seem to remember Twitter passw