or take a look at
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=1fecccba

DK

On 10/16/06, Patrick Simon <[EMAIL PROTECTED]> wrote:

Hi Rick,

 

 

You're right, the display value for a list must not be an empty string (""). This is a known issue.

Please make use of the prompt property on the combobox if possible.

 

If this does not work for you, because you want to allow users de-select their previous selection on a combobox, you should use a single space character (" ") as a workaround. This code sample shows how to do this, if you have no way of making that change on the server side:

 

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">

             <mx:Script>

             <![CDATA[

             import mx.utils.StringUtil;

                         import mx.collections.ArrayCollection;

                         [Bindable]

      public var stateArray:Array = ["", "AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FL", "GA", "HI","ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "PR", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY"];

                        [Bindable]

                        public var stateInfo:ArrayCollection;

 

                        private function modifyData() : void

                        {

                                    stateInfo = new ArrayCollection();

                                    for(var i:Number=0; i < stateArray.length; i++) {

                                     var item:Object;

                   if(String(stateArray[i])) {

                           item = new Object();

                           item.label = stateArray[i];

                           stateInfo.addItem(item);

                   } else {

                           item = new Object();

                           item.label = " ";

                           stateInfo.addItem(item);

                  }

                                    }

                        }

 

            ]]>

 

            </mx:Script>

            <mx:VBox>

   <mx:TextInput text="{stateArray.toString()}"/>

   <mx:TextInput text="{foo.selectedItem.data}"/>

    <mx:ComboBox id="foo" dataProvider="{stateInfo}" creationComplete="modifyData()"  prompt=" " />

 

            </mx:VBox>

 

</mx:Application>

 

 

As the issue is known there's no need to file a new bug. Just in case and for future issues, here's the address to our wish form:

http://www.adobe.com/support/email/wishform/

 

 

Best regards,

 

 

Patrick

 

 

 


From: flexcoders@yahoogroups.com [mailto: flexcoders@yahoogroups.com] On Behalf Of Rick Root
Sent: Monday, October 16, 2006 3:04 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Disappearing list items

 

so, I solved this problem.

My data provider was a query returned by a remoting call created like this:

<cfquery name="qry2" dbtype="query">
SELECT
TABLKEY, TABLFLD
FROM application.udf.getalldropdowns
WHERE
TABLID = '010'
ORDER BY TABLFLD
</cfquery>
<cfset queryaddrow(qry2,1)>
<cfset querysetcell(qry2,"TABLKEY","")>
<cfset querysetcell(qry2,"TABLFLD","")>
<cfquery name="qry" dbtype="query">
SELECT * FROM qry2 ORDER BY TABLFLD
</cfquery>
<cfset retval.COUNTRIES = qry>

I did it this way so I could always have a "blank" item in the dropdown....

The solution was to change the second querysetcell line to be the following:

<cfset querysetcell(qry2,"TABLFLD","- not selected -")>

For some reason, the blank item caused every 5th label to disappear for
no apparent reason.

This seems like a bug. What's the address to report flex bugs to?

Rick




--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it? __._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to