Basically, I need to know how to create another textInput field when I pass data from one view to the next, while saving the data that was passed to begin with. Take a look:
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView">
<fx:Script>
<![CDATA[
protected function btn_addTask_clickHandler(event:MouseEvent):void
{
var tmpObj:Object = new Object();
tmpObj.firstTask = ti_input.text;
navigator.pushView(taskListView, ti_input.text);
}
]]>
</fx:Script>
<fx:Declarations>
<!-- Place nonvisual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:VGroup height="100%" width="100%" >
<s:TextInput id="ti_input" prompt="Enter Text Here" />
<s:Button label="Add Task" id="btn_addTask" click="btn_addTask_clickHandler(event)"/>
</s:VGroup>
</s:View>
This is my first view. I want the user to be able to enter text into the textInput field and see it on the next view, but I want the next view to save what the user entered, navigate back to the first view, then take another entry from the user and create another textInput field on the second view. It's like a memo pad app. The user enters a task on the first view, then he or she is able to see it on the second view. Then, the user should be able to navigate back to the first view and create another task that also goes to the second view, but does not replace the first task that was entered. My problem is creating new textInput fields as new data comes in to the second view. Any ideas? Perhaps textInput fields are not the visual components I should be using...