Its kind of odd to use a Tile List for this honestly.  For one,
doesn't appear TileLists support the idea of itemrenderer as editor.
Not saying it can't be used, but IMHO, I'd probably just use a
Repeater over a custom window shade type of component.  See Flex lib
for what I'm speaking of.  Each of these could have a instance of your
data objetc, you are using a typed object, right?  Then it would be
cake to gatehr the data and send it away.  You could use the datagrid
for this too, but I'm not a huge fan of editable datagrids, rarely
touch them over the past year, for one thing they do not support the
UI validation paradigm other input controls do.  Read up on the
datagrid, once you understand how item editors work you will realize
the easy in gathering your edited data and sending on the way.

DK

On Sat, Jun 14, 2008 at 3:23 PM, Andy Matthews <[EMAIL PROTECTED]> wrote:
> I've got the UI for my Flex app done, I'm pulling in data, and now I'm ready 
> to wire it all together. Problem is that I can't seem to figure out how to 
> reference the form fields duplicated by the TileList. My code is at the 
> bottom of the page.
>
> What I need to do is this:
>
> 1) When the submit button is clicked, get the values of all 40 TextInput 
> fields
> 2) Gather those values into an ArrayCollection
> 3) Do some other stuff
>
> The event parameter passed in to the connectToServers doesn't contain 
> anything really useful, but the "this" also doesn't contain anything that 
> seems to be of help. So how do I reference the textInput fields in the 
> various rows dynamically created by the TileList component to get at their 
> values?
>
>
> // the array
> arrData = [
>        {sName: 'web 1', 
> sURL:'http://192.168.0.1/server.cfc',sUsername:'admin',sPassword:'[EMAIL 
> PROTECTED]'},
>        {sName: 'web 2', 
> sURL:'http://192.168.0.2/server.cfc',sUsername:'admin',sPassword:'[EMAIL 
> PROTECTED]'},
>        {sName: 'web 3', 
> sURL:'http://192.168.0.3/server.cfc',sUsername:'admin',sPassword:'[EMAIL 
> PROTECTED]'}
> ];
>
> // the repeater
> <mx:TileList id="serverRows" paddingRight="0" paddingLeft="0" 
> dataProvider="{arrData}"
>        rollOverColor="#f9cd78" itemRenderer="components.serverRow" 
> rowHeight="28"
>        selectionColor="#cccccc" verticalScrollPolicy="off" width="100%" 
> height="100%"
>        backgroundAlpha="0" borderStyle="none" />
>
> // The component
> <?xml version="1.0" encoding="utf-8"?>
> <mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"; width="100%" 
> textAlign="left">
>        <mx:TextInput width="98" x="0" id="sName" text="{data.sName}" />
>        <mx:TextInput width="225" x="106" id="sURL" text="{data.sURL}" />
>        <mx:TextInput width="95" x="334" id="sUsername" 
> text="{data.sUsername}" />
>        <mx:TextInput width="95" x="437" id="sPassword" 
> text="{data.sPassword}" displayAsPassword="true" />
> </mx:HBox>
>
> // the submit button
> <mx:HBox width="73" height="22">
>        <mx:Button height="22" width="72" id="connect" styleName="btnConnect" 
> click="connectToServers(event)" />
> </mx:HBox>
>
> // the connectToServers method
> private function connectToServers(event:Event):void {
>        Alert.show('connecting','start connecting');
> }
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: http://www.houseoffusion.com/groups/Flex/message.cfm/messageid:5329
Subscription: http://www.houseoffusion.com/groups/Flex/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37

Reply via email to