Save the State of a combo box

I created a listbox control that has a number of items in there and then I created 'Up' and 'Arrows' to allow the user to move the items in the listbox control to specify the order they want. The problem I have is when I save the document that the State of the list box is not preserved. Here is the code that I used to record allow the user to move the elements upwards or downwards. Please let me know if it is possible to save the State or if I need to find another solution to this requirement.

Try

{

if(ListBox1.selectedIndex>0)

{

var selectedItem = ListBox1.items.nodes.item (ListBox1.selectedIndex)

ListBox1.items.nodes.insert (selectedItem, ListBox1.items.nodes.item(ListBox1.selectedIndex-1))

}

} catch (e)

{

app.alert(e+'');

}

Usually by checking the setting automatically for the "backup script changes to registration form" option in the properties of the form and the default tab.

Thank you

Srini

Tags: Adobe LiveCycle

Similar Questions

  • How to validate and save the values to a combo box and two text boxes in flex4 mxml application with as3

    helllo all,.

    I'm working on the application web flex4 with as3.

    I have a doubt, I've created a mxml it has two text boxes, except the button and a combo box that is has two option as a percentage and the amount.

    my needs are I gave here.

    need 1: when I choose option amount that two text boxes does not have to be editable.when I select text tat box two percentage option will be editable.

    need 2: when I select the percentage in combox option and two text boxes are empty, and then click the button Save-> I want to display warning msg

    need 3: when I select the option amount combox and the two boxes are emptu click the button Save-> I don't want any warning messages.

    How to validate it and how to write backup for this function.

    any suggession or extract code is welcome.

    Thanks in advance,

    B.Venkatesan

    Looks like you are trying to do too much at once. Try to hang the events correctly

    The close event of the comboBox can do something like this

    protected function toggleTextEditing(event:DropDownEvent):void

    {

    If (this.optionCmb.selectedItem.label is "Percentage")

    {

    This.Text1.editable = true;

    This.Text2.editable = true;

    }

    Else if (this.optionCmb.selectedItem.label == "Number")

    {

    This.Text1.editable = false;

    This.Text2.editable = false;

    }

    }

    The button's click event can do something like

    protected function save(event:MouseEvent):void

    {

    If (this.optionCmb.selectedItem.label is "Percentage")

    {

    If (this.text1.text == "" & this.text2.text == "")

    {

    Alert.Show ("text is empty");

    return;

    }

    on the other

    {

    }

    }

    Else if (this.optionCmb.selectedItem.label == "Number")

    {

    }

    }

    If you can put in your entire code, maybe I can have a look to see if I can find something wrong with that.

    -Pramod

    http://www.flexmycode.com

  • How to save the State of the checkbox in the database

    HELLO everyone again ;)
    I want to save the State of the checkbox (checked or unchecked, true or false) in the database.

    For example, if the user, check the box and press the validate, then this value (check = true) should be stored in the database (true), and when the user only view this value in another page jspx, then this value should be displayed: checked (true)

    How can I do? What are the data type in the database object and the entity to do this?

    Thank you.

    This could also help
    http://download.Oracle.com/otn_hosted_doc/JDeveloper/11gdemos/ADF_Insider_Essentials/ADF_Insider_Essential_YesNoRadio/ADF_Insider_Essential_YesNoRadio.html

    concerning
    Grant

  • How can I do a multiple selection in Enum control or control of the ring or control Combo box

    How can I do a multiple selection in Enum control or control of the ring or control Combo box

    You can not.

    You can use a listbox control.

    An alternative solution is to write the code and each selection, the user gives an enum, for example, can be send to a table and invite the user to continue to select...

  • The store update will remove old save the State of device during the installation of the new version?

    We will therefore say I installed an app on the app store and it is version 1.0 and it was save States to save my best personal score, that will save the State and score be removed when I install a version update (1.1)?

    I ask because I'm about to start using save States and need to know how to save to keep the original save the State through different versions that could come, so he has not erased each time.

    It'll keep all your saved data, so you don't need to worry.

  • How to save the State of a flash cs5 to iphone app

    Hello

    I was wondering if anyone could tell me if it is possible to somehow save the State of a flash application is able to pick up where he was arrested after being closed. For example, is it possible for a user to save games in an iPhone game written in Flash? If Yes, could someone point me in the right direction on the place where to read on how to do it.

    see you soon

    Brendan

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

  • CSS style for the display text (does not save the State)

    Hello

    I just upgraded from APEX to APEX 3.1 3.0 and display text (does not save the State) which I had set to display more by adding style = "color: #658bb1;" font-size: 25; "the field of HTML table attributes for the element.

    Since the upgrade, that has been lacking in the font size of the body (12 PT) and I can't seem to be larger.

    I tried to use attribute selectors - span [class = display_only] {color: #658bb1; font-size: 25px;}, but this only works in Firefox.

    Can anyone help please.

    Thanks in advance

    Graham.

    Hi Graham,

    I can't see your post exactly what you did!

    I tried your style here: [http://htmldb.oracle.com/pls/otn/f?p=33642:176] and it seems to work ok in IE and FF

    As part of header HTML of my page, I add:

    <style type="text/css">
    .display_only {color: #658bb1; font-size:25px;}
    </style>
    

    Andy

  • How to save the State temporarily, and then pull it out back?

    We are developing an application on Jdeveloper 11.1.1.6.0 BPM. I have a requirement to save the current state(partially entered) of a web application and temporarily, then recover with the same State when it has connection the next time? How can achieve us?

    Make the changes you want in the form-> click on the drop-down "Actions" (the one on the form) and not one above the task list-> click on "Save" and your changes will be saved.

  • Save the State of the Variables and radio buttons

    I designed a form that uses a Raddio Button with three choices. These selectibles toggle choice areas of the form. The user will save the form under a different name for archiving. Now if I save the form, the State of the option button and the variables used in the JS code is not stored. So if I open the file, the form does not reflect the State of the option button and variable.

    What is the best way to implement this?

    Can I save variables and the State of the option button (choice selected) when the user saves the form, and then restore the rear opening?

    Thank you.

    Without knowing more about what you do, it is difficult to give specific information. I'm not sure what you mean about the State of the option buttons, since when a form is saved, their State will not change when it is reopened. To back up data, you could certainly use a hidden field and read using a script that runs when the form is opened.

  • Snapshots - how to save the State of the machine before deleting

    Hello

    We have a production VM on a cluster host ESXi5, which was taken earlier (nearly 2 years?). Of course, I want to get rid of the snapshot that he shouldn't have spent so long, and after some research, I'm pretty sure deletion will do what I want (I want to keep the virtual machine, as it is now with all the changes since the snapshot).

    However, I also want to take every possible precaution before to do this because if the changes are cancelled (i.e. if returned to the State of origin before the change), it will create a good amount of work, and I want to keep the virtual machine, as it is currently before deleting the shapshot.

    Is this possible? I read cloning will not clone the snapshot of the files themselves, but the cloned VM will contain changes since shapshot has created or will it be the VM before the snapshot? If the clone itself is a copy of the current computer running (changes since snapshot included), this could be an OK option.

    I don't think another solution could be to stop the VM and copy the VMWare real files somewhere - would this work?

    I am probably being a little cautious with this, but I'm a little nervous about snapshots and I want to make sure that I have all the bases covered... just in case...

    The virtual machine is saved so as a last resort I can restore from a backup, but I would rather avoid this path if possible.

    See you soon,.

    Tim

    This snapshot that one is associated with your virtual machine, which is 2 years old?

    what you think is right about removing it. If you just run this snapshot delete operation, it will merge delta with basic disk (since you instant is very ancient, the size of your delta is probably very much, in this case, this operation may take up very much time to complete) and resulting VM will be your last VM with all changes made after this snapshot was taken too.

    At the time of the snapshot, Deleting, you must also remember that there should be enough space available in your data store where you VM resides, if possible to reach downtime, then make the deletion of the snapshot while VM is powered off, or try opening the process during off-peak hours.

    I'm sure you might have encountered following KB already as you have done enough research on the topic

    VMware KB: Delete all snapshots and consolidate Snapshots feature FAQ

    I read cloning will not clone the snapshot of the files themselves, but the cloned VM will contain changes since shapshot has created or will it be the VM before the snapshot? If the clone itself is a copy of the current computer running (changes since snapshot included), this could be an OK option.

    Cloning will also do the job. Yes cloned VM will be for blocks of basic disk and disk from Delta and merger while then resulting VM cloning will be having only basic disc with all changes that you made after the snapshot.

    I don't think another solution could be to stop the VM and copy the VMWare real files somewhere - would this work?

    The virtual machine is saved so as a last resort I can restore from a backup, but I would rather avoid this path if possible.

    Keep copy of all the files in this virtual machine a safe, desirable for you, but at the same time if you have the frame of this virtual machine already successful backup made so nothing to worry. Your virtual machine can be restored from that successful return. If you want to test the restoration, why not restore you this virtual computer on an isolated network and not little a test for your complete satisfaction before proceeding to deletion of snapshot.

    Note: Do not operate upgraded, this will put your VM around 2 years back State at the time of the creation of the snapshot.

  • ADF Code corner #50 - tree selection listener Table do not save the State of the

    Hello world

    With the help of JDev Studio Edition Version 11.1.1.3.0

    I have a table of tree using the earphone generic selection based on the excellent article by Frank Nimphius during synchronization of forms for entries of tree node edit. http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/50-synchromize-form-TreeSelection-169192.PDF

    My problem:

    My selectedNodeRowKey and selectedNodeRowIterator variables are turning to null out the listener.

    Process and code:

    I select a node. It called the selection event of onTreeSelect, which in turn saves the node key and the iterator in the same support bean backingBeanScope value.
          DCIteratorBinding _treeIteratorBinding = null;
          _treeIteratorBinding = treeBinding.getDCIteratorBinding();
    //Frank's code above ...
    
          this.selectedNodeRowKey = nodeBinding.getRowKey();
          for (Object opaqueFacesKey: treeTable.getSelectedRowKeys())
          {
            treeTable.setRowKey(opaqueFacesKey);
            this.selectedNodeRowIterator =
                ((JUCtrlHierNodeBinding) treeTable.getRowData()).getRowIterator();
          }
    
          System.out.println();
          System.out.println("Update Key: " + this.selectedNodeRowKey);
          System.out.println("Update Ite: " + this.selectedNodeRowIterator);
    
    //Frank's code resumes ...
          Row[] found =
            this.selectedNodeRowIterator.findByKey(this.selectedNodeRowKey, 1);
    Then, I click on a button that calls an actionListener in the same bean support.
      public void onButtonRemove(ActionEvent actionEvent)
      {
        System.out.println("Remove button pressed.");
    
        BindingContainer bindings = getBindings();
    
        System.out.println(this.selectedNodeRowKey);
        System.out.println(this.selectedNodeRowIterator);
    
        OperationBinding operationBinding =
          bindings.getOperationBinding("deleteChildren");
        operationBinding.execute();
        System.out.println("Remove complete");
      }
    This gives me the result
    Update Key: oracle.jbo.Key[112 ]
    Update Ite: oracle.jbo.server.ViewRowSetImpl@aa641d
    bos.model.queries.TbomView
    
    Remove button pressed.
    null
    null
    Remove complete
    What happened to my values and node iterator? I guess it has something to do with a scope or something similar to C++ through reference instead of the value. The strange thing is, the default MakeCurrent onSelection the auditor's work, but use this generic listener and values change.

    Published by: LovettWB on December 21, 2010 14:51

    Hello

    You can try setting the bean to the session scope? I guess it works, which brings me to my main point. If the managed bean is used in a stubborn workflow (which I assume you are referring to the use of fragments of page jsff), make sure that it is also defined in the workflow definition and not adfc-config. Personally, I like to feel it is best to set the bean managed in the metadata scopes, in which it is used. So could already solve the problem

    Frank

  • How to use the value in a combo box as a parameter "with these values?

    Hello, new user.

    I have a box of drop-down list on Page 1, on which the user can choose a number of study. The list box is named "P1_STUDY_NBR".

    Then I have a list, a single entry that goes to my form master / detail, which is Page 6. I would like him to go the number of study that the user choose on Page 1.

    In my goal on the list to create/edit entry, I put in the 'Page of this Application"," Page 6 ", then in any of these items, I put in."
    P6_STUDY_NBR

    My question is what to use with these values, where I want the content of the P1_STUDY_NBR. I tried:
    & P1_STUDY_NBR

    and it does not work. If I put in one of the numbers in the study, as 336-00, then it works, but I want to increase the number of study that the user chooses in the drop-down list. What should I do for P1_STUDY_NBR content?

    -Mary

    Hello

    The format should be:

    &P1_STUDY_NBR.
    

    You seem to miss the point at the end

    Andy

  • Restart and save the State of the desktop computer

    Having just rebooted my PC after installation of an update, I wonder why it is not possible to restart until the PC was in first place at the hibernation. I had loads of IE Windows open and a few other programs and now I have them all start over and get them to where they are.

    Am I willing too? :-)

    G

    Not possible, but perhaps you could reconfigure to download only or to indicate only and you could then choose when you want to restart.

    HOW to: Configure and use automatic updates in Windows XP
    http://support.Microsoft.com/kb/306525

    or if you are using Vista
    http://www.Microsoft.com/Windows/downloads/windowsupdate/learn/windowsvista.mspx

    You don't mention what operating system you are using. TaurArian [MVP] 2005-2010 - Update Services

  • Another question of combo box

    (Thank you, Nadia, for the last answer)

    I have a ul (for the navigation button) that I want to WATCH the same thing on several pages, but the text and the links will be different.

    I made a template, but it wont let me save the list in a combo box.

    Is there a way to do this?

    TIA again

    Gretchen

    InwoodLady wrote:

    (Thank you, Nadia, for the last answer)

    You are welcome.  It would be useful to mark the question as 'responded' if the solution worked for you.  In the event that someone looking for the same problem, they can see that the answer was useful as a solution.

    I have a ul (for the navigation button) that I want to WATCH the same thing on several pages, but the text and the links will be different.

    I made a template, but it wont let me save the list in a combo box.

    I just tested this, and it worked for me:

    If you have your unorded already written in the code list, pass the background tag selector and select the

      tag.  This will select the entire list, and you should then be able to do the same thing as my previous answer and insert an editable region.,.

      I assume that you will be styling the "buttons" via CSS, do not use the DW navigation buttons.  (I hope you are going to use css ;-)

      Here's the code that DW writes when I added the editable menu list:

      
      
      • LINK
      • LINK
      • LINK
      • LINK
  • I can't download Firefox. When I hit the download button the pop-up box asking me if I want to open or save the file disappears without me click an option.

    I tried to download Firefox without success.
    I hit the download button and, normally, a pop-up window appears asking me to open or save the file. An empty box appears briefly and then disappears.
    The problem may be with Internet Explorer 6.
    However, I tried to update to IE 8 and the same problem above occurs on the Microsoft Web site.
    I think that there is a little lack of IE 6.
    Any ideas?
    Thank you
    Sandra

    Thank you.
    In the end I had someone send me the file installation and it worked.
    Thanks for your time.

Maybe you are looking for

  • To install the Sierra but message "this version can not be installed.

    I El Capitan on my Mac.  Tried to install Sierra and received the message that this version can not be installed on my computer.  I think I have enough memory and storage, and when I asked for "More" it shows nothing.

  • Cannot open save web files

    In the first after the opening of a Web site, I choose Save Page as web page, complete in my folder on the hard driveThe file is save succesfull, and the icon is mozilla fire fox, but when I try to open it by 2 x by clickingHe just open the browser f

  • small amount of soup at the event, display problem

    Small amount of soup contacted the side of my laptop, where evacuation, the laptop has flashed blue waves. Sometimes, it works very well but most of the time, it flashes waves blue and sometimes black or gray rest until never. Help, please

  • difference of dates according to the model described

    HelloNeed help...I have a table as below:create table select TEST_CASETBL (ID, CASE_NUM, CHANGED_ON_DATE, AUDIT_FIELD, OLD_VAL, NEW_VAL)111 1, 123-456', TO_DATE (January 9, 2015 10:00 ',' dd/mm/yyyy hh24:mi:ss'), 'status', 'Open', 'Farm' of the DUAL

  • The month for stock subscription is automatically renewed?

    The month for stock subscription is automatically renewed? I have to cancel to prevent-renewal if I just signed up for a month?