1 Reply Latest reply on Sep 13, 2011 9:34 PM by flyingMedia

    Multiple CFC binding on CFSELECT

    WebolutionDesigns Level 1

      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?



        • 1. Re: Multiple CFC binding on CFSELECT

          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.