I did and that worked. I knew the problem could not be as hard as it was turning out to be.
The problem was I was being asked to help with another co workers problem. He had in one place the value from the model bound to the text attribute, but the selectedDate was bound back to the model using the <binding> tag. Since I only saw the selectedDate, I figured since he was having a problem, and was using that attribute, I focus on the other attributes for the field. That was my problem. Thanks for your help. Jeremy Sanders. --- In [email protected], "Philippe" <[EMAIL PROTECTED]> wrote: > > Hi, > > Did you try the selectedDate attribute of your DateField ? > > selectedDate property > selectedDate:Date [read-write] > > Date as selected in the DateChooser control. Accepts a Date object as a > parameter. > > Selecting the currently selected date in the control deselects it, sets > the selectedDate property to null, and then dispatches the change event. > > The default value is null. > > This property can be used as the source for data binding. > Implementation > public function get selectedDate():Date > public function set selectedDate(value:Date):void > > Phil > > -----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of jsscardinal > Sent: mercredi 6 décembre 2006 20:27 > To: [email protected] > Subject: [flexcoders] Date Fields and Data Binding. > > I am attempting to do something I thought was pretty simple. Using the > cairngorm model, basically I have a data instance object attached to > the model, and it has a Data Object attached to it. > > So think of it this way. I am running an application that tracks a > list of canidates. So there is a CanidateVO actionscript object, and > it has a member variable attached to it called interview date, and its > of type Date. > > I am running a java backend retrieving these using spring and > hybernate, and the conversion works fine. > > The problem I am having is with data binding in a grid and details > panel. The grid has an array collection which is attached to the > model, and that array contains a list of all the canidates, some that > have dates and some that dont. All have member variables, but since > all instances have not interviewed they may not have a value in the > date field, thus those member vars are null. > > So the problem is that when I have a particular grid object selected, > I see the details of that canidate in the details panel, which is just > a panel that contains text fields and a dateField component. Well all > the other bindings are working fine, but not the dateField binding. > > I have set the dateFields text bound to the attribute of the object, > and that does not work, and I have set the dataProvider and that does > not work, and I have even set a data attribute on the dateField and > that does not work. > > Whats happening is, when I am looking at a particular canidate without > an interview date, and I select the dateField, then put a date in it > and DONT save the record but go to a different instance on the grid, > all the fields are updated except the dateField. The dateField text > remains there regardless of the fact that the selectedItem has > changed, and the new selectedItem has no date in it. > > Conversly if I select a canidate who does have a date, the date is > displayed, but once I go to one without a date, the date stays in the > field. Why is data binding not working for dates? > > Please help. > > Jeremy. >

