[flex] Flex中,如何调用s:List中s:itemRenderer中内联控件的id?

ljxyuer 2011-09-06

<s:Button id="editBtn" x="874" y="12" width="60" height="30" label="编辑" cornerRadius="8" fontSize="14" click="editBtn_clickHandler(event)"/>
	<s:Button id="doneBtn" x="874" y="12" width="60" height="30" label="完成" cornerRadius="8" fontSize="14" visible="false" click="doneBtn_clickHandler(event)"/>
	<s:List id="cartList" dataProvider="{instance.shoppingCartData}" left="30" right="30" top="50" bottom="60" borderVisible="false" contentBackgroundAlpha="0.0">
		<s:layout>
			<s:TileLayout  horizontalGap="0" verticalGap="0" requestedColumnCount="1" columnWidth="800" rowHeight="120">				
			</s:TileLayout>
		</s:layout>
		<s:itemRenderer>
			<fx:Component>
				<mx:Canvas>
					<s:Image id="productPicture" x="149" y="10" width="120" height="100" source="{data.productPic}"/>
					<s:Label id="productName" x="366" y="17" fontSize="16" text="{data.productName}"/>
					<s:Label x="366" y="78" fontSize="16" text="数量:"/>
					<s:TextInput id="productNumberEdit" x="415" y="76" width="27" borderColor="#04FCED"
								 borderVisible="true" contentBackgroundAlpha="1.0" visible="false"/>
					<s:Label id="productNumberShow" x="420" y="81" width="27" fontSize="14" text="{data.productNumber}"/>
					<s:Label x="550" y="78" fontSize="16" text="价格:"/>
					<s:Label id="productPrice" x="600" y="81" fontSize="14" text="{data.productPrice}元"/>
					<mx:LinkButton x="800" y="74" label="&gt;&gt;查看详情" cornerRadius="4"/>
					<mx:LinkButton id="deleteBtn" x="820" y="16" label="删除" cornerRadius="4" visible="false"/>
					<mx:HRule y="120" left="5" right="0"/>
					<fx:Script>
						<![CDATA[							
						]]>
					</fx:Script>
				</mx:Canvas>
			</fx:Component>
		</s:itemRenderer>
	</s:List>

 如上所示,如何在editBtn点击的时候,调用s:List中s:itemRenderer里面的  <s:TextInput id="productNumberEdit"/>这个id-->    productNumberEdit?

 

各位大神,在线等啊~~~ 

Global site tag (gtag.js) - Google Analytics