enableDisableWhiteSpaceManagement([action])
Last updated February 14, 2004
Version: 1 | Requires: ColdFusion MX | Library: UtilityLib
Description:
This function will enable or disable whitespace management in ColdFusion Server without access to ColdFusion Administrator. It returns the current status of the setting.
Return Values:
Returns a boolean.
Example:
Parameters:
| Name | Description | Required |
|---|---|---|
| action | Either disable or enable. Defaults to enable. | No |
Full UDF Source:
<!---
This function will enable or disable whitespace management in ColdFusion Server without access to ColdFusion Administrator.
@param action Either disable or enable. Defaults to enable. (Optional)
@return Returns a boolean.
@author Qasim Rasheed (qasim_1976@yahoo.com)
@version 1, February 14, 2004
--->
<cffunction name="enableDisableWhiteSpaceManagement" output="false" returntype="boolean">
<cfargument name="action" type="string" default="enable" />
<cfscript>
var factory = CreateObject("Java","coldfusion.server.ServiceFactory");
var runtime = "";
</cfscript>
<cflock name="factory_runtimeservice" type="exclusive" timeout="5">
<cfset runtime = factory.getRuntimeService()>
<cfswitch expression="#arguments.action#">
<cfcase value="enable">
<cfif not runtime.WhiteSpace>
<cfset runtime.setWhiteSpace("YES")>
</cfif>
</cfcase>
<cfcase value="disable">
<cfif runtime.WhiteSpace>
<cfset runtime.setWhiteSpace("NO")>
</cfif>
</cfcase>
</cfswitch>
</cflock>
<cfreturn runtime.WhiteSpace />
</cffunction>
Search CFLib.org
Latest Additions
Dave Anderson added
iniToStruct
20 day(s) ago
Dave Anderson added
deDupeArray
20 day(s) ago
Richard added
dice
22 day(s) ago
Isaac Dealey added
getRelative
a while ago
Top Rated
backupDatabase
Rated 5.0, 22 time(s)
indentXml
Rated 5.0, 10 time(s)
generateSsccAsn
Rated 5.0, 4 time(s)
highlightAndCrop
Rated 5.0, 4 time(s)