Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/44.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache flex 将值传递给spark列表项渲染器_Apache Flex_Itemrenderer - Fatal编程技术网

Apache flex 将值传递给spark列表项渲染器

Apache flex 将值传递给spark列表项渲染器,apache-flex,itemrenderer,Apache Flex,Itemrenderer,我在主视图中有一个带有自定义ItemRedner的列表组件,如下所示 <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:android="http://schemas.android.com/apk/res/android"> <s:List id="lsRead" dataProvider="{dp}" wid

我在主视图中有一个带有自定义ItemRedner的列表组件,如下所示

<s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:android="http://schemas.android.com/apk/res/android">
<s:List id="lsRead"  dataProvider="{dp}" width="100%" height="100%">
 <s:itemRenderer>
<fx:Component id="rend">
 <s:ItemRenderer alternatingItemColors="[#DFDFDF,#EEEEEE]">
  <s:Label id="first" text="{data.nr}" visible="{bindableVariable_MainView}"/> 
      <s:Label id="second" text="{data.ar}" />
 </s:ItemRenderer>
</fx:Component>
 </s:itemRenderer>
</s:List>
</s:View>
我想使用主视图中定义的可绑定变量控制第一个标签的可见性。如何将其值传递给itemrenderer中定义的标签


向您致意,

我使用了outerDocument,它解决了问题


谢谢

我没有使用过,但当我必须为渲染器提供任何变量时,我必须使用可用变量创建customRenderer类,并使用label将其绑定。。。。 在主视图中,我采用或,并在其中添加组件customRenderer。。。 谢谢

我不知道外部文件。。谢谢分享