Hello group!

Im tryin to use repeated Form elements together with validation
but i absolutely dont know how.
without a repeater i hav my mx:model bound to my form elements
and define my mxml validator with fields referencing my mode.
and with a repeater?

i create my model at "initialize", so how do i bind it in AS to my
textboxes in my repeater?

and how and where do i hav to create Validators (i guess in
actionscript aswell)?

Below is a code snippet where i want the repeated textbox validated
with a String validator?

I hope someone can help me.

Greetings Stephan
------------------------------------------------------------------------------------

<?xml version="1.0" encoding="utf-8"?>
<mx:Application width="100%" height="100%"
xmlns:mx="http://www.macromedia.com/2003/mxml"; xmlns="*"
initialize="inits()">

<mx:Script>
<![CDATA[

var name:Array; // Array of Options
var selected:Boolean = true;

//inits
function inits() {
name = new Array();
var Item:Object;
var count:Number = 4;

for (var i=0; i<count; i++) {
Item = new Object();
Item.firstname = new String();
name.addItem(Item);
}
}

]]>
</mx:Script>

<mx:VBox width="300" height="300" backgroundColor="#FFFFFF">

<mx:Repeater id="names" dataProvider="{name}">
<mx:TextInput id="input"/>
</mx:Repeater>

</mx:VBox>
</mx:Application>


Reply via email to