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

bindAttribute ??????

New Here ,
Mar 06, 2008 Mar 06, 2008
Ok, I'm not finding any examples anywhere of what the bindAttribute in a cfselect, cfinput, etc do. Can ANYONE give me an example of what this attribute does and how to use it?
498
Translate
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
Engaged ,
Mar 06, 2008 Mar 06, 2008
http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_i_07.html#1100379

Look under the "usage" area for examples.

In summary, bind allows you to complete or alter a field based on other fields.


The BindAttribute tells CF what attribute to alter in the tag based on a bind ffield and is only usable in certain version of the tags - i.e. with CFINPUT it can only be used on the type "text".

Translate
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 ,
Mar 06, 2008 Mar 06, 2008
Thanks for the info SafariTECH, but I looked all through that link, and there is still not a single example that uses the bindAttribute value. I've got the bind down, no problem, but I am VERY curious what exactly the bindAttribute does since I can't seem to find ANYONE or ANY example that uses it.

Here's one of their examples:
<cfinput type="text" name="email" label="email" bind="{firstName.text}.{lastName.text}@mm.com">

Now, what would this do:
<cfinput type="text" name="email" label="email" bind="{firstName.text}.{lastName.text}@mm.com" bindAttribute="???????">

I'm just very curious what the bindAttribute attribute is, how you use it, and what it does.

Anyone have a suggestion or example?
Translate
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
LEGEND ,
Mar 06, 2008 Mar 06, 2008
general bindAttribute description from CFML Reference:

bindAttribute Optional; HTML
Specifies the HTML tag attribute whose value is set by the bind
attribute. You can only specify attributes in the browser̢۪s HTML
DOM tree, not ColdFusion-specific attributes.
Ignored if there is no bind attribute.


from the CFML Reference for cftextearea:

HTML form data binding
The bind attribute lets you set any cftextarea attribute dynamically
from the value of another form control or by
calling a CFC or JavaScript function. *By default it sets the control̢۪s
value attribute, but you can specify a different
attribute to set by using the bindAttribute attribute.* For more
information on binding, see “Binding data to form
fields” on page 650 in the ColdFusion Developer’s Guide.


basically, you specify an attribute name to set using your bind
expression. only supported in HTML forms. not available in flash forms.

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Translate
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 ,
Mar 07, 2008 Mar 07, 2008
LATEST
Thank you Azadi for the info, but I've seen all that information, and I've looked in the ColdFusion Developers Guide and STILL I cannot find an example peiece of code that shows this attribute in use. I've tried using it in my code, and it has no affect on anything I'm doing.

The reason why this is so important to me is because I'm trying to figure out a way to bind a cfselect to a cfc, but at the same time have the "title" attribute of the options be set. Basically here's what I've got:

<cfselect id="BI_ID" enabled="true" name="BI_ID" bind="cfc:#REQUEST.comDir#.timeMgr.getBudgetItems(COID={CO_ID.value},ProjectID={PROJECT_ID.value},NameID=#REQUEST.NameID#)" bindonload="false" value="BIID" display="BIString" style="width:300px;" />

This works perfect, and the select gets popuplated when the user changes the CO and Project. Here's what each of the options looks like when this executes:

<option value="BIID">BIString</option>

BUT, what I want is for the the options in the select to have a title so that when they mouse over each item, they see more information about that item, like this:

<option value="BIID" title="Whatever I want to Put here">BIString</option>

Any ideas??? And I'm still waiting on an example of the bindAttribute so that I can at the very least know how that attribute actually works.
Translate
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