Spark List Itemrenderer items outside of List

I have a spark list and i want some of the items in it to appear out side of the list depending on the users interaction.
Is there a way to make items of an item renderer appear outsid of the LIst container?
When i use basic layout on the lsit and explicitly set the x and y, they appear behind the list.
Thanks.

Hi jmandawg,
My ListRenderer.mxml may be what you want as follows,
<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer 
xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="
library://ns.adobe.com/flex/spark" xmlns:mx="
library://ns.adobe.com/flex/mx" hide="mOut(
null)" mouseMove="mOut(event)" mouseOut="mOutValueItem(event)"mouseDownOutside="mOut(event)" creationComplete="inited()"
autoDrawBackground="
true">
<fx:Script>
<![CDATA[
import mx.controls.TextInput; 
import mx.managers.PopUpManager; 
import mx.utils.StringUtil; 
import flash.text.TextLineMetrics; 
public var mouseOnPopup:Boolean = false;  
public var vi:mx.controls.TextInput; 
private function inited():void {vi =
new mx.controls.TextInput();vi.editable=
false;vi.addEventListener(MouseEvent.MOUSE_OUT, mOut);
vi.addEventListener(MouseEvent.ROLL_OUT, mOut);
vi.addEventListener(MouseEvent.MOUSE_OVER, mOverPopup);
private function mOut(event:MouseEvent):void { 
if ( vi.isPopUp ) {PopUpManager.removePopUp(vi)
mouseOnPopup =
false;}
private function mOverPopup(event:MouseEvent):void {mouseOnPopup =
true;}
private function mOutValueItem(event:MouseEvent):void { 
if ( vi.isPopUp && !mouseOnPopup) {PopUpManager.removePopUp(vi)
private function mOver(event:MouseEvent):void { 
var txt:String = itemValue.texttxt = StringUtil.trim(txt);
if(txt.length<5) return; 
if(!vi.isPopUp) {PopUpManager.addPopUp(vi,
this.parent)vi.text=txt;
vi.setStyle(
'fontSize',18); 
var txtMetrics:TextLineMetrics = vi.measureText(vi.text);vi.width=txtMetrics.width*1.2
vi.height=itemValue.height*1.4
var p:Point = itemValue.localToGlobal(new Point(itemValue.x, itemValue.y));vi.x=p.x;
vi.y=p.y-10;
]]>
</fx:Script>
<s:TextInput id="itemValue" text="{data.value}" width="200" mouseOver="mOver(event)" mouseOut="mOutValueItem(event)" mouseMove="mOut(event)" editable="false"/> 
</s:ItemRenderer>
You may test it with the following in your main.mxml
Bindable] 
private var detailAC:ArrayCollection = new ArrayCollection([{value:"nteDevice.device"},{value:
"nteDevice.deviceTypenteDevice.loopbackIpAddr"},{value:
"nteDevice.ipAddressnteDevice.loopbackIpAddr"},{value:
"nteDevice.loopbackIpAddrnteDevice.loopbackIpAddr"}, {value:
"nteDevice.release"},{value:
"nteDevice.releasenteDevice.loopbackIpAddr"},{value:
"nteDevice.clli"},{value:
"nteDevice.provisionStatus"}]);
 <s:List id="lst" itemRenderer="com.att.ntscp.view.component.ListRenderer" dataProvider="{detailAC}" width="200" height="200"/>
Is it a little bit trick?
Jeffrey

Similar Messages

  • How to check if a list contains items from another list

    Hi all,
    I am trying to check whether a text list contains items form
    another list and then do something. I tried:
    tlist contains text phrases (e.g., test1,test2,test3)
    phrases = ["test1","test2"]
    n = phrases.count()
    tList.getPos(phrases.item[n])
    alert("should not be inluded in the list")
    But it is not working any ideas why?

    myPhrase is the loop index, but instead of a numerical index
    (like n in your sample), myPhrase is set equal to each item in the
    phrases list, first item to last. So, on the first iteration
    myPhrase = “test1”, on the second iteration myPhrase =
    “test2”. The loop automatically exits when the end of
    the list is reached. The Director help docs have more information
    on this syntax under “repeat”
    BTW: if you're more comfortable using a numerical index, the
    syntax for getting at the n-th item in a list is list[n], or in
    your sample phrases[n]

  • No Price List Line Item in Price List detail page

    Hi
    I just started with Oracle ON Demand so my question my look silly but I couldn't find solution myself and I have to ask.
    When I created Price List and Product now it is time to connect one to another. But, when I went into Price List list page, click a price list name on the Price List detail page and try to click Add in the Price List Line Item section there simply is no such thing on my page. I tried on Product Edit page but wit the same effect. Do I do something wrong or for example there have to be specific field marked or unmarked somewhere? I still work in Staging Environment maybe it is a problem?
    Please help.
    Thanks

    At this time the price list functionality is only available for partner relationship management (PRM). It is on the roadmap to provide this functionality. However, I do not have a release date at this time.

  • Check class name of List ItemRenderer

    Hello,
    I am setting the itemRenderer of a Spark Mobile List like so:
    var ir:ClassFactory=new ClassFactory(MyItemRenderer);
    ir.properties={etc. etc.};
    list.itemRenderer=ir;
    How can I check if the list's itemRenderer is MyItemRenderer or at least a class name string comparison?
    Thank you.

    Custom itemRenderer:
    public class MyItemRenderer extends LabelItemRenderer {...}
    View:
    var ir:ClassFactory=new ClassFactory(MyItemRenderer);
    ir.properties={etc. etc.};
    list.itemRenderer=ir;
    trace(ClassFactory(list.itemRenderer).generator);
    That outputs: [Class LabelItemRenderer].

  • Second list of items from selected item in first list

    Hi all,
    I have 2 dropdown lists in my jsp page. i am retrieving data from database for my first list box. the second list box data should be displayed when user select an item from the first list. the selected item from first list is necessary to get another list of items in second list. i dont want to use any buttons or submits. i want to redirect the data to the same page to get another list when user click one option from first list. Thanks in advance for any suggestion.

    use ajax or store the data in javascript array

  • Accessing S:List Checkbox Item Renderer Outside the Renderer

    Hi All,
    I have an S:List, with a checkbox item renderer.  I was to be able to access the selected portion of the renderer to create a new function that at the press of a button this will delect all the current selected items in the list.
    Doco states that i should be able to do this just by setting the selectedIndex to -1.  But not sure if this is specific to 4.5??  But it is not working for me.
    Below is my current list.  Outside of this list flashbuilder does not know about chkList, or even selected.  How can i get access to this to deslect all?
    <s:List
    id="ltattributes">
    <s:itemRenderer>
    <fx:Component>
    <s:ItemRenderer>
    <fx:Script>
    <![CDATA[
    import mx.events.ItemClickEvent;
    protected function chkList_changeHandler(event:Event):void
    var e:ItemClickEvent = new ItemClickEvent(ItemClickEvent.ITEM_CLICK, true);
    data.selected = event.currentTarget.selected;
    e.item = data;
    e.index = itemIndex;
    dispatchEvent(e);
    ]]>
    </fx:Script>
    <s:CheckBox id="chkList" selected="false" label="{data.displayname}" change="chkList_changeHandler(event)"/>
    </s:ItemRenderer>
    </fx:Component>
    </s:itemRenderer>
    Thanks

    Try: dataGroup.getElementAt(). 
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Extending a component which already extends a spark list ItemRenderer

    Hello everyone,
    I have the following situation: Im displaying lists of very similar data objects (they extend the same parent) so in order to avoid a lot of changes to many itemrenderers (if i need to change something in the common properties) when displaying this data, i defined a spark list ItemRenderer (in MXML) which displays the common properties (file called BaseRenderer.mxml):
    <s:ItemRenderer>
         //in the script section i override the set data property
         //some MXML labels, checkboxes, etc
    </s:ItemRenderer>
    Then i created a specific itemrenderer which extended it (file SpecificRenderer.mxml):
    <model:BaseRenderer>
         //again i override the set data property
         //some ADITIONAL MXML labels, checkboxes, etc
    </model:BaseRenderer>
    When i run the app, and when the specific renderer is used, it works (no errors are thrown) , but it only shows the content of specific renderer, nothing from base renderer is visible. Is this the right way to do this, or do i have to override some additional stuff in my specific renderers?
    Thank you.
    One more thing, i just noticed, if i remove all MXML tags from specific renderer, the content from base renderer becomes visible, seems as if specific content overrides base content. Is there a way to add mxml tags into the specificrenderer?

    Yes i suspected them to be merged, and you gave me a great idea. As you say this behavior is true across all mxml defined components, not just itemrenderers. I want to avoid actionscript renderers because i dont (and wont) have any performance issues anyway and i like flexibility in design view, so instead i found another solution which i slightly modified. Some spark components inherit property mxmlContent, which you can override. This is what i came up with in the end: I added the property override into specific renderer and everything is shown as expected (because base elements are merged with the ones from extended component).
    override public function set mxmlContent(value:Array):void {
                                            var adding:Boolean = true;
                                            var index:int = 0;
                                            while (adding) {
        var element:IVisualElement = null;
        try {          element = super.getElementAt(index); } catch(e:Error) {          }
        if ( element != null )  {
           value.push(element);
           index += 1;
        else
          adding = false;
                                            value.reverse();
                                            super.mxmlContent = value;

  • How to create a background image for each item in a List object

    Hello.
    I am trying to create a background image that displays whenever a user posts something to a list.  For example when a user posts text it would appear in a list.  The new item in the list would contain a specific background image with the users text appearing on top of the background image.  I do not want a background image for the entire list, rather each item within the list.
    I am not sure how clear this is so I added an image below.  When a user enters text in and clicks the "post-it" button their text would appear below with the sticky note background. 
    I am not sure which list type would be best for this problem or how to create insert the image, so I am open to suggestions. 
    Thank you for your help.  Any advice or guidance will be greatly appreciated!

    Hi
    the easiest way would be with itemRenderer.
    You have to do two things:
    1. In your list declaration use a item renderer: <mx:List itemRenderer="myRenderer"/>
    2. create a flex component myRenderer that will be the single item. This can be a canvas with a background image and a text field on it.
    When you add a new item to the list, a new myRenderer item will be created and the data property will be passed to it. So you have to put "data" in your textField.
    If you need more help try looking at Tour de Flex samples, they're pretty easy.
    Andrei

  • How to make items in a list word wrap as needed and be variable heights

    I am trying to build a custom itemrenderer for the List control.  The items in the list are variable lengths of text, some of the text items will have different colors determined at runtime base on some criteria (this works fine now with my custom itemrenderer).  What I need is for the items to word wrap, and therefore for the list to display items of varying heights.  Is this possible to do?  All my attempts seem to have failed.  If I can't do this with an item renderer any suggestions about how to do this?  Thanks very much in advance to any of you gurus who are able to help me.

    Trick here is not to specify any height for the renderer so that Flex will determine the height according to the content. Also set the variableRowHeight="true"
    Here is a simple example
    <mx:ArrayCollection id="dp">
            <mx:Array>
                <mx:Object label="some very long text"/>
                <mx:Object label="some very loooooooooooooooooooooooooooooooooong text"/>
                <mx:Object label="some very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong text"/>
                <mx:Object label="some very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong text"/>
                <mx:Object label="some very long text"/>
            </mx:Array>
        </mx:ArrayCollection>
        <mx:List dataProvider="{dp}" variableRowHeight="true">
            <mx:itemRenderer>
                <mx:Component>
                    <mx:Canvas width="100%">
                        <mx:Text width="100%" text="{data.label}"/>
                    </mx:Canvas>
                </mx:Component>
            </mx:itemRenderer>
        </mx:List>

  • A 2-sided track's Thumb, with a list of items in center, forces the tumb to jump on selected item

    With Adobe Catalyst, you can create nifty VerticalScrollBars for DataLists. I've create a thumb of the verticalscroll bar as two images (left & right of track).  When I click on an item in the list, the thumb listens to the mouse on the track and tries to scroll to that area, instead on selecting the ticket.
    Check the image for a clearer explanation:
    In the Code of the Skin of List:
    <s:VScrollBar fixedThumbSize="true" skinClass="components.VerticalScrollbar1" x="0" y="0" viewport="{dataGroup}"/>
    And the Skin VerticalScrollBar1:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Skin xmlns:s="library://ns.adobe.com/flex/spark" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:d="http://ns.adobe.com/fxg/2008/dt">
    <fx:Metadata>[HostComponent("spark.components.VScrollBar")]</fx:Metadata>
    <s:states>
    <s:State name="normal"/>
    <s:State name="disabled"/>
    <s:State name="inactive"/>
    </s:states>
    <s:Button skinClass="components.Track1" x="7" y="0" id="track"/>
    <s:Button skinClass="components.Thumb1" x="0" y="104" id="thumb"/></s:Skin>
    and the Thumb1:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Skin xmlns:s="library://ns.adobe.com/flex/spark"     xmlns:fx="http://ns.adobe.com/mxml/2009"     xmlns:d="http://ns.adobe.com/fxg/2008/dt" xmlns:graphics="assets.graphics.*">
    <fx:Metadata>[HostComponent("spark.components.Button")]</fx:Metadata>
    <s:states>
    <s:State name="up"/>
    <s:State name="over"/>
    <s:State name="down"/>
    <s:State name="disabled"/>
    </s:states>
    <graphics:Graphic2 x="0" y="0" d:userLabel="ThumbLeft"/>
    <graphics:Graphic1 x="146" y="0" d:userLabel="ThumbRight"/>
    </s:Skin>
    Notice that there are two thumbs, and an empty area in the middle, in the hope that it would ignore the mouse of that area where the items are located.

    Here's a sample script that first defines a list of items in an array and uses it to update a number of dropdowns, name dd1...dd10:
    // Populate an array with the list items
    var aItems = ["-- Select a state --", "Alaska", "Hawaii", "Washington", "Oregon", "Idaho", "Montana", "Wyoming", "Nevada", "Colorado", "Arizona", "New Mexico"];
    // Loop through the dropdowns...
    for (var i = 1; i < 11; i += 1) {
        // ...and set the list items
        getField("dd" + i).setItems(aItems);
    That's all there is to it. This can be run from the Mouse Up event of a temporary button that you create, the interactive JavaScript console (Ctrl+J), etc.
    More info on setItems: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.752.html

  • Problem with space between rendered items in a list component

    Hi,
        Thanks again for taking your time to read my newbie posts. I found (and prove) over the internet that I can set some space between rendered items of a list based component using paddingTop and padding Bottom (vertical space), so I asume that I can do the same thing with paddingLeft and paddingRight. But as a matter of fact, it didn't work, why? that's what I would like to know, and how can I solve this. I would really apreciate if you help me do this.
    Thanks again
    Sebastián Toro O.

    Yeah, it is inconsistent.  The renderer has to implement paddingLeft/Right.
    It was done this way for performance reasons.  The Spark List in Flex 4 is
    more consistent.

  • Dynamic height of mx:Text in List ItemRenderer

    Hello,
    I want to have a list with line breaks if the width of the
    items is higher then the width of the list.
    I wrote my custon ItemRender but if i set the no height to
    the mx:Text there would be only first line tdisplayed on the list
    My List looks like this
    <mx:List id="level1" dataProvider="{level1List}"
    width="100%" height="100%"
    change="selectLevel1ItemEvent(event)">
    <mx:itemRenderer>
    <mx:Component>
    <mx:VBox height="100%">
    <mx:Text width="100%" height="40" text="{data.desc}"/>
    </mx:VBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:List>
    The problem is that know all items have a height to fit an
    item with two lines. I want only have this if the width of an item
    is higher than the width of the list.
    Thanks,
    Stefan

    try setting minHeight of the RTE to 0

  • How to influence APEX 4.0 autocomplete text item drop down list's colors?

    Hi,
    Could some body please point me to the template that I have to modify?
    I am using theme 15 and the text item with auto complete has a very different color schema, that I would like to modify, so that it would harmonize with Theme 15 colors. It's just that I can not seem to find the template to modify. TIA.
    Tamás

    Tamas
    There's no template for the autocomplete item. It's appearance is controlled entirely using CSS. Theme 15 does not include themed styling for autocomplete items: it falls back to a generic scheme specified in the <tt>apex_4_0.css</tt> style sheet:
    .ac_results {
      padding: 0;
      border: 1px solid black;
      background-color: white;
      overflow: hidden;
      z-index: 99999;
    .ac_results ul {
      width: 100%;
      list-style-position: outside;
      list-style: none;
      padding: 0;
      margin: 0;
    .ac_results li {
      margin: 0;
      padding: 2px 5px;
      cursor: default;
      display: block;
      font: menu;
      font-size: 12px;
      line-height: 16px;
      overflow: hidden;
    .ac_results li {
      margin: 0;
      padding: 2px 5px;
      cursor: default;
      display: block;
      font: menu;
      font-size: 12px;
      line-height: 16px;
      overflow: hidden;
    .ac_loading {
      background: white url('indicator.gif') right center no-repeat;
    .ac_odd {
      background-color: #eee;
    .ac_over {
      background-color: #0A246A;
      color: white;
    }The best approach would be to use a web inspector tool to identify what each of these rules does in the context of using the autocomplete item and create your own theme-15-friendly style sheet to override this subset of <tt>apex_4_0.css</tt>.

  • How Can i display a checkbox with list of items

    Hi All,
            How can i include a check box beside the list of items in a combo box/list box
    Here is the requirement which i need to display
    i need to do above requirement. i have to display the check boxes  beside the each item.
    i can show the list of items but unable to show the check boxes.
    Can any one help me regarding this.
    Thanks in advance
    Raghu

    Hope this can help u
    <mx:ComboBox id="cmbtheme" labelField="id" width="30" dropdownWidth="100">
      <mx:itemRenderer>
       <mx:Component>
        <mx:HBox horizontalGap="0">
         <mx:CheckBox id="{data.Nid}" label="{data.label}"/>     
        </mx:HBox>
       </mx:Component>
      </mx:itemRenderer>
    </mx:ComboBox>
    Regards,
    Kapil Arora

  • List ItemRenderer access multiple data

    I have a list component with a itemRenderer. The renderer has two label compoenents. Imagine the data provider has 4 objects like a,b,c,d.
    I want to display the data in the label components like this 'a' in the first label component and 'b' in the second label component.
    Means, I want to access the next data item in each iteration in the itemRenderer.
    Any help will be appriciated.
    Thanks
    Gan

    This trick is creating a second, empty, ArrayCollection which is databound to the drop-enabled list.  When you want to do anything to the items in that list, you simply work with that 2nd ArrayCollection.  Heres some code:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"   xmlns:ns1="*">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    [Bindable]
    private var ac:ArrayCollection = new ArrayCollection([
    {restaurant: 'Restaurant 1'},
    {restaurant: 'Restaurant 2'},
    {restaurant: 'Restaurant 3'},
    {restaurant: 'Restaurant 4'}
    [Bindable]
    private var ac2:ArrayCollection = new ArrayCollection();
    private function removeSelected():void{
        ac2.removeItemAt(chosenList.selectedIndex);
    ]]>
    </mx:Script>
    <mx:DataGrid dataProvider="{ac}" dragEnabled="true">
        <mx:columns>
            <mx:DataGridColumn headerText="Restaurant" dataField="restaurant"/>
        </mx:columns>
    </mx:DataGrid>
    <mx:DataGrid id="chosenList" dataProvider="{ac2}" dropEnabled="true">
        <mx:columns>
            <mx:DataGridColumn headerText="Restaurant" dataField="restaurant"/>
        </mx:columns>
    </mx:DataGrid>
    <mx:Button label="Remove Selected" click="removeSelected()"/>
    </mx:Application>
    Hope this helps.
    Joe

Maybe you are looking for

  • ITunes v7 no longer syncs with Outlook Calendar

    I just updated iTunes from version 6 to version 7. BIG MISTAKE. I can no longer sync my outlook calendar. It does now sync Outlook contacts which did not work with the old version, but now calendar no longer syncs but it did in the old version. My ca

  • Getting Information about In-Time and Out-Time

    Hello Experts, I want to retrieve the In time and Out time of Employees. The data is maintained in Infotype 2002 (Attendences). How would I get the data. Is there any Function Module avaiable for this ? Please help me out.. Regards, Ravi Khattar.

  • Copy selection from one pdf to another pdf

    Who knows how I can copy a selection from one pdf (including pictures and text) into another pdf?

  • Online no is not going through

    Hi there, from couple of days, the person who is calling at my skype no are saying the call is not going through. can someone please sort this mette out ASAP 

  • Stock adjustment in CIN part

    Hi all, We are working in CIn client. Now we have done Physical inventory for a material. We done MI01, MI04 and MI07 and adjusted IM part. To cover excise part in which tcode we need to do excise adjustments in case of shortage and excess? The mater