ItemRenderer for access in the spark list

Hello

I have a list with itemRenderers generated dynamically depending on the types of items (as a Manager who has a kind of rendering engine and the other type of employees has other types of converters). I would like to access the itemRenderer for 'selectedItem' of the list manager, but the selectedItem(item:Object) has direct access to the data item, not its rendering engine.

I prefer to dissociate the issue of its rendering engine as much as possible.

Sorry if this is considered to be a station of the cross as I noticed a similar to stackoverflow post. But he doesn't seem to get all the answers so far. Thank you.

In Flex, a data element is not directly mapped a specific converter.  It's because of virtual layout converter and recycling section.  If the data element is not in sight so it will probably not a rendering that are associated with engine and it is possible for a single data item to be pushed in the instances of the rendering engine different during its lifetime (for example when scrolling of the list).  In spark's best practice is to change the data item and design your converter to detect and react to these changes, rather than interacting directly with the instance of the rendering engine.

Check out the spec of virtualization of spark for more information on the virtual presentation and rendering recycling: http://opensource.adobe.com/wiki/display/flexsdk/Spark+Virtualization

If you really don't want to have access to instances of the renderer you still can, but you should be only after that you have a really good understanding of what is happening.

Here is an example, you can use the method getElementAt() of the part of skin of the dataGroup list:

http://ns.Adobe.com/MXML/2009.
xmlns:s = "library://ns.adobe.com/flex/spark" creationComplete = "traceRenderers ()" > "
   
        private function traceRenderers (): void {}
for (var i: int = 0; i< list1.datagroup.numelements;="">
trace (List1.dataGroup.getElementAt (i));
}
]]>
   

   
   
       
           
               
[0,1,2,3,4,5,6,7,8,9,10,11,12,13]
               

           

       

   

Tags: Flex

