How to set by code items selected in  listbox

I have a listbox in which user can make multiple selections.And I have a button which make a specific action but it is clicked I want that the selected Items in the listbox remain selected.
Due to the fact that the page is reloaded after the click on the button the listbox is populated without having any selected item.
How can I do this please.
Thanks in advance.

I'm not positive I understand your question completely but I am going to take a guess that your asking how to make a command button do its action while not affecting your listbox.
This is really a tricky problem because i'm assuming these two components are sharing the same form.
The easiest solution would be to create two separate forms for each. The solution for a single form would be to capture the state that the listbox is in which is a little more difficult.

Similar Messages

  • How to set particular comboBox item selected once frame loaded?

    I have a comboBox with all the items with data and labels
    (set in the parameter of comboBox). However, I can't set the
    particular comboBox item to display when the frame entered, like
    this:
    var listenerObject:Object = new Object();
    listenerObject.load = function(eventObject:Object) {
    _root.cb.selectedIndex=3;
    _root.cb.addEventListener("load", listenerObject);
    What's wrong?

    You cannot use the load event on a frame, because by the time
    the code runs the component has already been loaded. But what you
    can do is set the properties directly in that frame wihtout the
    need of a listener. Simply write this,line instead of all the
    previous code:
    _root.cb.selectedIndex=3;

  • How to set background color for selected days in DateChooser

    How to set background color for selected days. I created
    checkbox for each day [Son,Mon,Tue,Wed,Thu,Fri,Sat] and a
    DateChooser, I want to change the background color for the selected
    day when i click on a button after selecting the desired checkboxs
    [ monthly wise/yearly wise]
    Thanks in advance

    There is no button involved in the following code, but it may
    be of use to you:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="init()">
    <mx:Script>
    <![CDATA[
    private var origColor:uint;
    private function init():void {
    origColor = dc.getStyle("selectionColor");
    public function setBackGrdColors(newColor:uint):void {
    dc.setStyle("selectionColor", origColor);
    if(dc.selectedDate){
    var dayOfWeek:Number = dc.selectedDate.day;
    else{
    return;
    switch(dayOfWeek) {
    case 0:
    if(sun.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 1:
    if(mon.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 2:
    if(tue.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 3:
    if(wed.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 4:
    if(thu.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 5:
    if(fri.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 6:
    if(sat.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    default:
    break;
    ]]>
    </mx:Script>
    <mx:VBox horizontalAlign="center" verticalGap="20">
    <mx:DateChooser id="dc" textAlign="left"
    change="setBackGrdColors(cellColor.selectedColor)"/>
    <mx:HBox width="100%" horizontalAlign="center">
    <mx:CheckBox id="sun" label="Sun"/>
    <mx:CheckBox id="mon" label="Mon"/>
    <mx:CheckBox id="tue" label="Tue"/>
    <mx:CheckBox id="wed" label="Wed"/>
    </mx:HBox>
    <mx:HBox width="100%" horizontalAlign="center">
    <mx:CheckBox id="thu" label="Thu"/>
    <mx:CheckBox id="fri" label="Fri"/>
    <mx:CheckBox id="sat" label="Sat"/>
    </mx:HBox>
    <mx:HBox width="300" horizontalAlign="center">
    <mx:Label text="Background Color" />
    <mx:ColorPicker id="cellColor"
    selectedColor="#FF00FF"/>
    </mx:HBox>
    </mx:VBox>
    </mx:Application>

  • How to set an Application Item from PL/SQL

    I am attempting to set an Application Item
    After login to my app, I want to retrieve a row from my SETTINGS table and populate some Application Items with the settings information so that I can
    display some of that settings information on every page.
    Just to start, I created one Application Item named F106_YEAR
    I then created a Shared Components Application Process which executes on New Session: After Authentication
    I created this process as an Anynomous PL/SQL block.
    declare
    aucyr varchar(4);
    begin
    select year into auctyr
    from settings;
    :F106_YEAR := aucyr;
    end;
    I've tried a couple of other Syntax tricks attempting to reference the Application Item F106_YEAR from within PL/SQL (like V('F106_YEAR') but nothing seems to be working.
    I'm sure that I am missing something simple. Can someone tell me how to set an Application Item from PL/SQL?
    Thanks in advance.

    I'm still doing something wrong because this is not working for me.
    I've tried both of the following versions as an Application Process set to run on New Session after Authentication:
    declare
    auction_year varchar(4);
    begin
    select year into auction_year
    from PBUUC.SETTINGS where rownum < 2;
    :F106_AUCTION_YEAR:=auction_year;
    end;
    and I also tried:
    declare
    auction_year varchar(4);
    begin
    select year into auction_year
    from PBUUC.SETTINGS where rownum < 2;
    APEX_UTIL.SET_SESSION_STATE (p_name, p_value);
    end;
    F106_YEAR is a global Item (shared components).
    The select statement works just fine in SQL*PLUS so I know that it is correct.
    If I run the debugger and log into the application, here is the output. Shouldn't I see my Application Process get called if it is set to run on New Session after Validation?
    My Application process is named RETRIEVE_AUCTION_SETTINGS
    0.01: A C C E P T: Request="P101_PASSWORD"
    0.01: Metadata: Fetch application definition and shortcuts
    0.01: alter session set nls_language="AMERICAN"
    0.01: alter session set nls_territory="AMERICA"
    0.01: ...NLS: Set Decimal separator="."
    0.01: ...NLS: Set NLS Group separator=","
    0.01: ...NLS: Set date format="DD-MON-RR"
    0.01: ...Setting session time_zone to -04:00
    0.01: NLS: wwv_flow.g_flow_language_derived_from=0: wwv_flow.g_browser_language=en-us
    0.01: Fetch session state from database
    0.02: ...Check session 695371898690095 owner
    0.02: ...Check for session expiration:
    0.02: ...Metadata: Fetch Page, Computation, Process, and Branch
    0.02: Session: Fetch session header information
    0.02: ...Metadata: Fetch page attributes for application 106, page 101
    0.03: ...Validate item page affinity.
    0.03: ...Validate hidden_protected items.
    0.03: ...Check authorization security schemes
    0.03: Session State: Save form items and p_arg_values
    0.03: ...Session State: Save "P101_USERNAME" - saving same value: "jps"
    0.03: Processing point: ON_SUBMIT_BEFORE_COMPUTATION
    0.03: Branch point: BEFORE_COMPUTATION
    0.03: Computation point: AFTER_SUBMIT
    0.03: Tabs: Perform Branching for Tab Requests
    0.03: Branch point: BEFORE_VALIDATION
    0.03: Perform validations:
    0.03: Branch point: BEFORE_PROCESSING
    0.03: Processing point: AFTER_SUBMIT
    0.03: ...Process "Set Username Cookie": PLSQL (AFTER_SUBMIT) begin owa_util.mime_header('text/html', FALSE); owa_cookie.send( name=>'LOGIN_USERNAME_COOKIE', value=>lower(:P101_USERNAME)); exception when others then null; end;
    0.04: ...Process "Login": PLSQL (AFTER_SUBMIT) wwv_flow_custom_auth_std.login( P_UNAME => :P101_USERNAME, P_PASSWORD => :P101_PASSWORD, P_SESSION_ID => v('APP_SESSION'), P_FLOW_PAGE => :APP_ID||':1' );
    0.06: ...Process "Clear Page(s) Cache": CLEAR_CACHE_FOR_PAGES (AFTER_SUBMIT) 101
    0.06: Nulling cache for application "106" page: 101
    0.00:
    0.00: S H O W: application="106" page="1" workspace="" request="" session="695371898690095"
    0.01: alter session set nls_language="AMERICAN"
    0.01: alter session set nls_territory="AMERICA"
    0.01: ...NLS: Set Decimal separator="."
    0.01: ...NLS: Set NLS Group separator=","
    0.01: ...NLS: Set date format="DD-MON-RR"
    0.01: ...Setting session time_zone to -04:00
    0.01: NLS: wwv_flow.g_flow_language_derived_from=0: wwv_flow.g_browser_language=en-us
    0.01: Application 106, Authentication: CUSTOM2, Page Template: 2904114531488186
    0.01: ...Session ID 695371898690095 can be used
    0.01: ...Application session: 695371898690095, user=JPS
    0.01: ...Determine if user "JPS" workspace "1040027630222986" can develop application "106" in workspace "1040027630222986"
    0.01: ...Check for session expiration:
    0.01: Session: Fetch session header information
    0.01: ...Metadata: Fetch page attributes for application 106, page 1
    0.01: Fetch session state from database
    0.02: Branch point: BEFORE_HEADER
    0.02: Fetch application meta data
    0.02: Computation point: BEFORE_HEADER
    0.02: Processing point: BEFORE_HEADER
    0.03: Show page template header
    0.03: Computation point: AFTER_HEADER
    0.03: Processing point: AFTER_HEADER     
    0.04: Computation point: BEFORE_BOX_BODY
    0.04: Processing point: BEFORE_BOX_BODY
    0.04: Region: Auction_Title F106_AUCTION_YEAR

  • How to set a page item to either of two sources?

    Hello Folks,
    I would like some advice with the following:
    On P1 there is a text field, say p1_text. The users enters a value into p1_text. This is validated.
    If the p1_text value validates OK, and the next button is pressed, there is a branch to page 2, which has a sql query page item named p2_dest which should use :p1_text in a where clause.
    If the p1_text value does not validate OK, the user is then presented with a Select List named p1_select (p1_text is now hidden). When the next button is pressed, there is a branch to page 2, and the sql query page item, p2_dest should now use :p1_select in a where clause (instead of :p1_text).
    I have the validation and presentation of either p1_text or p1_select working OK, but would really appreciate suggestions on how to set the one item on page 2 with either of the page 1 items when the branching occurs.
    Thanks
    KIM

    I used pl/sql in a page process on P2 to implement this logic to set a P2 item. I removed the setting of items from the calling page branch process.
    Cheers
    KIM

  • How to set background ChoiceBox item color to ChoiceBox with css?

    How to set background ChoiceBox item color to ChoiceBox with css?
    I need to change items list backgound color.
    I tried with following code, but it doesnt helps:
    .choice-box .context-menu {
      -fx-backgound-color: red;
    .choice-box .menu-item{
      -fx-background-color: red;

    In Java 8, either of your selectors should work.
    In Java 7 (JavaFX 2.2), you need the following workaround:
    #choice-box-menu-item {
         -fx-background-color: red ;

  • How to set Datagrid 1st row selected

    I want to set 1st row as selected = true as default in
    datagrid after loading the form which out clicking on any item i
    want to set the 1st row as selected, how can i achieve this.
    Thanks in advance

    Thanks for your help,
    Here's the code which i wrote
    datagrid creationComplete="changeColor();"
    [code]
    private function changeColor():void
    dgrid.selectedIndex = 0;
    dgrid.setStyles("selectionColor","#800f3e");
    [/code]

  • How to set Document Library Item Limit at Site Collection level?

    Hi,
    I have SharePoint which contains one Site collection with many Sites. Each sites has many document library.
    Actually my requirement is, End Users  wants to see only 10 items per page in document library. We can manually set by using "Item Limit" option but i could not set that for around 150 document libraries.
    Is there any possible to set that in Site Collection level?
    Thanks & Regards
    Poomani Sankaran

    You can run for each loop and use below code
    http://get-spscripts.com/
    #Get the site and list
    $web = Get-SPWeb "http://portal/sites/testsite"
    $list = $web.GetList(($web.ServerRelativeUrl.TrimEnd("/") + "/Shared Documents"))
    #Get the list view to be changed
    $newview = $list.Views["Sort by modified date"]
    #Set the mobile and default mobile view properties
    $newview.MobileView = $true
    $newview.MobileDefaultView = $true
    #Update the view configuration
    $newview.Update()
    $web.Dispose()
    $web.Lists[0].Views[0].RowLimit=30
    $web.Lists[0].Views[0].Update()
    How you can get all list using powershell
    http://sharepointrelated.com/2011/11/28/get-all-sharepoint-lists-by-using-powershell/
    If this helped you resolve your issue, please mark it Answered

  • How to set a Choice not selectable?

    I have a Choice which contains a few items in it. But how to
    make the Choice un-selectable so I have some control on
    the accessibility. Thank you.

    Thank you. The simple code you suggested worked. Which is exactly what the API is for...

  • How to make a rotating Item Select for a GUI design

    Hello, I am working on this non profit GUI project and need to make a high-fidelity prototype with the graphics I created. Most of my experience was in web design and i usually used Axure RP pro for making prototypes which works great for web but this GUI is clearly for a video game and thus some of the way menus work are a bit more sophisticated and "flashy" so I decided to use well, flash. Thing is I have very little experience with the action script side of flash and i just need to get a working prototype out asap, I don't have to make anything work perfectly, just enough to get the point across
    My question is on this rotating item select panel. How would i go about using those glowing orange arrows to rotate the whole set of items around the "equip" button when pressed? and how would I program each item to scale up when it snaps as the selected item? And of course the stats change when the item snaps as well.
    I greatly appreciate any help that can be provided on this.

    kglad wrote:
    buttons have a number of limitations that movieclips do not have.  the only benefit of buttons is that they require no coding for up,over,down states while movieclips do.
    anyway, if your up arrow is up_arrow, down arrow is down_arrow and your guns are gun_0,gun_1 etc:
    // assign x0,y0 etc to match the 5 positions of your weapons.
    var index:int = 0;
    var positionA:Array = [ [x0,y0],[x1,y1],...,[x4,y4] ];
    // click listeners that call rotateF
    up_arrow.addEventListener(MouseEvent.CLICK,rotateF);
    down_arrow.addEventListener(MouseEvent.CLICK,rotateF);
    // function called when arrows clicked
    function rotateF(e:MouseEvent):void{
    // loop through each gun
    for(var i:int=0;i<positionA.length;i++){
    // loop through the gun positions
    for(var j:int=0;j<positionA.length;j++){
    // find the position of each gun
    if(this["gun_"+i].y==positionA[j][1];){
    // once the position of each gun is found, determine whether the up or down arrow was clicked
    if(e.currentTarget.name=="up_arrow"){
    // up arrow clicked, so advance to the next gun position
    var nextJ:int=(j+1)%positionA.length;
    } else {
    // down arrow clicked so go back one gun position
    nextJ = (j+positionA.length-1)%positionA.length;
    // assign the ith gun the next or previous position
    this["gun_"+i].x=positionA[nextJ][0];
    this["gun_"+i].y=positionA[nextJ][1];
    // reset the scale on the enlarged gun by resetting all.
    this["gun_"i].scaleX=this["gun_"+i].scaleY=1;
    if(j==2){
    // enlarge the 'selected' (ie, middle position) gun
    this["gun_"i].scaleX=this["gun_"+i].scaleY=2;
    // stop looping through positions.  the ith gun position has already been found.
    break;

  • How to set only one row selection  in ALV GRID DISPLAY

    How to set single row selection in grid display
    not multiselection.

    Hi,
    In the USER COMMAND, build the code to check the REFRESHED Data & then check the number of records with SEL  = 'X'.
    If more than single entry found, then raise an error message.
    Best regards,
    Prashant

  • How to set an application item when report column link is clicked?

    I am trying to set the short name of a bread crumb entry when I drill into a detail from an interactive report page.
    The master report has a column link with target = detail - "page in this application"
    I can pass page items through the URL and they are set on the target page.
    How can I set an application item before the target page is called?
    Is there a way to set a process before the link is followed?

    Kenneth,
    I'm not totally sure that I understood the question but, it soounds like you want to set the value of some page items on the page that is opened when you click a link on a column in the master window. Is this right?
    If so, you can achieve what you want by creating hidden page item(s) on the target page. In the master page, on which every column provides the link, go into Report Attributes, click on the link column and scroll down to the section labeled "Column Link" Within this section, set the link text to the current column value, e.g. #MASTER_REPORT_COLUMN_NAME_HERE#. Set the target to "Page in this Application" and pick the page number for the target window.
    Underneath this you will see a section to set set the value for page items. If you click the flashlight, you can search for the hidden page item that you created above. Use the same value to set it as you did the link text, i.e. #MASTER_REPORT_COLUMN_NAME_HERE#. Do this and let APEX take care of passing the values on the URL.
    On the child page, just set whatever control you want to dynamically pick up the value from the hidden field. For example, if you hidden field where named P4_CLEARER_NAME. You could set the title attribute to "Contact Information for &P4_CLEARER_NAME."
    You need the preceeding "&" and terminating "." around the name of you hidden page item to do this.
    -Joe

  • How to set the default item showed in a h:selectonemenu

    I need to show the second, or the third, and on so.
    i tried some ways to set the default item showed in it, but failed.
    i had tried the attribute value, but it stiil showed the first item.
    Can u help me?
    in the JSP
    <h:selectOneMenu id = "companyName" rendered="true" binding="#{j03CMSyainAddBean.selectCompany}" style="width:150">
           <f:selectItems value="#{j03CMSyainAddBean.companyList2}"/>
    </h:selectOneMenu>in the back BEAN
    private UISelectOne selectCompany;
    private ArrayList companyList2;In the ArrayList companyList2, there are several selectItems.
    Thanks
    George

    Sanjeev K Sharma wrote:
    and without messing with /boot/grub/grub.cfg  ?
    I need this so that new kernels show up but do not change the default boot kernel
    Is there a way to do it by file name instead of position within the menuentry / submenu list?
    I found some ubuntu and fedora sugestions but all by position, none by name
    AND how to set the kdump kernel as the default?
    Arch is putting this kernel under a submenu - would this pose problems for setting it as the default?
    In /etc/default/grub you can use the name of your entry you wish to use as default
    GRUB_DEFAULT='Arch Linux, with Linux core repo kernel'
    You can tell grub to stop using submenus by doing:
    GRUB_DISABLE_SUBMENU=y
    Or you can just make a purely custom menuentry in /etc/grub.d/40_custom if you'd like:
    menuentry "Other Linux" {
    linux <KERNEL IMAGE HERE>
    initrd <INITRD IMAGE HERE>
    EDIT: /etc/grub/default -> /etc/default/grub
    Last edited by Slabity (2015-04-07 11:16:22)

  • Forms 10g : How to set the Database Item property for an item dynamically ?

    Hello all,
    I have a requirement where I need to set the database item property of an item to TRUE/FALSE
    dynamically at runtime based on certain conditions.
    Earlier, in forms 6i I've used,
    Set_Item_Property (<item_name>, DATABASE_ITEM, PROPERTY_TRUE);
    But in Forms 10g it doesn't recognize this Database_Item property and gives a compilation error.
    Have I overlooked something or has this property become obsolete in Forms 10g ?
    If obsoleted what is the replacement property ?
    Regards,
    Sam

    Some options:
    1. Create a database-view, including the "real" column in databases where it exists and a "dummy"-column in databases where it doesn't exist.
    If that's not possible,
    2. set database="No" for your item and
    -- create a POST-QUERY-trigger which reads the data for that column from the database, if the column exists, and
    -- create a ON-UPDATE-trigger which includes an
    UPDATE_RECORD;
    UPDATE THETABLE SET
      THECOLUMN=thevalue
    WHERE  ROWID=:THEBLOCK.ROWID;3. Base your block on either a select-from-clause, a ref-cursor or a procedure to adjust he query-part,, for saving use a procedure.

  • How to set a code on my ipod

    how do i set a code on my ipod touch?

    If by code you mean passcode, then:
    Settings>General>Passcode Lock>Turn Passcode On
    Enter your Passcode,
    Re-enter your Passcode.

Maybe you are looking for

  • Windows 7 - "Cannot complete setup" of Windows XP Mode

    I am running Win 7 OEM 64 bit PRO on new PC: AMD FX-8120, Gigabyte GA-990FXA-UD3 MOBO, latest BIOS The setup gets to 99% then fails with the above message. So far I have tried: Ensuring Virtualisation is on in BIOS There are no bootable disks in the

  • Drag and drop files to replace older only?

    I often find have folders which share some of the files.  If I drag and drop one folder onto the other I get a prompt for duplicates to keep both, replace or skip.  But how can I ensure that if I select replace Finder will only replace the file if th

  • Using boost asio in JVMTI?

    Hi, This is probably a long shot, but I'm going to try and ask anyway. I've got an application in which I have to do some profiling of Java software. The profiler has to communicate with a client via sockets (may sound strange, but that's the way it

  • Can I delete all these language packs?

    there's 260 German.lproj folders on my PowerMac G5. Can I terminate them? why are they even here? I'm not German, nor do I plan on learning German?

  • Desktop freezes when booting normal

    Hi i did a diagnosis after the machine gave me blue screen.  Now whenever i boot normal Win 7, it gave me blue screen .  So I capture the dump and uploaded to here: http://www.mediafire.com/?itr9cj4m81jlmc2 The message on the screen was something lik