Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-21352

[localfix] ItemRenderer; Why do you hate my state group? Because of binding? [haiku]

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Adobe Flex SDK Previous
    • None
    • States
    • None
    • Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Found in 10640.

      Steps to reproduce:
      1. Compile and run attached MXML file.

      Actual Results:
      Background colors-n-stuff are black instead of specified contentBackgroundColor/rollOverColor/selectionColor.

      Expected Results:

      Workaround (if any):
      Dont use state groups w/ bindings and use the longform of explicitly specifying each individual state by default (lame).


      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark">

      <s:List itemRenderer="CustomItemRenderer" x="10" y="10">
      <s:layout>
      <s:VerticalLayout gap="0" requestedRowCount="5" horizontalAlign="contentJustify" />
      </s:layout>
      <s:dataProvider>
      <s:ArrayList>
      <fx:Object firstName="Ely" lastName="Greenfield" uid="001" />
      <fx:Object firstName="Glenn" lastName="Ruehle" uid="002" />
      <fx:Object firstName="Jason" lastName="Szeto" uid="003" />
      <fx:Object firstName="Ryan" lastName="Frishberg" uid="004" />
      <fx:Object firstName="Chet" lastName="Haase" uid="005" />
      <fx:Object firstName="Peter" lastName="Farland" uid="006" />
      <fx:Object firstName="Corey" lastName="Lucier" uid="007" />
      </s:ArrayList>
      </s:dataProvider>
      </s:List>

      </s:Application>

      — CustomItemRenderer.mxml —
      <?xml version="1.0" encoding="utf-8"?>
      <s:ItemRenderer focusEnabled="false" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark">
      <s:states>
      <s:State name="normal" stateGroups="normalGr" />
      <s:State name="hovered" stateGroups="hoveredGr" />
      <s:State name="selected" stateGroups="selectedGr" />
      <s:State name="normalAndShowsCaret" stateGroups="normalGr, caretGr"/>
      <s:State name="hoveredAndShowsCaret" stateGroups="hoveredGr, caretGr"/>
      <s:State name="selectedAndShowsCaret" stateGroups="selectedGr, caretGr"/>
      </s:states>

      <s:Rect left="0" right="0" top="0" bottom="0">
      <s:stroke.caretGr>
      <s:SolidColorStroke color="

      {selectionColor}" weight="1"/>
      </s:stroke.caretGr>
      <s:fill>
      <s:SolidColor color.normalGr="{contentBackgroundColor}"
      color.hoveredGr="{rollOverColor}"
      color.selectedGr="{selectionColor}

      " />
      </s:fill>
      </s:Rect>

      <s:RichText verticalCenter="0" left="3" right="3" top="6" bottom="4">
      <s:textFlow>
      <s:TextFlow>
      <s:div>
      <s:span>

      {data.firstName}

      {data.lastName}

      {data.uid}

      </s:span>
      </s:div>
      </s:TextFlow>
      </s:textFlow>
      </s:RichText>

      </s:ItemRenderer>

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: