tracker issue : CF-3746998

select a category, or use search below
(searches all categories and all time range)

Shouldn't need specific tag for cfclientsettings

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)

Created: 04/22/2014

Components: Documentation

Versions: 11.0

Failure Type: Unspecified

Found In Build/Fixed In Build: PublicBeta /

Priority/Frequency: Trivial / Some users will encounter

Locale/System: ALL / Platforms All

Vote Count: 0

As mentioned to Rakshith during some presentation Ram was giving... I don't see why we need a whole new tag <cfclientsettings>. It has no meaning outside the context of <cfclient>, so it's poor implementation that it's been implemented as a stand-alone tag *outside* of <cfclient> for one thing, plus given its functionality / purpose is tigthly coupled to <cfclient, it would make more sense, surely, to just have an options attribute on <cfclient>. So not this:

<cfclientsettings enableDeviceAPI="true" detectDevice="true" deviceTimeout="20">
<!--- etc --->

But this:
<cfset options = {enableDeviceAPI=true, detectDevice=true, deviceTimeout=20}>
<cfclient options="#options#">
<!--- etc --->

I don't see there as being any again in having a discrete tag, and indeed the way it's been implemented is counter to how CFML is generally implemented.


----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3746998

External Customer Info:
External Company:  
External Customer Name: Adam Cameron.
External Customer Email:  
External Test Config: My Hardware and Environment details:



We added the cfclientSettings, so that we can support multiple cfclient tags. Code <cfclient> //client side code.. </cfclient> Code <cfclient> //Some more client side code.. </cfclient> Code... Multiple cfclient tags do not work currently, if any of them is async. But if need to support multiple cfclient tags, we cannot take, the required plugins in each cfclient block. What if some one tries to write code like: <cfclient enableDeviceAPI="true"> //Some code </cfclient> <cfclient enableDeviceAPI="false"> //Some more code </cfclient> In the first cfclient block itself, we would have loaded all the required device plugins. So setting that in the second cfclient block, he does not use any deviceAPI, does not mean anything. All the device plugins are already loaded. cfclientSettings is directive to tell ColdFusion, that the application needs device plugins(or device detection plugins, or both). It is for a page. It is not a setting that we can take for each cfclient block.
Comment by Paul N.
12595 | May 06, 2014 05:59:18 AM GMT
OK, makes sense. At the very least you need to update to reflect that (I cannot see where it says this). Also, planning ahead: do you think adding individual attributes for each setting is a very thoughtful approach? Over one separate options struct? Also: the examples on that doc page are rubbish. They don't don't demonstrate <cfclientsettings> usage, they demonstrate <cflclient> functionality. The docs for <cfclientsettings> should only show the functionality of <cfclientsettings>. -- Adam
Comment by External U.
12596 | May 06, 2014 06:07:28 AM GMT
Will update the doc, to make it more explicit. Thanks
Comment by Paul N.
12597 | May 06, 2014 07:46:57 AM GMT
Updated the document with the latest code examples from Dave Ferguson.
Comment by Saurav G.
12598 | September 22, 2015 07:44:02 AM GMT
OK, we can't really comment on that as the public don't have access to it.
Comment by External U.
12599 | September 22, 2015 11:30:10 AM GMT