<CFIMPORT> Tag - ColdFusion


>> Return to ColdFusion Tag Index

The <CFIMPORT> tag allows you ...



  <CFIMPORT> Comments from Macromedia LiveDocsLiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p62.htm
<cfimport> is not available for invoking JSP tags in Standard Edition. You must own a copy of Enterprise Edition.

LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p62.htm
In addition to what Bryan_hogan said (the taglib attribute must be static) we also encountered the problem that you can not use cfimport within a cfif /cfelse clause. If the template path varies, you REALLY have a problem defining the taglib location.

LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p62.htm
We've submitted a bug report, number 55450, against this behavior:
ColdFusion uses a basetag name of cf_filename for a tag imported without using a cfimport prefix attribute.
ColdFusion uses a basetag name of cffilename for a tag imported using any value as the cfimport prefix attribute.

LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p62.htm
:: CAUTION ::
When using this tag for importing custom tags directory, their will be a difference when using the getbasetagdata() for nested custom tags. Let's say your base template is called page.cfm. When you DON'T specify a prefix the base tag is called "CFPAGE". If you specify a prefix it will be called "CF_PAGE".

LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p62.htm
This give a very nice example of using this with a jar, but the example with CF is poor. It only give syntax of making the call, not the actual utilization of the tag with CF.

LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p62.htm
The taglib attribute value must be static and can not contain a variable.

For example if you have a request.mapping variable setup to contain the name of a mapping that you created in the cf admin. You can not referance this mapping like <cfimport taglib="#request.mapping#" ...>.

Instead you must hard-code the taglib attribute value with your mapping.



[Top]


Recommended Books

[Top]

Web Sites

[Top]

Copyright © 2003- 2008, Orville Paul Chomer, All Rights Reserved