Keep the selected index of a HorizontalList

I have a horizontalList which is filled with a data provider. My page never refreshes after an interval of 30, 60 seconds.

I have 5 item in the list. So when I select an item in the list at index 3, his article is highlighted with a different color. Now, when the page is refreshed in 30 seconds, I lose the highlight. How do I keep on refresh highlight color so that I know how I look at one.

I throw every time an event that refreshes the page and I store the index selected on my model. But I could not set the property of the element selected highlighted or selected.

Here is the code I put in place.

private void handleAppRefreshed(event:Event): void {}

trace ("Index:" + model.selectedHLIndex);

hlist.selectedIndex = model.selectedHLIndex; where hlist is the horizontalList

}

Any help will be appreciated. Thank you.

KM

Thank you. Once you refresh the data, you will lose the selectedItem. You can store the value and reset it after that data is returned.

Tags: Flex

Similar Questions

  • Keep the selected highlighter

    Hey there,

    I have fun software adobe reader on ipad. I especially need the highlighter tool. whenever I highlighted a part, I select the highlighter again before I can choose the next part. is there a way to keep the selected highlighter?

    Thanks for your help.

    Yes, there is a way... sometimes it is called keep the tools 'sticky'... don't ask me why.

    Select the tool you want to use (but don't use it yet). Control + E, or right-click upward on the toolbar, click & Select 'Display Properties Bar"there should be a box that appears with a check box, select"Keep the selected tool."

    https://acrobatusers.com/tutorials/there-way-keep-tool-sticky

  • Keep the color index in piechart

    Hello

    I have a working with a collection of ArrayCollection pie chart, and I control the slices showing the PieChart with its respective box.

    I can put my colors custom for each slice, and they show correcly. But when I delete a slice of the graph with the box (delete the respective data in the ArrayCollection collection), the color of the index of the slices to regroup, and that was a slice of blue now its another color.

    Example:

    Lets say that the data in the pie chart his:

    [a], [2], [3], [4], [5], [6]

    the colors for each piece of data is:

    [Green] [yellow], [blue], [Red], [White], [Black]

    And if I remove the element [two] that [yellow] sound of color, the colors change now to:

    [Green] [yellow], [blue], [Red], [White].

    Is there a way to hard code the color of each slice so that they don't fix when sound erased data? I have create this piechart via ActionScript:

    It does =) so I answer myself:

    When I create the series piechart via actionScript, I add the serie.fillFunction = setear_colores; prop. And in this function, I have read the data of the current item and set the color manually. My problem, I had to match the color of the columnseries in a columnchart. The function is therefore:

    private void setear_colores(item:ChartItem,_index:Number):IFill {}

    var currItem:PieSeriesItem = PieSeriesItem (item);

    var color: SolidColor = new SolidColor();

    for each {(var serie:Series in linechart.series)

    If (series ColumnSeries) {}

    var number: String = currItem.item.Nombre as String

    if(Serie.DisplayName == nombre) {}

    Color = serie.getStyle("fill");

    removal of color;

    }

    }

    }

    Default back color

    return new SolidColor (0x000000);

    }

  • Failed to set the selected index of a ToggleButtonBar to "0".

    Hello:

    I have a problem with ToggleButtonBar.

    I put my toggleButtonBar with a viewStack with list of the VBoxes containing formItems. When the page loads for the firsttime, all right. The first button in the toggleButtonBar is selected with the correct formItem in the viewstack. I fill out the forms on each article and click on the submit button. It will take me to the homepage again. Next time when I click on a button to take me to the toggleButtonBar, the last selected button is selected with the form associated with that. I need to reset the togglebuttonBar to the first selection. I tried to set the selectedIndex property of toggleButtonBar and the viewStack to '0', but doesnot work.

    Someone at - it immediate help would be highly appreciated.

    Happy to help you. Maybe my post being the answer does not appear yet, but if you forgot to mark my poist as the answer, that would be appreciated.

  • How to change the selected index of a list of a DG?

    It is probably simple and I'm in the right place. I have a datagrid. When I select an element of the DG, he fills out a form that can be updated. One of the form fields is a list control with a remote object values. I want this list to highlight/select the value that corresponds to that of the DG when the item is selected. For example if I have a list of numbers 1, 2, 3, 4, 5 and the question that I select in the DG contains a 4, then I want the list to automatically select 4 as a default in the list when I select the element of the DG.

    You must loop through the result of your RemoteObject looking for a match, after that you have added to the list. I posted a sort of model of example to show what I mean, yours will be different of course, but I think you can grasp the concept based on what I'm trying to show.

  • get the index of the item with mouseRollOver with HorizontalList

    Hi all

    I am very interested in the index of the item that triggers an event (in a HorizontalList)

    For example, if I move my mouse on the 2nd item in a HorizontalList, I want to get a 1

    Here is a code snippet

    .....

    public function prepareDisplay(event:ListEvent):void {}

    mx.controls.Alert.show ("index =" + myList.selectedItem);

    }

    []] >

    < / mx:Script >

    ......

    < mx:HorizontalList id = "myList"

    ....

    itemRollOver = "prepareDisplay (event)" / >

    ......

    This code still shows:

    index = 0

    because the selected index is not modified with a smile. Any suggestions?

    thnx

    Luca

    mx.controls.Alert.show ("index =" + event.columnIndex.toString ())

    ;

  • How to get the index of the selected items in a listbox?

    I chose several items in a list box, but I can't extract the index.

    How can I do?

    Hello iCat

    If you have listobox in the mode of data table type, it simply returns the table of the selected index.

  • How do the PaneManager TitleView repaint when selected index changes

    I have a PaneManager using the HorizontalScrollableController.  When I programmatically change the selected index (model.setCurrentlySelectedIndex), the content of the pane that shows the changes and the new pane fields appear.  But the HorizontalScrollableTitleView that is displayed does not change.  He continues to display the text in the selected pane title previously.

    How can I get the TitleView to repaint?

    I tried call invalidate() on it and also move the emphasis placed on the TitleView, and then back to it.  It will not always paint the title of the newly selected pane.

    I'll post a sample program demonstrating the problem tomorrow.  But I wanted to get the issue out there, in the hope that someone could give me a solution.

    Never mind. I found a kludgy autour work. Sucks, I have to find things. Would be nice if things like this everything worked properly in the first place.

  • How to keep the region selected when the page is sent

    Hello

    I created a page with several area equipped with a region selector.

    When the page is sent, the region selector returns to 'show all '.

    I would like to keep the selected region, but don't know how.

    Any ideas?

    APEX version: 4.2.6.00.03

    Theme: 26

    Best regards

    Klaus

    Hi Klaus,

    Please follow the Blog solution

    http://blog.theapexfreelancer.com/2011/11/sticky-region-display-selector/

    Hope this helps you,

    Kind regards

    Jitendra

  • How to keep the video selected after you move the playback cursor

    I use Flash CS5.5

    After selecting a Clip, the properties panel displays its properties. When you move the cursor reading by dragging the mouse, the properties of this Clip are still visible in the properties panel. But as soon as I stop dragging and release the button of the mouse, the properties panel changes - it now shows the properties of the motion tween.

    Is there a method to keep the selected Clip after dragging the playhead and do not pass the selection to the motion tween? That's because after dragging the playback slider I still need the Clip properties, so I need to select again and again after dragging the playhead.

    You forget entirely on the query editor.

    Query Editor window->.

    When you slide on your scenario, this shows you all the key properties and their values as well as real keyframes. This is where you should be inspect and adjust the values.

    It took me a while to return to flash animation and when I started the conversion from the classic Tween system to the new system of motion tween I didn't know that this sign existed. He brings Flash a little closer to After Effects (my favorite animation tool). It's a lot better that the classic tweens, it's safe.

  • Using the selection list to add/remove children

    I have a component tileList at the top of my app that I use as a menu bar. He currently has a bit of the two options. Everything that is displayed when the first item is selected is in a container; for the second element is in a separate container. Is it possible to set up the event listener so that when the selected index == 0, reservoir 2 precipitates and Tray 1 is added, and when the selected index == 1 Tray 1 is removed and the tank 2 is added?

    Here is the code I tried so far (which did not).

    private function menuClick(e:ListEvent):void
            {
                if(menuBar.selectedIndex==0) hdb.addChild(hdbd) && hdb.removeChild(hdbn)
                if(menuBar.selectedIndex==1) hdb.addChild(hdbn) && hdb.removeChild(hdbd)
            }
    

    EDIT: just saw your response tracking haha. No worries man happens all the time. IM surprised that the "&" worked. I always thought it was only good in the IF ELSE statements. u learn something new every day!

    Hey jffurian,

    try to change your function to this:

    private function menuClick(e:ListEvent):void{    if (menuBar.selectedIndex == 0)    {        /**          * check to make sure the container you want to         * remove is infact a child, sometimes throws error         */        if (hdb.contains(hdbn))        {            hdb.removeChild(hdbn);        }
    
            /** add the new contaiener */
    
            hdb.addChild(hdbd);    }    else if (menuBar.selectedIndex == 1)    {        /**          * check to make sure the container you want to         * remove is infact a child, sometimes throws error         */
    
            if (hdb.contains(hdbd))        {            hdb.removeChild(hdbd)        }
    
            /** add the new contaiener */
    
            hdb.addChild(hdbn);    }
    
    }
    

    You had the idea of writing, but the syntax was a bit off. the "&" is only good in the logical instructions as the parenthesis of an if else statement. and usually if the IF statement has several lines, as in your case, you must use the curly braces {}. Note also instead of two if statements I have merged with it an IF ELSE IF statement.

    In addition, do a check to make sure that the object you are deleting is a child object of the parent container. This isn't and he sometimes throws an error "Must be a child" so its good to have just in case control.

    hope that a few things cleared up. Good luck!

  • How to manage the selection with the box in a table

    Hello


    JDev 11.1.2.4

    I have a table with an attribute of EO/VO, transitional to manage the selection. This attribute is displayed as a check box. The user makes a selection by clicking on the checkbox. Then, the user clicks on a button that displays a pop-up window. Inside of this pop-up window, that user can create, insert, delete, or update values in a table based on an other EO/VO.

    When the user clicks OK, the pop-up window is closed, then the data is committed.

    When the user clicks Cancel, the popup is closed and the changed data are ignored. To remove the data, I call a Rollback. It works fine, but all the transitory values are lost which is correct because of the discount after the cancellation.

    It's a problem because the user must be able to open the pop-up window several times with the same selection. This means that the restoration is not appropriate in this case.

    How to ignore data edited inside the pop-up window and keep the selection?

    Thank you

    You can try to put the popup in his own taskflow and define a backup point before entering the taskflow. When the user cancel the editing restore you to previous backup. This should dispel the changes.

    Or you save the selected rowkeys, call rollback and backward selection later.

    Timo

  • refresh the html region when the selection list or selected ir line chang

    Apex 4.2

    Hello

    I made a simple page for test actions.

    I have

    -an interactive report and a selection in my first area list.

    -a field of text (P5000_indid) to keep the selected indid

    -region of html where the source is:

    DECLARE

    CURSOR c_ind IS

    SELECT indid, ind, industry

    IND

    WHEN indid as: P5000_INDID;

    BEGIN

    FOR a c_ind IN LOOP

    HTP.p ("< style b =" white-space: nowrap;) "> Indid: ' |" a.indid |' ---> ' || a.Industry: '< /b > < br / >');

    END LOOP;

    END;

    I'm sorry, but I m a bit confused with all the things I read before and do not know what is possible or not and what is the best practice to:

    1. select in the selectList (is it also possible to retrieve the selected (highlighted) or line in the IR)

    2 update the P5000_INDID

    3. refresh the html box according to the value of P5000_INDID (I was able to refresh an IR according to value, but there was the possibility to say what variable to present, but I have no

    see for the region of html)

    I m doing this test, because in the end, I would like to be able to regresh a small chart according to the selected line of the IR.  Do you think that it is possible to s?

    Sorry for my newbie question

    Thanks for your help

    L.

    OK, I finally found everything that I needed,

    You can test it on:

    http://Apex.Oracle.com/pls/Apex/f?p=53793

    Demo/demo

    the content of the output area now is the result of an application process, according to a parameter.

    It is called with javascript onChange and response replace the contents of the region

    and you can also see that I can now select a line and show it by changing the color of the line, and then update the output.

    and when a line is selected, it resets the selection on the selectList to avoid triggering the event on the selection list.

  • How to keep the value in Graf

    Hi all

    I use following code to set the default value for messageChoiceBean.And its fine.but of work in this case, is that

    This page is Iproc page and he saw the train. I mean when the user click on button nxt it goes for nxt step.when I click on nxt button.and return to the previous page, then that once again the default.

    In {Graf}

    OAMessageChoiceBean createMBean = (OAMessageChoiceBean) webBean.findChildRecursive ("Taxable");

    if(createMBean!=null)

    {

    createMBean.setText (pageContext, "SYSTEM");

    }

    }

    Here bydefault game messageChoice do not know... The SYSTEM is id of don't know.

    When I change don't know another value and click on nxt button.and I'm back to the same page with the "back" button, then again, it sets the value of not knowing...

    Here, I want to keep the selected value...

    Thank you...

    Hello..

    How can I use session values to maintain the value of the user's selection?

    and this is... I want to declare a variable that can be Graf and I put no value now, I want to use the same variable in PFR() and I want its value to be YES... How can I achieve this?

  • Selected index when sorting?

    I have an application that makes changes to an element in a collection of table based on the selected item in a datagrid control. What I mean is that you select the line you want to change in the datagrid control, and then click a button to change. I was using the selected index to determine the index add the mofified element. Here's where I determine what element of the array is replaced:

    var theIndex:Number = theGrid.selectedIndex;
    theCollection.removeItemAt (theIndex);
    theCollection.addItemAt ({stuff: theStuff}, theIndex);

    Which works fine... until sort you the datagrid control. Obviously this does not work when once sorted, given that the clues are more synchronized, but what do I do to fix this? Is there a way to determine what the index into the array is when you select the row in a datagrid?

    Hello

    There are two ways in which you can accomplish this task.

    1 var theIndex:Number = theGrid.selectedIndex;

    (theGrid.dataProvider as ArrayCollection collection) .removeItemAt (theIndex);

    (theGrid.dataProvider as ArrayCollection collection) .addItemAt ({stuff: theStuff}, theIndex);

    Another solution:

    2. var theIndex:Number = theCollection.getItemIndex (theGrid.selectedItem);
    theCollection.removeItemAt (theIndex);
    theCollection.addItemAt ({stuff: theStuff}, theIndex);

    Hope this helps you.

    If this does not resolve your problem, then please let me know

    See you soon

    -Vikash

Maybe you are looking for