Easiest way might be to componentize the
FormItem. Then you give the FormItem its own id but the IDs inside all can be the
same.
Matt
From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf
Of cruegger2000
Sent: Thursday, September 01, 2005
12:25 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] passing
array of Form values in VO
I want to have a form on the client side that accepts
a list of items of the same type/meaning, for
example people's names.
I would then send a value object to a server side
Delegate object
using the <mx:RemoteObject> construct.
However, I don't know how to indicate that a form
variable
is an "array" without getting duplicate
component id errors.
In essence, I want to do what is shown below. How
can I have a
"vector" form variable using Flex?
Thanks in advance.
mxml file:
<mx:Form>
<mx:FormItem label="name1">
<mx:TextInput id="name"/>
</mx:FormItem>
<mx:FormItem label="name2">
<mx:TextInput id="name"/>
<mx:FormItem>
<mx:FormItem label="name3">
<mx:TextInput id="name"/>
</mx:Form>
Client side value object:
-------------------------
class Foo
{
public var names: Array;
}
Server Side value object:
-------------------------
public class Foo
{
private String[] names; (or List)
// accesors
}
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
|
- RE: [flexcoders] passing array of Form values in VO Matt Chotin
-