<mx:Button label="Ajouter" click="controller.createTpl(event)" />
public function createTpl(event:Event):void
This means event is a MouseEvent... you cant do...
also .selectedIndex in not meaningful outside the repeater.
Please be specific about what you are looking for in logic diagram/explaination. It will be easier to provide a solution.
Thank you Nishant for trying to secure me in my worry.
The problem is simple. In my VIEW, I have a form which contents a 1st numericStepper which is the datatProvider of my 1st repeater which generates textInput.
When I increment or decrement my numericStepper, my repeater add or remove a texInput automatically. I've the same architecture with my combobox. This one is generated dynamically by my 2nd repeater. A 2nd numericStepper is the dataProvider of my 2nd repeater.
What I'm trying to do is to retrieve data entered by a user in my different textInput and the in my combobox for using them in my CONTROLLER before sending them in my db.
I made a diagram but I cant see how to attach it. I can send you it by mail if you want !!
Thanks again !!
I agree that event in createTpl function is a MouseEvent !!
Can I have some help please ?
I understand what you are doing for creating the dataprovider for repeater. But what i dont understand is what are you doing with the Controller. I suppose you wish to save the values in db. You could use the dataproviders itself. I am sorry i dont think i understood the issue. Could you please what you are trying to do in Controller?
What i want to do in my CONTROLLER is to encode these data in JSON before sending them in db.
Once you have the collection just iterate the collection, why do you wish to iterate the inidvidual components that get created. They neway hold the same value as the collection.
I finally find a way for get text property. It's not "very clean" but it works :
dataForTpl.nameArgs = view.nameArgs.text + "/" + view.nameArgs.text + "/" + view.nameArgs.text;
But I'm still looking for the way to retrieve selected item from combobox generated dynamically...