• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Multiple CFC binding on CFSELECT

Explorer ,
Aug 24, 2011 Aug 24, 2011

Copy link to clipboard

Copied

Does anyone out there know how to have multiple cfc bindings on a cfselect and have it affect the selected attribute? I have a straight forward cfselect that is binding to another cfselect...

<cfselect name="make"  display="DESCRIPTION" value="MAKE" multiple="no" queryPosition="below" bind="cfc:cfc.partsrequest.getMakes()" />

This works great, but what I would like to do is to have one of the items returned be selected (via the selected attribute) by a different cfc. Has anyone ever done something like this?

~Clay

TOPICS
Advanced techniques

Views

546

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 13, 2011 Sep 13, 2011

Copy link to clipboard

Copied

LATEST

Why not just set a variable that contains the value you want to select.

<!--- make your CFC return the value that you want to show as selected --->

<cfset theValueToBeSelected  = cfc.partsrequest.YourOtherCFCThatDeterminesWhichOneYouWantToSelect()>

<cfselect name="make"  display="DESCRIPTION" value="MAKE"  multiple="no" queryPosition="below"  bind="cfc:cfc.partsrequest.getMakes()"  selected="#theValueToBeSelected#" />

That should take care of it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation