CFSELECT bind to query with "selected" value

I am using bind to pull data into a select list, which then binds another select list to display drilled down results. I am unable to use the "selected" value in the cfselect. I want to be able to allow the user to return to the form and have the last selected results display. Here is my code:

<cfselect name="orgid" style="width:600px;" value="orgid" display="fullorg" selected="#form.orgid#" bind="cfc:lib.cfc.orgoffice.qryOrg()" bindonload="true" />

<cfselect name="officeid" size="5" style="width:600px;" multiple="yes" value="officeid" display="fulloffice" selected="#form.officeid#" bind="cfc:lib.cfc.orgoffice.qryOffice({orgid})" bindonload="true" />

The binding works fine, just the "selected" doesn't display the form.orgid value (same for the second one).
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Check out here:

and here (for multis):

Essentially you should be able to tweak this so that you first get your passed form value and then resort so that it is the selected default - or don't do the resort if the form value does not exist.

That's all I can think of or find at the moment.  Good luck, and hopefully someone else has had more time to play with CFAJAX or spry or similar to maybe suggest a better solution.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mpsautomationteamAuthor Commented:
Thank you, it works. It's ashame it's not an out of the box feature.
Yes, unfortunately that is almost always the 'growing pains' associated with developing 'bleeding-edge' solutions.  As I have found over the past 4 versions of CF (and application development in general) - it will take only about 4 weeks longer than you have in any given project for a new version or update to be released which will provide the features that you require.

I've done some more searching, and I can't find or come up with anything simpler - I'm glad, however, that at least this did work for you.

Good luck.
I would suggest another attribute for the cfselect tag like:
' bindSelected="#result.value# " to replace  ' selected="#result.value#" '
It would be a nice addition if it hasn't already been added in CF9.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.