ChartDirector 6.0 (ColdFusion Edition)

BaseChart.setSearchPath


Usage

setSearchPath(pageContext [, path ])

Description

Sets the search path for loading image files.

Several ChartDirector operations involve loading image files. Examples are wallpapers (BaseChart.setWallpaper), background images (BaseChart.setBgImage and PlotArea.setBackground2), user-defined symbols (DataSet.setDataSymbol2) or for embedding images in text using ChartDirector Mark Up Language.

By default, ChartDirector will search for the image files by interpreting the path names as file system path names. For example, the root "/" is interpreted as the root of the file system, not the root of the web document directory or the root of the servlet context. Relative paths are interpreted as relative to the "current working directory" (note that the "current working directory" is determined by the operating system and is in general different from the current URL directory.) This allows you to use image files outside of the web document directory.

In addition, ChartDirector will search for the image files by interpreting the path names as Java resource paths and search them in the Java class paths. This allows one to use images embedded in JAR files as resources.

The setSearchPath method allows you to specify using the current page context for searching the images. In this case, the root "/" is interpreted as the root of the servlet context. If a relative path is used, it is interpreted as relative to the current URL directory.

The setSearchPath allows you to optionally specify one or more directories to search for the image files. Directories should be separated with the path separator of the operating system (";" for Windows and ":" for Linux/UNIX).

Arguments

ArgumentDefaultDescription
pageContext(Mandatory)The PageContext object representing the current web page. This is typically obtained by using the ColdFusion "GetPageContext" function.
path""A list of directories to search for the images, separated with the path separator of the operating system (";" for Windows and ":" for Linux/UNIX). If this argument is not provided, then the current URL directory is used.

Return Value

None