View source at http://www.archaeolibrary.com/Gezer/srcview/ very nice feature by the way. Dan
--- On Wed, 10/8/08, Dan Pride <[EMAIL PROTECTED]> wrote: > From: Dan Pride <[EMAIL PROTECTED]> > Subject: RE: [flexcoders] Re: ComboBox in Component won't open to Saved Value > To: flexcoders@yahoogroups.com > Date: Wednesday, October 8, 2008, 11:19 PM > My problem is there seems to be no way to kick the event to > change the value. Here is the code, all of it. > It can be seen in action at > > http://www.archaeolibrary.com/Gezer/Staff.html > > Note: I have view source enabled and all files should be > represented. > > Creation complete works on the first time only. Select > another staff member with a double click and the creation > complete does not go. > This is about as basic as data entry client server type > programming (a very huge market possiblity here),... gets. > > This is not a flame. This is a valid point. This to me > brings into question the entire language. I have spent > months learning this stuff to start running into things so > basic as this I wonder if I have been wise in my time > investment. It tells me the creators are off on their own > gig, and meeting simple data needs of clients like showing > you what you picked the last time you were here, are not on > their minds. That means this is probably not an isolated > incidence. Is this really the product to use for data entry > over the web? or should I be headed into Javascript and Ajax > like everybody else. What else am I going to run into and > how much of a pain is this going to be? Anyway here is the > code, thank you for your time. A simple event to say > "NEW DISPLAY DO IT AGAIN" just seems so damn > basic. > > > > > --- On Wed, 10/8/08, Tracy Spratt > <[EMAIL PROTECTED]> wrote: > > > From: Tracy Spratt <[EMAIL PROTECTED]> > > Subject: RE: [flexcoders] Re: ComboBox in Component > won't open to Saved Value > > To: flexcoders@yahoogroups.com > > Date: Wednesday, October 8, 2008, 9:22 PM > > No, that should not work unless SDActionItem.platform > is a > > reference to > > an item in the ComboBox dataProvider. > > > > > > > > Tracy > > > > > > > > > > > > > > > > ________________________________ > > > > From: flexcoders@yahoogroups.com > > [mailto:[EMAIL PROTECTED] On > > Behalf Of valdhor > > Sent: Wednesday, October 08, 2008 12:31 PM > > To: flexcoders@yahoogroups.com > > Subject: [flexcoders] Re: ComboBox in Component > won't > > open to Saved > > Value > > > > > > > > Tracy > > > > I must be missing something here. > > > > I have a combobox with a dataprovider of an > arraycollection > > that is > > returned from a MySQL database. This is populated on > > creationcomplete. > > Once this arrayCollection is populated I make another > call > > to get > > specific data. Part of this data is a field that > > corresponds to an > > item in the combobox. > > > > When the second call returns, all I do is: > > > > platformComboBox.selectedItem = SDActionItem.platform; > > > > SDActionItem is the DTO returned from the second call > and > > platform is > > one of it's fields that correspond to an item in > the > > combobox. > > > > This works every time and I do not have to loop > through the > > data > > provider. > > > > Are you telling me that this should not work? > > > > --- In flexcoders@yahoogroups.com > > <mailto:flexcoders%40yahoogroups.com> > > , "Tracy Spratt" <[EMAIL PROTECTED]> wrote: > > > > > > ComboBox.selectedItem will only work if you > assign a > > *reference to an > > > item in the ComboBox dataProvider*. This is > rarely > > possible and is not > > > in your case. > > > > > > > > > > > > What you must do is loop over the items in the > > CobmoBox.dataProvider > > and > > > compare the appropriate property's value to > the > > value you want to > > match. > > > When a match is found, use the loop indes to set > the > > ComboBox's > > > selectedIndex. This is simple enough to do in a > > one-off situation. > > > > > > > > > > > > If you need this often, then you might want to > use an > > extended > > ComboBox. > > > Making a generic one is a bit tricky, because the > > Combo Box > > dataProvider > > > items can have any properties at all. I have an > > example on > > > www.cflex.net <http://www.cflex.net/ > > <http://www.cflex.net/> > (it > > allows you to set the data > > > field you want to match) and Ben forta has done > one > > and there are > > > others. > > > > > > > > > > > > Tracy > > > > > > > > > > > > ________________________________ > > > > > > From: flexcoders@yahoogroups.com > > <mailto:flexcoders%40yahoogroups.com> > > [mailto:flexcoders@yahoogroups.com > > <mailto:flexcoders%40yahoogroups.com> > > ] On > > > Behalf Of Dan Pride > > > Sent: Wednesday, October 08, 2008 10:01 AM > > > To: flexcoders@yahoogroups.com > > <mailto:flexcoders%40yahoogroups.com> > > > Subject: [flexcoders] ComboBox in Component > won't > > open to Saved Value > > > > > > > > > > > > Hi > > > I have a ComboBox used as a Popup on a form > component. > > > It saves fine using the following function > > > > > > private function closeGenderPop(event:Event):void > { > > > ComboBox(event.target).selectedItem.label}; > > > > > > > > > I want to have it display the stored value the > next > > time it is opened. > > > I tried this but no luck. > > > > > > private function openGenderPop(event:Event):void > { > > > genderPop.selectedIndex = 1; > > > ComboBox(event.target).selectedItem.label; } > > > > > > Really appreciate the help > > > > > > Dan Pride > > >