Adobe COLDFUSION 9 Manual page 844

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
value="#listLast(arguments.value)#">
</cfquery>
<cfloop query="q">
<cfset s = structNew()>
<cfset s.value = arguments.value & "," & artid>
<cfset s.display = artname & " (" & dollarFormat(price) & ")">
<cfset s.href = "javaScript:loadImage('#largeimage#');">
<cfset s.children=arrayNew(1)>
<!--- leafnode=true prevents node expansion and further calls to the
bind expression. --->
<cfset s.leafnode=true>
<cfset arrayAppend(result, s)>
</cfloop>
</cfif>
<cfreturn result>
</cffunction>
</cfcomponent>
Binding other controls to a tree
ColdFusion tags that use bind expressions can bind to the selected node of a tree by using the following formats:
• {[form:]tree.node} retrieves the value of the selected tree node.
• {[form:]tree.path} retrieves the path of the selected tree node. If the
bound path includes the root node.
The bind expression is evaluated each time a
in the bind parameter, it is ignored.
Tree JavaScript functions
You can use the following JavaScript functions to manage an HTML tree:
Function
ColdFusion.Tree.getTreeObject
ColdFusion.Tree.refresh
For more information, see the ColdFusion.Tree.getTreeObject and ColdFusion.Tree.refresh functions in the CFML
Reference.
Using the rich text editor
The ColdFusion rich text editor lets users enter and format rich HTML text by using an icon-driven interface based
on the open source FCKeditor Ajax widget. The editor includes numerous formatting controls, and icons for such
standard operations as searching, printing, and previewing text. Text editor controls are not covered. For detailed
information on the editor icons and controls, see http://wiki.fckeditor.net/UsersGuide.
Note: Do not bind to a rich text area on load of a page, for example, from another control, such as a text box.
The following example shows a simple rich text editor. When a user enters text and clicks the Enter button, the
application refreshes and displays the formatted text above the editor region.
event occurs on an item in the tree. If you specify any other event
select
Description
Gets the underlying Yahoo User Interface Library TreeView JavaScript object.
Manually refreshes a tree.
Last updated 8/5/2010
attribute value is
completePath
839
, the
true

Advertisement

Table of Contents
loading

Table of Contents