Similar Questions

  • Necessary to set the height and width of the image of itemRenderer for virtualization of the list

    Hello

    By default the spark list supports virtualization (which is cool), but I came across a problem with the list create all of the itemrenderers even when useVirtualization is set to true. After some debugging and the samples I made, it became clear he did not define the width and height on the image within the itemRenderer.

    Is this a bug or an expected behavior?

    
    
    
    
    <?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" 
                        autoDrawBackground="true" useHandCursor="true" mouseChildren="false" creationComplete="itemrenderer1_creationCompleteHandler(event)">
         <fx:Script>
              <![CDATA[
                   import mx.events.FlexEvent;
    
                   protected function itemrenderer1_creationCompleteHandler(event:FlexEvent):void
                   {
                        trace("created " + this.data);
                   }
    
              ]]>
         </fx:Script>
         
         <!-- Without setting a specific height it will not work in virtualization! -->
         
         <mx:Image height="187" width="280" source="{data}" />
         
    </s:ItemRenderer>
    
    

    https://bugs.Adobe.com/jira/browse/SDK-23621

  • How to keep the audit record for access to the Internet folder?

    Referring to the following link, I like to keep the audit record for access to the file from the Internet,

    Does anyone have suggestions on the option that I can put on this record?

    Thanks in advance for your suggestions

    http://support.Microsoft.com/kb/310399

    Hello

    You can follow this link & check if the problem persists:

    Monitor attempts to access and change settings on your computer

    Hope the helps of information.

  • SSL certificate for access to the administration of a WSA

    Can someone point me to a guide on how to install an ssl certificate for access to the administration of a WSA?

    Curiously, all the documents that I could find so far talk of SSL certificate for HTTPS decryption...

    Page 367 of this doc.  http://www.Cisco.com/c/dam/en/us/TD/docs/security/WSA/wsa8-0/wsa8-0-6/WSA_8-0-6_User_Guide.PDF

  • What is the best way or best practices for access to the session defined in servelt pipeline component?

    Hi Experts,

    What is the best way or best practices for access to the session defined in servelt pipeline component?

    Please, share your ideas.

    Thank you

    ankV

    As performance is concerned, a lot would depend on as to how your design & logic is implemented and you presented search operations to support the specific performance problems. In fact the operation itself can be not expensive than in-house it is somewhat like a search for key/value of the objects in session/application context name. But having said that, Yes, a potential performance problem could be because it's a synchronized operation. So to avoid searches to be performed during each request, caching the results of a search of a component. And in the majority of cases to solve a 'A' component within your component, you must configure a property reference 'A' in the file properties for your component.

  • Turn off the Spark list selection indicator

    How can I get rid of list selection indicator Spark entirely?  I don't want the rectangular indicator when the mouse hovers over an element, and I don't want the color to change when the mouse is clicked.

    You will need to prolong converter item by default (ItemRenderer for example) and autoDrawBackground set to false. Then use your converter to element in a list.

    See this document for more information on point of spark converters.

  • As for access to the id of the component in the element of the action script converter

    Hello

    I enclose the screenshot and the code snippet, as a result of the screenshot, I explain my problem.

    input_image.JPG

    Here you can see two panels with the same data, but each Panel is to have his own dataprovider. I used for combobox itemRenderer. When the type of the parameter 'Date' is selected in one of the row of each Panel, then at that time date combobox must become visible, as I'll have different date formats in the comboxbox. I used the outerDocument to call the method in the actionscript code, but I cannot access the id of the combobox of date format. As I rolled alert to check is I am able to call the method, tht works very well. Please help me how to control the visibility(visible=true/visible=false) of the list box dropdown date format on the choice of date in the parameter type combo box. Also, I paste the snippet of code here...

    < mx:Script >
    <! [CDATA]
    Import mx.controls.Alert;
    Import mx.controls.ComboBox;
    Import mx.events.CloseEvent;
    TO check the status on ComboBox
    public void closeHandler(event:Event):void {}
    Alert.Show ('Hello');
    If (SelectedIndex of the ComboBox (event.target) == 1)
    Alert.Show ('parentApplication.paramType')

    inputGrid.paramType.visible = true;
    parentApplication.comboD.visible = true;
    on the other
    parentApplication.comboD.visible = false;
    }
    []] >
    < / mx:Script >
    < mx:XMLList id = 'service' xmlns = "" >
    < parameter >
    < parameterName > Param - 1 < / parameterName >
    < comboSlctIdx > 0 < / comboSlctIdx >
    < validSlctIdx > 0 < / validSlctIdx >

    < / parameter >

    < parameter >
    < parameterName > Param - 2 < / parameterName >
    < comboSlctIdx > 0 < / comboSlctIdx >
    < validSlctIdx > 0 < / validSlctIdx >
    < dtSlctIdx > 0 < / dtSlctIdx >

    < / parameter >
    < / mx:XMLList >
    < mx:XMLList id = "comboDS" xmlns = "" >
    < parameter >
    < label > String < / label >
    < data > true < / data >
    < / parameter >
    < parameter >
    < label > Date < / label >
    < data > true < / data >
    < / parameter >
    < parameter >
    < label > Integer < / label >
    < data > true < / data >
    < / parameter >
    < / mx:XMLList >

    < mx:XMLList id = "comboV" xmlns = "" >
    < parameter >
    < label > required < / label >
    < data > true < / data >
    < / parameter >
    < parameter >
    < label > not required < / label >
    < data > true < / data >
    < / parameter >

    < / mx:XMLList >

    < mx:XMLList id = "comboD" xmlns = "" >
    < parameter >
    < label > JJ/MM/AAAA < / label >
    < data > true < / data >
    < / parameter >
    < parameter >
    < label > JJ/MM/AAAA < / label >
    < data > true < / data >
    < / parameter >
    < parameter >
    < label > AAAA/MM/JJ < / label >
    < data > true < / data >
    < / parameter >
    < / mx:XMLList >

    < mx:XMLList id = "service1" xmlns = "" >
    < parameter >
    < parameterName > Param - 1 < / parameterName >
    < comboSlctIdx > 0 < / comboSlctIdx >
    < validSlctIdx > 0 < / validSlctIdx >
    < / parameter >

    < parameter >
    < parameterName > Param - 2 < / parameterName >
    < comboSlctIdx > 0 < / comboSlctIdx >
    < validSlctIdx > 0 < / validSlctIdx >
    < dtSlctIdx > 0 < / dtSlctIdx >
    < / parameter >
    < / mx:XMLList >

    < mx:XMLList id = "comboDS1" xmlns = "" >
    < parameter >
    < label > String < / label >
    < data > true < / data >
    < / parameter >
    < parameter >
    < label > Date < / label >
    < data > true < / data >
    < / parameter >
    < parameter >
    < label > Integer < / label >
    < data > true < / data >
    < / parameter >
    < / mx:XMLList >

    < mx:XMLList id = "comboV1" xmlns = "" >
    < parameter >
    < label > required < / label >
    < data > true < / data >
    < / parameter >
    < parameter >
    < label > not required < / label >
    < data > true < / data >
    < / parameter >

    < / mx:XMLList >

    < mx:XMLList id = "comboD1" xmlns = "" >
    < parameter >
    < label > JJ/MM/AAAA < / label >
    < data > true < / data >
    < / parameter >
    < parameter >
    < label > JJ/MM/AAAA < / label >
    < data > true < / data >
    < / parameter >
    < parameter >
    < label > AAAA/MM/JJ < / label >
    < data > true < / data >
    < / parameter >
    < / mx:XMLList >

    < mx:DataGrid id = "inputGrid" width = "100%" dataProvider = "{services}" >
    < mx:columns >
    < mx:DataGridColumn headerText = "Parameter name" dataField = "parameterName" fontFamily = "Arial" letterSpacing = "1" textAlign = "center" / >
    < mx:DataGridColumn headerText = "Parameter Type" fontFamily = "Arial" letterSpacing = "1" textAlign = "center" >
    < mx:itemRenderer >
    < mx:Component >
    < mx:HBox horizontalAlign = "center" >

    < mx:ComboBox id = dataProvider = "{parentApplication.comboDS"paramType"}" selectedIndex = "{data.comboSlctIdx}"close = "outerDocument.closeHandler (event);" / >

    < / mx:HBox >
    < / mx:Component >
    < / mx:itemRenderer >
    < / mx:DataGridColumn >

    < mx:DataGridColumn headerText = "Validation" fontFamily = "Arial" letterSpacing = "1" textAlign = "center" >
    < mx:itemRenderer >
    < mx:Component >
    < mx:HBox horizontalAlign = "center" >
    < mx:ComboBox dataProvider = "{parentApplication.comboV}" selectedIndex = "{data.validSlctIdx}" / > "
    < / mx:HBox >

    < / mx:Component >
    < / mx:itemRenderer >
    < / mx:DataGridColumn >
    < mx:DataGridColumn headerText = "" >
    < mx:itemRenderer >
    < mx:Component >
    < mx:HBox horizontalAlign = "center" >
    "< mx:ComboBox id = dataProvider =" {parentApplication.comboD "dtType"} "selectedIndex =" {data.dtSlctIdx} "visible ="false"/ >
    < / mx:HBox >

    < / mx:Component >
    < / mx:itemRenderer >
    < / mx:DataGridColumn >

    < / mx:columns >
    < / mx:DataGrid >

    Thanxs

    Gerard

    follow these steps:

    -the change of Manager from the drop-down list type, change a property of the row (data)

    change = "{Data .selectedParamType = paramType.SelectedItem.Label.ToString () ;} ', for

    -Change the visible property of the combo of date:

    visible = "{Data .selectedParamType =='Date ' '} ', for"

  • Tecra M11 has a trap door for access to the hard drive?

    Can someone tell me if the Tecra M11 is equipped with a door to provide access to the hard drive?

    Previous Tecras have such a door, but I can't say for some photos of the site Web or the M11 manual if this still applies. I need to know before ordering.

    Thanks in advance for any help.

    Hello

    I put t know what you mean exactly. hatch giving access to the disk hard but the notebooks THAT HDD is placed at the bottom of the unit.
    You can easily remove the cover that secures the HARD drive Bay to get access to the internal HARD drive

    Welcome them

  • Firewall exceptions for access to the online content for first 14 elements

    Hi Adobe community.

    First 14 elements doesn't seem to be coping very well being located behind a firewall and have access to the internet (for online content) through a proxy (configured by proxy.pac... can't change that). Anyone would be able to provide the URLs/DNS names/IP addresses of the IP ports and Protocol (TCP/UDP) that I have to allow through the firewall for first Elements have access to online content?

    Thank you and congratulations in advance

    Peter

    Hi ATR & one who reads this.

    I come to the solution by using Wireshark to analyze what happens when Premiere Elements wants to download content such as 'titles and text. As mentioned previously, seems many internet traffic resumes with success the proxy settings correct and is therefore through the proxy server.

    Managed to get the Premiere Elements to download content online by allowing the following FQDN on the Cisco corporate firewall (not for the first relevant destinations are blocked on our proxy):

    HTTP static.photoshop.com

    Hope this helps someone out there.

    See you soon,.

    Peter

  • Network for access to the external interface inside

    Hey,.

    I have an ASA5520 7.2 (1) I have a few probs with - which is something I struggle with that.

    I'm trying to hit a website of a host on the inside network that is actually hosted internally, but decides the static NAT would focus on the external interface of the firewall.

    Now I can see the TCP built, translation occurring at a port on the external interface, this port high dialogue to one of the static electricity would be addresses on the external interface, then that's all. There are no more entries in my journal in regards to the connection and I get not syn on the internal web server is so the connection is not back in.

    IP address outside 222.x.x.9 255.255.255.248

    IP address inside 192.168.87.1 255.255.255.0

    Static NAT to Web servers: -.

    public static 222.x.x.10 (Interior, exterior) 192.168.87.5

    access lists access... :-

    list of allowed inbound tcp extended access any host 192.168.87.5 eq http

    Access-group interface incoming outside in

    Everything works fine when creating a global internet address - just not when address from inside and dynamic PAT is performed to the original address.

    Here's a capture session by using the following access to capture list inside and outside interfaces simultaneously

    permit for line of web access-list 1 scope ip host 222.222.222.10 all

    web access-list extended 2 line ip allow any host 222.222.222.10

    on the INSIDE interface (nothing is connected to the outside) (ip addresses have been replaced by nonsense) - but address 222 is would take into account the interface static and the other is on the internal network.

    316: 19:14:02.900206 192.168.87.10.2275 > 222.222.222.10.80: S 2029971541:2029971541 (0) win 64512

    317: 19:14:05.973185 192.168.87.10.2275 > 222.222.222.10.80: S 2029971541:2029971541 (0) win 64512

    192.168.87.10 is my client is trying to connect

    Someone of any witch hunt, which is stop this function work?

    All networks are directly attached and there is no route summary ancestral anywhere.

    I hope you guys can help!

    Concerning

    Paul.

    To my knowledge the ASA supports only hairpining on a VPN tunnel. The security apparatus does not allow traffic that is sent to an interface to go back in the direction of what she received.

  • For access to the VLAN specific after VPN

    Hello

    I have a SRX5308 and have set up a PPTP VPN server. I have four VLANS configured, say:

    10.0.A.0/24

    10.0.B.0/24

    10.0.C.0/24

    10.0.D.0/24

    and setting up the PPTP server is giving VPN clients

    10.0.F.20 - 29

    I am able to connect to the server and surf as "from the network. But how can I set up a road (?) so I'm able to access (or logically be attached to) devices on 10.0.A.0/24 my VPN client network?

    I have searched high and low for this but didn't find clear instructions on how to do it.

    Any help would be appreciated.

    Thank you

    Joakim

    Ah yes, that would explain

    IPSec is very easy to set up, don't be scared by the many parameters - you won't really do much with then. In regard to the full domain name, you will define in the client, you connect since so little matter where.

    With the Netgear IPSec client, it is really easy and the support team can help you make it work... There is a 30 day free trial so you can test it.

    There is also a free third-party client called Shrewsoft, it is quite easy to set up too, but some features seem to be difficult to make it work, I would recommend the official client to Netgear, but if you want to give shrew a go, I've written a small guide just in time for a very basic client-to-box installation with it.
    http://www.hexnet.se/srx5308-IPSec-VPN-with-shrew-soft/

    I think that there were some problems with the Shrew and certain firmware even if, at some point given, you couldn't perform mode config (i.e. what shrew own manual shows) but I can't work with the latest firmware of the srx5308... But I didn't spend too much time on this, I'm sure that it can be understood.

  • index of password for access to the

    I recently changed my password and have a password hint.  I am the administrator of the computer and I have not the Welcome screen enabled we will I access my index of password since I forgot it!  Y at - it another way to access my password hint.  I have access via a different user account, but his account is limited.  Help!

    Hello

    This is information from Microsoft for when you forgot your XP password.

    "How to connect to your Windows XP-based computer if you forget your password or if your password expires"

    http://support.Microsoft.com/kb/321305

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    Other information above, we can not help you more with this.

    Microsoft prohibits any help given in these Forums for you help bypass or "crack" passwords lost or forgotten.

    Here's information from Microsoft, explaining that the policy:

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-security/keeping-passwords-secure-Microsoft-policy-on/39f56ef0-5d68-41AD-9daa-6e6019c25d37

    See you soon.

  • For access to the

    I've set up a router Linksys E4200 as an access point on my network. It is connected through a lan cable to my main router IP address is 192.168.2.1 and address pool is 1982.168.2.2 to 192.168.2.100. To configure the Linksys as access point, I changed its fixed in 192.168.2.99 and turned off DHCP IP address. Now I need to access the administration interface of Linksys routers to change some of the settings of the guest network but I can't work on how to do this. I would be very grateful if anyone can advise me on this. Best regards, Kevin O'Brien

    Thank you all for your suggestions. Have reset the router access point 192.168.2.101 IP address and everything works perfectly.

  • BlackBerry Z10 GMAIL account only for access to the calendar creation

    I wanted to ask you members of the jury if they had experience with this, before I ruin my Z10.

    I need to access a Google Calendar and pour the contents in my calendar on the Z10 constantly updated. Otherwise, I use the software Link with USB with Outlook 10 and use the account of BBLink calendar on my device. Right now I do not link Gmail with my Z10 and I do not want.

    As I tried to put in place, it seems that Google wants to access my camera, put in place an e-mail account, synchronize my contacts. I stopped the installation program and do not advance.

    I have the leaked OS 10.2.0.1371, which is awesome, BTW and I add option subscribed calendar in add them new account settings, but I have been unable to do so after I tried a www.google.com as the server address or the google link provides the option of setting the calendar...

    Is it possible to add a GMAIL account with messaging, contacts, just get a 1-way synchronization schedule synchronization?

    Alex

    During the installation process, you can be (depends on your level of operating system) presented with several different screens, some will be pretending come from GMail and other BlackBerry. One of those who may make statements want to allow setting up the agenda, your contacts and emails... but this screen will not provide any options but to accept or cancel. This screen is actually just informative... saying you have to accept if you want to be able to use an ANY of these, but that screen does not actually set any of them. When you accept this first screen, it will proceed to the other screens, which is where you choose actually the functions you want to integrate (calendar, contacts, or email)... simply because of the slide for OFF those you don't want to not activate.

    Good luck!

  • Bis for access to the network

    Hi guys, I am a newebie to the blackberry java development, and ive read several topics and questions. I'm working on the development of an application that requires network support, essentially BIS. But from what ive read, seems that you must be a member of the alliance to cm BIS-B. Saw something on the use of BIS-push. I want to know if I "l be able to use the BIS to connect to a server when you use BIS-push for free, because I couldn't find much info about it.

    Welcome.

    "I want to know if I" l be able to use BIS to connect to a server when you use the BIS-push for free.

    Yes - as described here:

    http://supportforums.BlackBerry.com/T5/Java-development/sample-HTTP-connection-code-and-bis-B-access...

Maybe you are looking for