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;

Similar Messages

  • Return data from spark list itemrenderer

    Does anybody no how to return data from the itemrender for a spark list. say i had a checkbx in my itemrenderer how can I get that info back to my main component if its selected or not. I looked at datagrid and itemeditor but I really rather use a spark list. Thanks

    thanks I also found another way to doing it. A click handler on my list when that fires I can check if checkbx has been selected by doing event.target.document.mycheckBx.selected this will not work if using currentTarget cause it take the info from the itemRenderer. Now I understand the difference between currentTarget and target.
    not sure if this is a better way to access the data I think I might still just dispatch a event and do it your way.
    Its weird that mx:list has a editItemRenderer  and s:list does not
    thanks again TK

  • 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

  • Survey input into a list which already exists?

    Can you have a survey populate specific items in a list which already exists?
    Example List Columns:
    Title
    Number
    Date
    Survey Result A (this is entered by a survey)
    Survey Result B (this is entered by the same survey)
    Also, can surveys be completed by people who do not have permissions to the site?
    Thanks!

    can surveys be completed by people who do not have permissions to the site?
    >> Yes, But user need permission on survey which will be uniquely configured by breaking permission inheritance
    >> User need to provide exactly url of survey response so that they can bypass the site
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • Spark list filter not working

    I have a spark list with custom itemRenderers and I have a filter on the list.  I run the filter, but at random times the filter doesn't work. I threw in some trace statements and its passing the filter but the screen doesn't show the filters results. It only shows the results of the last filter. I think it has to do with the spark lists itemRenderer resuse.
    Is this a known bug?

    The bug is in TileLayout. 
    If I remove the the TileLayout the list functions as aspected.  Here is a simple example.  Make sure when running the app to follow these instructions.
    1. Run the app (notice the list shows all the items in it)
    2. Click "K"
    3. Click "All"
    4. Look at the Bottom list to see if only two items show even when "ALL" is selected.
    5.Repeat steps 2-4 until you see the bug.
    <?xml version="1.0" encoding="utf-8"?>
    <!-- http://blog.flexexamples.com/2010/05/12/scrolling-to-a-specific-index-in-a-spark-list-cont rol-in-flex-4/ -->
    <s:Application name="Spark_List_ensureIndexIsVisible_test"
       xmlns:fx="http://ns.adobe.com/mxml/2009"
       xmlns:s="library://ns.adobe.com/flex/spark"
       xmlns:mx="library://ns.adobe.com/flex/mx">
    <fx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    private var array:Array = ['one', 'otwo', 'othree', 'ofour', 'ofive', 'osix', 'oseven', 'oeight', 'nine', 'nten'];
    private var myAC:ArrayCollection = new ArrayCollection( array );
    private function setAlphaFilter() : void {
    if( myAC ) {
    myAC.filterFunction = alphaFilter;
    myAC.refresh();
    private function alphaFilter( item:Object ) : Boolean {
    var tempStr:String;
    if( String(alphaList.selectedItem.firstName).toLowerCase() == 'all' ) {
    return true;
    if(  item.toLowerCase().charAt(0) == String(alphaList.selectedItem.firstName).toLowerCase() ) { // if something a letter is selected.
    return true;
    return false;
    ]]>
    </fx:Script>
    <s:List id="alphaList" changing="setAlphaFilter()"
    width="100%" top="2" bottom="2" left="2" right="2" borderColor="#7F7F7F" >
    <s:layout>
    <s:HorizontalLayout columnWidth="20" paddingLeft="1" />
    </s:layout>
    <!-- itemRenderer is inline in this sample -->
    <s:itemRenderer>
    <fx:Component>
    <s:ItemRenderer>
    <s:Group top="1">
    <s:Label id="blah" text="{data.firstName}" fontSize="13" bottom="1" top="1" right="1" left="1" />
    </s:Group>
    </s:ItemRenderer>
    </fx:Component>
    </s:itemRenderer>
    <s:dataProvider>
    <s:ArrayList>
    <fx:Object firstName="All" />
    <fx:Object firstName="A"  />
    <fx:Object firstName="B"  />
    <fx:Object firstName="C" />
    <fx:Object firstName="D" />
    <fx:Object firstName="E" />
    <fx:Object firstName="F"  />
    <fx:Object firstName="G"  />
    <fx:Object firstName="H" />
    <fx:Object firstName="I" />
    <fx:Object firstName="J" />
    <fx:Object firstName="K"  />
    <fx:Object firstName="L"  />
    <fx:Object firstName="M" />
    <fx:Object firstName="N" />
    <fx:Object firstName="O" />
    <fx:Object firstName="P"  />
    <fx:Object firstName="Q"  />
    <fx:Object firstName="R" />
    <fx:Object firstName="S" />
    <fx:Object firstName="T" />
    <fx:Object firstName="U"  />
    <fx:Object firstName="V"  />
    <fx:Object firstName="W" />
    <fx:Object firstName="X" />
    <fx:Object firstName="Y" />
    <fx:Object firstName="Z" />
    <fx:Object firstName="1" />
    <fx:Object firstName="2" />
    <fx:Object firstName="3" />
    <fx:Object firstName="4" />
    <fx:Object firstName="5" />
    <fx:Object firstName="6" />
    <fx:Object firstName="7" />
    <fx:Object firstName="8" />
    <fx:Object firstName="9" />
    </s:ArrayList>
    </s:dataProvider>
    </s:List>
    <s:List id="list" width="630" height="100"
    horizontalCenter="0" verticalCenter="0" dataProvider="{myAC}" useVirtualLayout="true" allowMultipleSelection="true">
    <s:layout>
    <s:TileLayout columnWidth="300" rowHeight="50" verticalGap="1" horizontalGap="1" 
      requestedColumnCount="2"  />
    </s:layout>
    </s:List>
    </s:Application>

  • Why do I need to reformat and erase backups on an external backup drive that I have been using for over a year, when I get this dialog box? The backup disk is not in Mac OS Extended (Journaled) format, which is required.

    The backup disk is not in Mac OS Extended (Journaled) format, which is required.

    Kappy's extensive hard drive formatting post - http://discussions.apple.com/thread.jspa?messageID=8340551 - note that instructions at end are for zeroing data.
    BDAqua's Formatting instructions - http://discussions.apple.com/message.jspa?messageID=8901255
    Pondini: Formatting,  Partitioning, Verifying,  and  Repairing  Disks... - http://pondini.org/OSX/Home.html

  • Boot Camp error: The startup disk cannot be partitioned or restored to a single partition. The startup disk must be formatted as a single Mac OS Extended (Jounraled) volume or already partitioned by Boot Camp Assistant for installing Windows.

    Hi!
    I am getting the error:
    "The startup disk cannot be partitioned or restored to a single partition.  The startup disk must be formatted as a single Mac OS Extended (Jounraled) volume or already partitioned by Boot Camp Assistant for installing Windows."
    I read up some on google, but all of them says that they have crated a partition and that is the problem, I only have the standard "Macintosh HD".
    I tried to create a partition manually in disk utility but then the error message: "Partition failed with error message: Could not unmount disk."
    Can anyone help me? It's driving me crazy.
    Thanks.

    This message, and threads like yours got asked daily for over two years, now it is only a couple times a week!!
    Is it so hard to follow through? you were to have backup already, clones are best, then erase/format and restore.
    Then partition.
    Some have been able to use Disk Utility booted from OS X DVD or another drive, and repair the drive.
    You have to use Boot Camp Assistant (99.9% anyway) to create and achieve a proper Windows Master Boot Record partition.

  • Which range extender works with the Linksys CIT400 phone?

    Which range extender works with the Linksys CIT400 VoIP phone? Can I use any range extender from any other comany or does it have to be one from Linksys? I am not sure if the CIT400 uses standard frequences.
    On a side note, where's the forum for the phones? I see one in the archives section which seems to be ready only.

    You can use the Linksys WRE54G range expander. For that matter, any 2.4Ghz range expander will work. But what’s more important is what router you would be using the range expander with!! Which router are you using?

  • HT4906 The backup disk is not in Mac OS Extended (Journaled) format, which is required.

    Time Machine error!
    The backup disk is not in Mac OS Extended (Journaled) format, which is required.
    And what's Time Capsule?

    If you're trying to use Time Machine with an external hard drive the drive must be formatted OS X Extended (journaled);
    So use Disk Utility to reformat the EHD and then open Time Machine and select the drive again.
    OT

  • Install Photoshop Extended Trial with Photoshop already installed.

    I've got Photoshop CS5 installed and I want to try the Extended version. I've downloaded it and installed it, but the only Photoshop.exe file launches the standard version. Can I have the standard version installed at the same time as the Extended trial or do I have to delete the standard version first?

    Did your installed copy of Photoshop not just revert to the trial mode, in which the Extended features are available, then?
    If not, you may also need to run the Creative Suite Cleaner Tool in addition to uninstalling.
    Also, I'm not sure there's an upgrade path for you to be able to increase Photoshop from Standard to Extended if you've purchased it as part of a suite...
    -Noel

  • The startup disk must be formatted as a single Mac OS Extended (Journaled) volume or already partitioned by Boot Camp Assistant for installing Windows.

    The startup disk must be formatted as a single Mac OS Extended (Journaled) volume or already partitioned by Boot Camp Assistant for installing Windows.

    nikasv wrote:
    The startup disk must be formatted as a single Mac OS Extended (Journaled) volume or already partitioned by Boot Camp Assistant for installing Windows.
    That's essentially what Solving Boot Camp partition creation problems says. What is your question?

  • Droplet or Simple Nucleus component which is better ?

    Hi,
    1)Droplet or Simple Nucleus Component which is better as per memory utilization (performence wise).
    2)extending one  Droplet in another droplet is recomended or injecting droplet which is recomended ?
    Please clear these issues if any body ASAP.
    thanks

    Hi,
    Droplets are intended to connect front end (jsps) with the business functionality thro nucleus components. They are primarily used for presentation logic which involves business rules.
    So, you need to decide to go for a mere nucleus component or droplet based on your requirement.
    It is good to have any business logic / common code in a tools class and call that method from the droplet. In this case, you do not need to extend other droplet and can reuse the code from the tools class by injecting the tools component.
    Please let me know if this helps. Or else, please specify the requirements more specifically.
    Hope this helps.
    Keep posting the updates.
    Thanks,
    Gopinath Ramasamy

  • Should i upgrade from photoshop cs3 extended to photoshop cs6 non extended

    hi im just wondering should i upgrade from photoshop cs3 extended to photoshop cs6 NON extended...... would i loose options from my extended version?
    also i dont use photoshop cs3 that much, does anyone think its worth me upgrading?
    thanks
    lee

    Good day!
    I think I read that with 2013 the upgrade path would be shortened, so you are probably not eligible for upgrading anymore.
    Apart from that the benefit of purchasing the current version of Photoshop naturally depends on what you are doing with Photoshop (both in terms of which features you use and how much you use the application overall).
    Smart Objects have been improved quite a bit, Puppet Warp is an interesting feature, Configurator allows for the easy creation of custom Panels that can combine Tools, Commands, Actions etc.,  …
    But to judge the programm yourself you could just install the trial – mind you, the trial is Photoshop Extended, so you may want to consult the Reference on which features you would not get with Potoshop Standard.
    You might also want to look into Cloud Licensing – or at least »Adobe« wants you to …
    Regards,
    Pfaffenbichler

  • Wants to activate batch management for a material which already had a Stock

    hi,
    i want to activate batch management for a material which already has a stock and open Purchasing documents.
    is there any way by which we can do it without removing the same.
    please help.

    program name is RVBCONVMAT2BM
    but i am doubtfull it will be delivered with standard SAP, you need to request you from SAP as they charge for this.
    this program convert the material to batch and all relevant dependant documents will be updated with batch no.
    Regards,
    Pravin Mukkawar
    pasting  some description of the program
    REPORT rvbconvmat2bm.
    Report illustrates the call of function module VBZ0401_CONVERT_OBJECTS
    which sets the batch management flag for one material including
    depending objects. Function module VBZ0401_FILL_BUFFERS helps
    improving the performance.
    then logic......

  • How do i transfer an itunes account from my old computer to another computer which already has an itunes account registered to someone else

    how do i transfer an itunes account from one computer to another which already has another account on it which is registered with someone else

    There is no account stored on any computer, the library however is stored.
    To move the iTunes library from one computer to another, copy the ENTIRE iTunes folder from one computer to another.

Maybe you are looking for

  • Settings not saving on Zen Nano Plus..am I the only o

    I got my ZNP back in March, and I use it pretty regularly. About a month ago I started having this odd problem: when I turned off my ZNP and then turned it back on, the settings were back to their default. At first I thought it was a problem with the

  • Error message on updates for CS6, error message on updates for CS6

    I've been having major issues with CS6 as well as CC - started with both versions of photoshop locking up, then totally refusing to open. Uninstalled both versions, just reinstalled CS6 but it is not opening unless I hit the shift key while initiatin

  • My Ipad Mini Remote app worked consistently until I upgraded my iTunes. Now it stops working.

    The Remote app worked consistently until I upgraded my iTunes.  Now when I first open  on my ipad  it will work but on subsequent tries it won't connect and tells me that I have to turn on home sharing (Which is already turned on). This is using my i

  • Database vs application users

    Hi. Please give some opinion on this: Wich is the best approach for managing users in a typical three-tier web application, using jdbc: A) The database has one or two users with the proper grants and privileges to manage data(eg. read_user for select

  • Do i have to bring my laptop to the genius reservation?

    I have problems with my charger but do i still have to bring my laptop? and I already prove the serial number when i made the reservation. Do I still need to bring the package or the receipt?