Solved

Coldfusion 8 Upgrade - CFC's & Application Settings & Mappings

Posted on 2008-10-03
16
3,827 Views
Last Modified: 2013-12-20
I have just finished upgrading our entire Intranet application to CF8. The upgrade went well, and all is working as it should. However, I've recently started diving into some of the new Ajax capabilities that have been introduced (updated) into CF8, and have run into a wall trying to get simple bind & cfc returns to work correctly.

Our existing CFC's work perfectly fine, and we have several. They are being defined within the Application.cfm , however I think the issue is that mappings, application.cfm, and CFC's were all written way back with CF6 was released, and they haven't been updated since.

I'm trying to get a simple cfgrid to pull from a data source (have tried our own SQL server, as well as cfartgallery, cfdocexamples, etc) to no avail. At first I thought it was just me not understanding binding and the appropriate arguments. But after pulling my hair out for days, I decided to load other peoples examples in our environment, and noticed those are not working either.

To end this novel, attached is the test CFM file, and the corresponding CFC (pulled from a forta tutorial I believe). It displays a simple HTML CFGRID, binded to the appropriate datasouce. In IE7 I recieve a "exception thrown and not caught" error, and in Firefox, nothing. The page just finishes loading, and displays nothing.

I think I need direction in what a normal Application.cfm file needs to look like to handle all of the necessary CF8 scripts etc, any mappings that might need to be added, as well as a quick description of binding and location for CFC's. I can provide additional examples of our existing settings upon request.

I'm giving this question a large point value as I'm desperately needing to finish a project by next week which includes the CFGRID, Flash Form and Binding examples.

Thanks,
Aaron Ditto


<cfform name="parkForm">

	<cfgrid format="html" name="parkGrid" pagesize="10" selectmode="row" bind="cfc:park.getParks({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})">

		<cfgridcolumn name="parkName" width="300" header="Name" />

		<cfgridcolumn name="parkType" width="180" header="Type" />

		<cfgridcolumn name="city" width="120" header="City" />

		<cfgridcolumn name="state" width="60" header="State" />

	</cfgrid>

</cfform>
 

------------------- CFC -------------------
 

<cffunction name="getParks" access="remote" returntype="struct">

	<cfargument name="page" required="true" />

	<cfargument name="pageSize" required="true" />

	<cfargument name="gridsortcolumn" required="true" />

	<cfargument name="gridsortdirection" required="true" />

	

	<cfif arguments.gridsortcolumn eq "">

		<cfset arguments.gridsortcolumn = "parkName" />

		<cfset arguments.gridsortdirection = "asc" />

	</cfif>
 

	<cfquery name="parks" datasource="cfdocexamples">

		select		parkName, parkType, city, state

		from		parks

		order by	#arguments.gridsortcolumn# #arguments.gridsortdirection#

	</cfquery>
 

	<cfreturn queryconvertforgrid(parks, page, pagesize) />

</cffunction>

Open in new window

0
Comment
Question by:AaronDitto
  • 10
  • 6
16 Comments
 

Author Comment

by:AaronDitto
ID: 22635594
Application.cfm
<cfapplication  name="Pm" clientmanagement="yes" sessionmanagement="yes" setclientcookies="yes" 

setdomaincookies="no" sessiontimeout=#CreateTimeSpan(0,2,0,0)#>
 

<cfset application.dsn="hrsolutions">

<cfset application.serverpath = "C:\Inetpub\wwwroot\intranet\">

<cfif left (REMOTE_ADDR, 11 ) is not "192.168.10.">

<cfset application.urlpath = "http://externalIP/intranet/">

<cfelse>

<cfset application.urlpath = "http://192.168.10.12/intranet/">

</cfif>

<cfset application.componentpath = "intranet.cfcs.">
 

<cfif not IsDefined("session.userid")>

<cflocation url="#application.urlpath#login/login.cfm?timeout=true">

</cfif>

Open in new window

0
 

Author Comment

by:AaronDitto
ID: 22635603
CF Admin - Mappings

/CFIDE         C:\Inetpub\wwwroot\CFIDE  
 /gateway   C:\ColdFusion8\gateway\cfc  
0
 
LVL 25

Assisted Solution

by:dgrafx
dgrafx earned 175 total points
ID: 22635770
the only thing I can see is possibly your path to the function
is park.getParks accurate?

is that path registered or is it valid from webroot?
0
 
LVL 25

Expert Comment

by:dgrafx
ID: 22635814
by registered I mean in mappings
is the park.cfc in one of your mapping paths?
or
is it in [webroot]

if not that's at least one of the problems
when you setup cf8 you may have forgotten to setup your mappings
0
 

Author Comment

by:AaronDitto
ID: 22635856
Well we have it defined in Application.cfm (which is how all of our other cfc's across the application are called)

<cfset application.componentpath = "intranet.cfcs.">

so the path is C:\inetpub\wwwroot\Intranet\cfcs

I've tried putting parks.cfc in both the CFCs folder and in the same folder as the cfm with no change.
0
 

Author Comment

by:AaronDitto
ID: 22635868
what would be appropriate mappings, like I said, the old application / settings were designed around CF6 - and this wasn't necessary before (or the last designer / admin didn't set specific mappings)

I've listed the mappings that are in our CF Admin above, they are the only ones that have ever been there, and the only ones that transferred during the upgrade from CF6 to 8
0
 

Author Comment

by:AaronDitto
ID: 22635889
I just added this mapping into the CF Admin with no change either

 /cfcs   c:\Inetpub\wwwroot\Intranet\cfcs  

we run multiple appilcations on our webserver, so we have CFCs for the website, and a CFCs folder for our Intranet (located in seperate directories of the wwwroot) which is why we had been defining them in the Application.cfm file for the Intranet application only
0
 
LVL 25

Expert Comment

by:dgrafx
ID: 22636058
ok so wouldn't it be bind="cfc:#application.componentpath#park.getParks()"
what is your webroot for this site?

lets say
webroot is at "D:\web\site1\"
under that is "cfcs"

so this would mean that from webroot cfcs is at /cfcs/
so to call a component there would be cfcs.park.getparks
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:AaronDitto
ID: 22636134
the webroot for our Intranet application is:

C:\Inetpub\wwwroot\Intranet

CFC's are in C:\Inetpub\wwwroot\Intranet\cfcs

I tried a adding bind="cfc:#application.componentpath#.park.getParks({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})">

with no change, and also just bind="cfc:cfcs.park.getParks({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})">

by using cfcs.park.getparks I get "The specified CFC cfcs.park could not be found"

however using #application.componentpath# it still showed the grid, and it has the ajax loading graphic but nothing loads, and I still get the IE error "exception thrown but not caught"

Any other ideas?
0
 
LVL 25

Expert Comment

by:dgrafx
ID: 22636371
try removing the returntype="struct" from your function
0
 

Author Comment

by:AaronDitto
ID: 22636462
still nothing - and still getting the exception thrown error.

I'm increasing the point value on this to 350
0
 

Author Comment

by:AaronDitto
ID: 22636497
Firebug script debugging is hanging here:

Object
_207
      Microsoft.XMLHTTP,MSXML2.XMLHTTP.5.0,MSXML2.XMLHTTP.4.0,MSXML2.XMLHTTP.3.0,MSXML2.XMLHTTP 0=Microsoft.XMLHTTP 1=MSXML2.XMLHTTP.5.0
i
      0

With a "ActiveXObject is not Defined" error on line 103
 ....loading....

Microsoft.XMLHTTP,MSXML2.XMLHTTP.5.0,MSXML2.XMLHTTP.4.0,MSXML2.XMLHTTP.3.0,MSXML2.XMLHTTP 0=Microsoft.XMLHTTP 1=MSXML2.XMLHTTP.5.0

Firebug's log limit has been reached. %S entries not shown.		Preferences	 

1<script type="text/javascript">_cf_loadingtexthtml="<div align='center'><img src='/CFIDE/scripts/ajax/resources/cf/images/loading.gif'/>";

2_cf_contextpath="";

3_cf_ajaxscriptsrc="/CFIDE/scripts/ajax";

4_cf_jsonprefix='//';

5_cf_clientid='C5F14AD25AC181834799E871B5237A53';</script><script type="text/javascript" src="/CFIDE/scripts/ajax/yui/yahoo-dom-event/yahoo-dom-event.js"></script>

6<script type="text/javascript" src="/CFIDE/scripts/ajax/yui/animation/animation-min.js"></script>

7<script type="text/javascript" src="/CFIDE/scripts/ajax/ext/adapter/yui/ext-yui-adapter.js"></script>

8<script type="text/javascript" src="/CFIDE/scripts/ajax/ext/ext-core.js"></script>

9<script type="text/javascript" src="/CFIDE/scripts/ajax/ext/package/util.js"></script>

10<script type="text/javascript" src="/CFIDE/scripts/ajax/ext/package/widget-core.js"></script>

11<script type="text/javascript" src="/CFIDE/scripts/ajax/ext/package/data/data.js"></script>

12<script type="text/javascript" src="/CFIDE/scripts/ajax/ext/package/dragdrop/dragdrop.js"></script>

13<script type="text/javascript" src="/CFIDE/scripts/ajax/ext/package/form/form.js"></script>

14<script type="text/javascript" src="/CFIDE/scripts/ajax/ext/package/button/button.js"></script>

15<script type="text/javascript" src="/CFIDE/scripts/ajax/ext/source/widgets/View.js"></script>

16<script type="text/javascript" src="/CFIDE/scripts/ajax/ext/source/widgets/MenuButton.js"></script>

17<script type="text/javascript" src="/CFIDE/scripts/ajax/ext/package/toolbar/toolbar.js"></script>

18<script type="text/javascript" src="/CFIDE/scripts/ajax/ext/package/grid/grid.js"></script>

19<script type="text/javascript" src="/CFIDE/scripts/ajax/ext/package/grid/edit-grid.js"></script>

20<script type="text/javascript" src="/CFIDE/scripts/ajax/messages/cfmessage.js"></script>

21<script type="text/javascript" src="/CFIDE/scripts/ajax/package/cfajax.js"></script>

22<script type="text/javascript" src="/CFIDE/scripts/ajax/package/cfgrid.js"></script>

23<script type="text/javascript" src="/CFIDE/scripts/cfform.js"></script>

24<script type="text/javascript" src="/CFIDE/scripts/masks.js"></script>

25<link rel="stylesheet" type="text/css" href="/CFIDE/scripts/ajax/resources/ext/css/ext-all.css" />

26<link rel="stylesheet" type="text/css" href="/CFIDE/scripts/ajax/resources/cf/cf.css" />

27

28<script type="text/javascript">

29 ColdFusion.Ajax.importTag('CFGRID');

30</script>

31

32<script type="text/javascript">

33 ColdFusion.objectCache['parkGrid'] = new ColdFusion.Grid.Actions('cfgrid1223057761448');

34 _cf_GRIDTAG_initAjaxGrid_1223057761449=function()

35 {

36 var _cf_gridColModel = [{header:'Name','colName':'PARKNAME','name':'PARKNAME','dataIndex':'PARKNAME',sortType:Ext.grid.DefaultColumnModel.asUCString,sortable:true,width:300},{header:'Type','colName':'PARKTYPE','name':'PARKTYPE','dataIndex':'PARKTYPE',sortType:Ext.grid.DefaultColumnModel.asUCString,sortable:true,width:180},{header:'City','colName':'CITY','name':'CITY','dataIndex':'CITY',sortType:Ext.grid.DefaultColumnModel.asUCString,sortable:true,width:120},{header:'State','colName':'STATE','name':'STATE','dataIndex':'STATE',sortType:Ext.grid.DefaultColumnModel.asUCString,sortable:true,width:60},{header:'CFGRIDROWINDEX','colName':'CFGRIDROWINDEX','name':'CFGRIDROWINDEX','dataIndex':'CFGRIDROWINDEX',sortType:Ext.grid.DefaultColumnModel.asUCString,sortable:true,hidden:true}];

37 _cf_CFGRID_getData_1223057761450=function( _cf_gridDataProxy, cfgridpage, cfgridpagesize, cfgridsortcolumn, cfgridsortdirection, _cf_grid_errorhandler, _cf_callback, _cf_scope, _cf_arg,_cf_reader)

38 {

39

40 ColdFusion.Bind.cfcBindHandler(null, {'bindTo':ColdFusion.Grid.loadData,'bindToAttr':'true','errorHandler':_cf_grid_errorhandler,'cfc':'/Intranet/TUTORIALS/park.cfc','cfcFunction':'getParks','bindExpr':[['page',cfgridpage],['pageSize',cfgridpagesize],['gridsortcolumn',cfgridsortcolumn],['gridsortdirection',cfgridsortdirection]], 'bindToParams': { '_cf_gridDataProxy':_cf_gridDataProxy, '_cf_scope':_cf_scope, '_cf_reader':_cf_reader, '_cf_gridname':'parkGrid', '_cf_grid_errorhandler':_cf_grid_errorhandler, '_cf_callback':_cf_callback, '_cf_arg':_cf_arg }});

41 };

42 var _cf_gridDataModel = new Ext.data.Store({proxy:new ColdFusion.Grid.ExtProxy(_cf_CFGRID_getData_1223057761450,null), reader:new ColdFusion.Grid.ExtReader(_cf_gridColModel), remoteSort:true, sortInfo:true});

43 ColdFusion.Grid.init('parkGrid','__CFGRID__parkForm__parkGrid','parkForm',true,false,true,false,_cf_gridColModel,_cf_gridDataModel,true,true,false,'#cfgrid1223057761448 .x-grid-col-0{color:#0B333C;} #cfgrid1223057761448 .x-grid-hd-0{color:#0B333C;} #cfgrid1223057761448 .x-grid-col-1{color:#0B333C;} #cfgrid1223057761448 .x-grid-hd-1{color:#0B333C;} #cfgrid1223057761448 .x-grid-col-2{color:#0B333C;} #cfgrid1223057761448 .x-grid-hd-2{color:#0B333C;} #cfgrid1223057761448 .x-grid-col-3{color:#0B333C;} #cfgrid1223057761448 .x-grid-hd-3{color:#0B333C;} #cfgrid1223057761448 .x-grid-col-4{color:#0B333C;} #cfgrid1223057761448 .x-grid-hd-4{color:#0B333C;} #cfgrid1223057761448 .x-grid-row-selected{background-color:#7FCDFE !important;color:white} ',10,true,false,null,null,{'appendKey':true,colInfo:[null,null,null,null,null]},null,null,[]);

44 };ColdFusion.Event.registerOnLoad(_cf_GRIDTAG_initAjaxGrid_1223057761449);

45</script>

46<script type="text/javascript">

47<!--

48 _CF_checkparkForm = function(_CF_this)

49 {

50 //reset on submit

51 _CF_error_exists = false;

52 _CF_error_messages = new Array();

53 _CF_error_fields = new Object();

54 _CF_FirstErrorField = null;

55

56

57 //display error messages and return success

58 if( _CF_error_exists )

59 {

60 if( _CF_error_messages.length > 0 )

61 {

62 // show alert() message

63 _CF_onErrorAlert(_CF_error_messages);

64 // set focus to first form error, if the field supports js focus().

65 if( _CF_this[_CF_FirstErrorField].type == "text" )

66 { _CF_this[_CF_FirstErrorField].focus(); }

67

68 }

69 return false;

70 }else {

71 return true;

72 }

73 }

74//-->

75</script>

76

77

78

79<style type="text/css">

80select,textarea{

81border: 1px solid gray;

82z-index:0;

83}

84body,td,input,select,textarea{

85font-family:tahoma;

86font-size:8pt;

87}

88

89a{

90text-decoration:none;

91color:0d15b4;

92}

93th{

94font-size:10pt;

95}

96.buttonmenu

97{

98background: #a5a5a5;

99color:white;

100font-weight:bold;

101border:black solid 1px;

102width:125px;

103text-align:center;

104}

105.buttonmenu:hover{

106color: fdca40;

107}

108a:hover{

109color:red;

110}

111.menubox{

112background-color:a5a5a5;

113

114height:25px;

115width:125px;

116}

117.menuboxtext{

118color:#ffffff;

119font-size:8pt;

120}

121.menuboxlink{

122font-size:8pt;

123color:black;

124text-decoration:none;

125}

126.rightmenubox{

127background-color:gray;

128height:20px;

129width:160px;

130}

131.rightmenuboxtext{

132color:#ffffff;

133font-size:8pt;

134width:160px;

135}

136.pagePosition{

137position:absolute;

138left:0px;

139top:20px;

140width:100%;

141height:100%;

142expand:auto;

143background-color:white;

144z-index:0;

145}

146.pagePositionRight{

147position:absolute;

148left:0px;

149top:20px;

150width:100%;

151height:100%;

152expand:auto;

153background-color:white;

154z-index:0;

155}

156.tableheader{

157

158font-weight:bold;

159}

160</style>

161

162<form name="parkForm" id="parkForm" action="/intranet/TUTORIALS/park.cfm" method="post" onsubmit="return _CF_checkparkForm(this)">

163

164<div id="cfgrid1223057761448" style="border: 1px solid #cccccc; overflow: hidden;">

165

166 </div>

167

168

169

170

171

172<div><input type="hidden" name="__CFGRID__parkForm__parkGrid" value="" /></div>

173</form>

174

1/*ADOBE SYSTEMS INCORPORATED

2Copyright 2007 Adobe Systems Incorporated

3All Rights Reserved.

4

5NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the

6terms of the Adobe license agreement accompanying it. If you have received this file from a

7source other than Adobe, then your use, modification, or distribution of it requires the prior

8written permission of Adobe.*/

9function cfinit(){

10if(!window.ColdFusion){

11ColdFusion={};

12var $C=ColdFusion;

13if(!$C.Ajax){

14$C.Ajax={};

15}

16var $A=$C.Ajax;

17if(!$C.AjaxProxy){

18$C.AjaxProxy={};

19}

20var $X=$C.AjaxProxy;

21if(!$C.Bind){

22$C.Bind={};

23}

24var $B=$C.Bind;

25if(!$C.Event){

26$C.Event={};

27}

28var $E=$C.Event;

29if(!$C.Log){

30$C.Log={};

31}

32var $L=$C.Log;

33if(!$C.Util){

34$C.Util={};

35}

36var $U=$C.Util;

37if(!$C.DOM){

38$C.DOM={};

39}

40var $D=$C.DOM;

41if(!$C.Spry){

42$C.Spry={};

43}

44var $S=$C.Spry;

45if(!$C.Pod){

46$C.Pod={};

47}

48var $P=$C.Pod;

49if(!$C.objectCache){

50$C.objectCache={};

51}

52if(!$C.required){

53$C.required={};

54}

55if(!$C.importedTags){

56$C.importedTags=[];

57}

58if(!$C.requestCounter){

59$C.requestCounter=0;

60}

61if(!$C.bindHandlerCache){

62$C.bindHandlerCache={};

63}

64window._cf_loadingtexthtml=window._cf_loadingtexthtml+"&nbsp;"+CFMessage["loading"]+"</div>";

65$C.globalErrorHandler=function(_1fc,_1fd){

66if($L.isAvailable){

67$L.error(_1fc,_1fd);

68}

69if($C.userGlobalErrorHandler){

70$C.userGlobalErrorHandler(_1fc);

71}

72if(!$L.isAvailable&&!$C.userGlobalErrorHandler){

73alert(_1fc+CFMessage["globalErrorHandler.alert"]);

74}

75};

76$C.handleError=function(_1fe,_1ff,_200,_201,_202,_203,_204){

77var msg=$L.format(_1ff,_201);

78if(_1fe){

79$L.error(msg,"http");

80if(!_202){

81_202=-1;

82}

83if(!_203){

84_203=msg;

85}

86_1fe(_202,_203);

87}else{

88if(_204){

89$L.error(msg,"http");

90throw msg;

91}else{

92$C.globalErrorHandler(msg,_200);

93}

94}

95};

96$C.setGlobalErrorHandler=function(_206){

97$C.userGlobalErrorHandler=_206;

98};

99$A.createXMLHttpRequest=function(){

100var _207=["Microsoft.XMLHTTP","MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"];

101for(var i=0;i<_207.length;i++){

102try{

103return new ActiveXObject(_207[i]);

104}

105catch(e){

106}

107}

108try{

109return new XMLHttpRequest();

110}

111catch(e){

112}

113return false;

114};

115$A.isRequestError=function(req){

116return ((req.status!=0&&req.status!=200)||req.getResponseHeader("server-error"));

117};

118$A.sendMessage=function(url,_20b,_20c,_20d,_20e,_20f,_210){

119var req=$A.createXMLHttpRequest();

120if(!_20b){

121_20b="GET";

122}

123if(_20d&&_20e){

124req.onreadystatechange=function(){

125$A.callback(req,_20e,_20f);

126};

127}

128if(_20c){

129_20c+="&_cf_nodebug=true&_cf_nocache=true";

130}else{

131_20c="_cf_nodebug=true&_cf_nocache=true";

132}

133if(window._cf_clientid){

134_20c+="&_cf_clientid="+_cf_clientid;

135}

136if(_20b=="GET"){

137if(_20c){

138_20c+="&_cf_rc="+($C.requestCounter++);

139if(url.indexOf("?")==-1){

140url+="?"+_20c;

141}else{

142url+="&"+_20c;

143}

144}

145$L.info("ajax.sendmessage.get","http",[url]);

146req.open(_20b,url,_20d);

147req.send(null);

148}else{

149$L.info("ajax.sendmessage.post","http",[url,_20c]);

150req.open(_20b,url,_20d);

151req.setRequestHeader("Content-Type","application/x-www-form-urlencoded");

152if(_20c){

153req.send(_20c);

154}else{

155req.send(null);

156}

157}

158if(!_20d){

159while(req.readyState!=4){

160}

161if($A.isRequestError(req)){

162$C.handleError(null,"ajax.sendmessage.error","http",[req.status,req.statusText],req.status,req.statusText,_210);

163}else{

164return req;

165}

166}

167};

168$A.callback=function(req,_213,_214){

169if(req.readyState!=4){

170return;

171}

172_213(req,_214);

173};

174$A.submitForm=function(_215,url,_217,_218,_219,_21a){

175var _21b=$C.getFormQueryString(_215);

176if(_21b==-1){

177$C.handleError(_218,"ajax.submitform.formnotfound","http",[_215],-1,null,true);

178return;

179}

180if(!_219){

181_219="POST";

182}

183_21a=!(_21a===false);

184var _21c=function(req){

185$A.submitForm.callback(req,_215,_217,_218);

186};

187$L.info("ajax.submitform.submitting","http",[_215]);

188var _21e=$A.sendMessage(url,_219,_21b,_21a,_21c);

189if(!_21a){

190$L.info("ajax.submitform.success","http",[_215]);

191return _21e.responseText;

192}

193};

194$A.submitForm.callback=function(req,_220,_221,_222){

195if($A.isRequestError(req)){

196$C.handleError(_222,"ajax.submitform.error","http",[req.status,_220,req.statusText],req.status,req.statusText);

197}else{

198$L.info("ajax.submitform.success","http",[_220]);

199if(_221){

200_221(req.responseText);

201}

202}

203};

204$C.empty=function(){

205};

206$C.getFormQueryString=function(_223,_224){

207var _225;

208if(typeof _223=="string"){

209_225=(document.getElementById(_223)||document.forms[_223]);

210}else{

211if(typeof _223=="object"){

212_225=_223;

213}

214}

215if(!_225){

216return -1;

217}

218var _226,elementName,elementValue,elementDisabled;

219var _227=false;

220var _228=(_224)?{}:"";

221for(var i=0;i<_225.elements.length;i++){

222_226=_225.elements[i];

223elementDisabled=_226.disabled;

224elementName=_226.name;

225elementValue=_226.value;

226if(!elementDisabled&&elementName){

227switch(_226.type){

228case "select-one":

229case "select-multiple":

230for(var j=0;j<_226.options.length;j++){

231if(_226.options[j].selected){

232if(window.ActiveXObject){

233_228=$C.getFormQueryString.processFormData(_228,_224,elementName,_226.options[j].attributes["value"].specified?_226.options[j].value:_226.options[j].text);

234}else{

235_228=$C.getFormQueryString.processFormData(_228,_224,elementName,_226.options[j].hasAttribute("value")?_226.options[j].value:_226.options[j].text);

236}

237}

238}

239break;

240case "radio":

241case "checkbox":

242if(_226.checked){

243_228=$C.getFormQueryString.processFormData(_228,_224,elementName,elementValue);

244}

245break;

246case "file":

247case undefined:

248case "reset":

249case "button":

250break;

251case "submit":

252if(_227==false){

253_228=$C.getFormQueryString.processFormData(_228,_224,elementName,elementValue);

254_227=true;

255}

256break;

257case "textarea":

258var _22b;

259if(window.FCKeditorAPI&&(_22b=$C.objectCache[elementName])&&_22b.richtextid){

260var _22c=FCKeditorAPI.GetInstance(_22b.richtextid);

261if(_22c){

262elementValue=_22c.GetXHTML();

263}

264}

265_228=$C.getFormQueryString.processFormData(_228,_224,elementName,elementValue);

266break;

267default:

268_228=$C.getFormQueryString.processFormData(_228,_224,elementName,elementValue);

269break;

270}

271}

272}

273if(!_224){

274_228=_228.substr(0,_228.length-1);

275}

276return _228;

277};

278$C.getFormQueryString.processFormData=function(_22d,_22e,_22f,_230){

279if(_22e){

280if(_22d[_22f]){

281_22d[_22f]+=","+_230;

282}else{

283_22d[_22f]=_230;

284}

285}else{

286_22d+=encodeURIComponent(_22f)+"="+encodeURIComponent(_230)+"&";

287}

288return _22d;

289};

290$A.importTag=function(_231){

291$C.importedTags.push(_231);

292};

293$A.checkImportedTag=function(_232){

294var _233=false;

295for(var i=0;i<$C.importedTags.length;i++){

296if($C.importedTags[i]==_232){

297_233=true;

298break;

299}

300}

301if(!_233){

302$C.handleError(null,"ajax.checkimportedtag.error","widget",[_232]);

303}

304};

305$C.getElementValue=function(_235,_236,_237){

306if(!_235){

307$C.handleError(null,"getelementvalue.noelementname","bind",null,null,null,true);

308return;

309}

310if(!_237){

311_237="value";

312}

313var _238=$B.getBindElementValue(_235,_236,_237);

314if(typeof (_238)=="undefined"){

315_238=null;

316}

317if(_238==null){

318$C.handleError(null,"getelementvalue.elnotfound","bind",[_235,_237],null,null,true);

319return;

320}

321return _238;

322};

323$B.getBindElementValue=function(_239,_23a,_23b,_23c,_23d){

324var _23e="";

325if(window[_239]){

326var _23f=eval(_239);

327if(_23f&&_23f._cf_getAttribute){

328_23e=_23f._cf_getAttribute(_23b);

329return _23e;

330}

331}

332var _240=$C.objectCache[_239];

333if(_240&&_240._cf_getAttribute){

334_23e=_240._cf_getAttribute(_23b);

335return _23e;

336}

337var el=$D.getElement(_239,_23a);

338var _242=(el&&((!el.length&&el.length!=0)||(el.length&&el.length>0)||el.tagName=="SELECT"));

339if(!_242&&!_23d){

340$C.handleError(null,"bind.getbindelementvalue.elnotfound","bind",[_239]);

341return null;

342}

343if(el.tagName!="SELECT"){

344if(el.length>1){

345var _243=true;

346for(var i=0;i<el.length;i++){

347var _245=(el[i].getAttribute("type")=="radio"||el[i].getAttribute("type")=="checkbox");

348if(!_245||(_245&&el[i].checked)){

349if(!_243){

350_23e+=",";

351}

352_23e+=$B.getBindElementValue.extract(el[i],_23b);

353_243=false;

354}

355}

356}else{

357_23e=$B.getBindElementValue.extract(el,_23b);

358}

359}else{

360var _243=true;

361for(var i=0;i<el.options.length;i++){

362if(el.options[i].selected){

363if(!_243){

364_23e+=",";

365}

366_23e+=$B.getBindElementValue.extract(el.options[i],_23b);

367_243=false;

368}

369}

370}

371if(typeof (_23e)=="object"){

372$C.handleError(null,"bind.getbindelementvalue.simplevalrequired","bind",[_239,_23b]);

373return null;

374}

375if(_23c&&$C.required[_239]&&_23e.length==0){

376return null;

377}

378return _23e;

379};

380$B.getBindElementValue.extract=function(el,_247){

381var _248=el[_247];

382if((_248==null||typeof (_248)=="undefined")&&el.getAttribute){

383_248=el.getAttribute(_247);

384}

385return _248;

386};

387$L.init=function(){

388if(window.YAHOO&&YAHOO.widget&&YAHOO.widget.Logger){

389YAHOO.widget.Logger.categories=[CFMessage["debug"],CFMessage["info"],CFMessage["error"],CFMessage["window"]];

390YAHOO.widget.LogReader.prototype.formatMsg=function(_249){

391var _24a=_249.category;

392return "<p>"+"<span class='"+_24a+"'>"+_24a+"</span>:<i>"+_249.source+"</i>: "+_249.msg+"</p>";

393};

394var _24b=new YAHOO.widget.LogReader(null,{width:"30em",fontSize:"100%"});

395_24b.setTitle(CFMessage["log.title"]||"ColdFusion AJAX Logger");

396_24b._btnCollapse.value=CFMessage["log.collapse"]||"Collapse";

397_24b._btnPause.value=CFMessage["log.pause"]||"Pause";

398_24b._btnClear.value=CFMessage["log.clear"]||"Clear";

399$L.isAvailable=true;

400}

401};

402$L.log=function(_24c,_24d,_24e,_24f){

403if(!$L.isAvailable){

404return;

405}

406if(!_24e){

407_24e="global";

408}

409_24e=CFMessage[_24e]||_24e;

410_24d=CFMessage[_24d]||_24d;

411_24c=$L.format(_24c,_24f);

412YAHOO.log(_24c,_24d,_24e);

413};

414$L.format=function(code,_251){

415var msg=CFMessage[code]||code;

416if(_251){

417for(i=0;i<_251.length;i++){

418if(!_251[i].length){

419_251[i]="";

420}

421var _253="{"+i+"}";

422msg=msg.replace(_253,_251[i]);

423}

424}

425return msg;

426};

427$L.debug=function(_254,_255,_256){

428$L.log(_254,"debug",_255,_256);

429};

430$L.info=function(_257,_258,_259){

431$L.log(_257,"info",_258,_259);

432};

433$L.error=function(_25a,_25b,_25c){

434$L.log(_25a,"error",_25b,_25c);

435};

436$L.dump=function(_25d,_25e){

437if($L.isAvailable){

438var dump=(/string|number|undefined|boolean/.test(typeof (_25d))||_25d==null)?_25d:recurse(_25d,typeof _25d,true);

439$L.debug(dump,_25e);

440}

441};

442$X.invoke=function(_260,_261,_262,_263){

443var _264="method="+_261;

444var _265=_260.returnFormat||"json";

445_264+="&returnFormat="+_265;

446if(_260.queryFormat){

447_264+="&queryFormat="+_260.queryFormat;

448}

449if(_260.formId){

450var _266=$C.getFormQueryString(_260.formId,true);

451if(_262!=null){

452for(prop in _266){

453_262[prop]=_266[prop];

454}

455}else{

456_262=_266;

457}

458_260.formId=null;

459}

460var _267="";

461if(_262!=null){

462_267=$X.JSON.encode(_262);

463_264+="&argumentCollection="+encodeURIComponent(_267);

464}

465$L.info("ajaxproxy.invoke.invoking","http",[_260.cfcPath,_261,_267]);

466if(_260.callHandler){

467_260.callHandler.call(null,_260.callHandlerParams,_260.cfcPath,_264);

468return;

469}

470var _268;

471if(_260.async){

472_268=function(req){

473$X.callback(req,_260,_263);

474};

475}

476var req=$A.sendMessage(_260.cfcPath,_260.httpMethod,_264,_260.async,_268,null,true);

477if(!_260.async){

478return $X.processResponse(req,_260);

479}

480};

481$X.callback=function(req,_26c,_26d){

482if($A.isRequestError(req)){

483$C.handleError(_26c.errorHandler,"ajaxproxy.invoke.error","http",[req.status,_26c.cfcPath,req.statusText],req.status,req.statusText);

484}else{

485if(_26c.callbackHandler){

486var _26e=$X.processResponse(req,_26c);

487_26c.callbackHandler(_26e,_26d);

488}

489}

490};

491$X.processResponse=function(req,_270){

492var _271=true;

493for(var i=0;i<req.responseText.length;i++){

494var c=req.responseText.charAt(i);

495_271=(c==" "||c=="\n"||c=="\t"||c=="\r");

496if(!_271){

497break;

498}

499}

500var _274=(req.responseXML&&req.responseXML.childNodes.length>0);

501var _275=_274?"[XML Document]":req.responseText;

502$L.info("ajaxproxy.invoke.response","http",[_275]);

503var _276;

504var _277=_270.returnFormat||"json";

505if(_277=="json"){

506_276=_271?null:$X.JSON.decode(req.responseText);

507}else{

508_276=_274?req.responseXML:(_271?null:req.responseText);

509}

510return _276;

511};

512$X.init=function(_278,_279){

513var _27a=_279.split(".");

514var ns=self;

515for(i=0;i<_27a.length-1;i++){

516if(_27a[i].length){

517ns[_27a[i]]=ns[_27a[i]]||{};

518ns=ns[_27a[i]];

519}

520}

521var _27c=_27a[_27a.length-1];

522if(ns[_27c]){

523return ns[_27c];

524}

525ns[_27c]=function(){

526this.httpMethod="GET";

527this.async=false;

528this.callbackHandler=null;

529this.errorHandler=null;

530this.formId=null;

531};

532ns[_27c].prototype.cfcPath=_278;

533ns[_27c].prototype.setHTTPMethod=function(_27d){

534if(_27d){

535_27d=_27d.toUpperCase();

536}

537if(_27d!="GET"&&_27d!="POST"){

538$C.handleError(null,"ajaxproxy.sethttpmethod.invalidmethod","http",[_27d],null,null,true);

539}

540this.httpMethod=_27d;

541};

542ns[_27c].prototype.setSyncMode=function(){

543this.async=false;

544};

545ns[_27c].prototype.setAsyncMode=function(){

546this.async=true;

547};

548ns[_27c].prototype.setCallbackHandler=function(fn){

549this.callbackHandler=fn;

550this.setAsyncMode();

551};

552ns[_27c].prototype.setErrorHandler=function(fn){

553this.errorHandler=fn;

554this.setAsyncMode();

555};

556ns[_27c].prototype.setForm=function(fn){

557this.formId=fn;

558};

559ns[_27c].prototype.setQueryFormat=function(_281){

560if(_281){

561_281=_281.toLowerCase();

562}

563if(!_281||(_281!="column"&&_281!="row")){

564$C.handleError(null,"ajaxproxy.setqueryformat.invalidformat","http",[_281],null,null,true);

565}

566this.queryFormat=_281;

567};

568ns[_27c].prototype.setReturnFormat=function(_282){

569if(_282){

570_282=_282.toLowerCase();

571}

572if(!_282||(_282!="plain"&&_282!="json"&&_282!="wddx")){

573$C.handleError(null,"ajaxproxy.setreturnformat.invalidformat","http",[_282],null,null,true);

574}

575this.returnFormat=_282;

576};

577$L.info("ajaxproxy.init.created","http",[_278]);

578return ns[_27c];

579};

580$U.isWhitespace=function(s){

581var _284=true;

582for(var i=0;i<s.length;i++){

583var c=s.charAt(i);

584_284=(c==" "||c=="\n"||c=="\t"||c=="\r");

585if(!_284){

586break;

587}

588}

589return _284;

590};

591$U.getFirstNonWhitespaceIndex=function(s){

592var _288=true;

593for(var i=0;i<s.length;i++){

594var c=s.charAt(i);

595_288=(c==" "||c=="\n"||c=="\t"||c=="\r");

596if(!_288){

597break;

598}

599}

600return i;

601};

602$C.trim=function(_28b){

603return _28b.replace(/^\s+|\s+$/g,"");

604};

605$U.isInteger=function(n){

606var _28d=true;

607if(typeof (n)=="number"){

608_28d=(n>=0);

609}else{

610for(i=0;i<n.length;i++){

611if($U.isInteger.numberChars.indexOf(n.charAt(i))==-1){

612_28d=false;

613break;

614}

615}

616}

617return _28d;

618};

619$U.isInteger.numberChars="0123456789";

620$U.isArray=function(a){

621return (typeof (a.length)=="number"&&!a.toUpperCase);

622};

623$U.isBoolean=function(b){

624if(b===true||b===false){

625return true;

626}else{

627if(b.toLowerCase){

628b=b.toLowerCase();

629return (b==$U.isBoolean.trueChars||b==$U.isBoolean.falseChars);

630}else{

631return false;

632}

633}

634};

635$U.isBoolean.trueChars="true";

636$U.isBoolean.falseChars="false";

637$U.castBoolean=function(b){

638if(b===true){

639return true;

640}else{

641if(b===false){

642return false;

643}else{

644if(b.toLowerCase){

645b=b.toLowerCase();

646if(b==$U.isBoolean.trueChars){

647return true;

648}else{

649if(b==$U.isBoolean.falseChars){

650return false;

651}else{

652return false;

653}

654}

655}else{

656return false;

657}

658}

659}

660};

661$U.checkQuery=function(o){

662var _292=null;

663if(o&&o.COLUMNS&&$U.isArray(o.COLUMNS)&&o.DATA&&$U.isArray(o.DATA)&&(o.DATA.length==0||(o.DATA.length>0&&$U.isArray(o.DATA[0])))){

664_292="row";

665}else{

666if(o&&o.COLUMNS&&$U.isArray(o.COLUMNS)&&o.ROWCOUNT&&$U.isInteger(o.ROWCOUNT)&&o.DATA){

667_292="col";

668for(var i=0;i<o.COLUMNS.length;i++){

669var _294=o.DATA[o.COLUMNS[i]];

670if(!_294||!$U.isArray(_294)){

671_292=null;

672break;

673}

674}

675}

676}

677return _292;

678};

679$X.JSON=new function(){

680var _295={}.hasOwnProperty?true:false;

681var _296=/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/;

682var pad=function(n){

683return n<10?"0"+n:n;

684};

685var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"};

686var _29a=function(s){

687if(/["\\\x00-\x1f]/.test(s)){

688return "\""+s.replace(/([\x00-\x1f\\"])/g,function(a,b){

689var c=m[b];

690if(c){

691return c;

692}

693c=b.charCodeAt();

694return "\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16);

695})+"\"";

696}

697return "\""+s+"\"";

698};

699var _29f=function(o){

700var a=["["],b,i,l=o.length,v;

701for(i=0;i<l;i+=1){

702v=o[i];

703switch(typeof v){

704case "undefined":

705case "function":

706case "unknown":

707break;

708default:

709if(b){

710a.push(",");

711}

712a.push(v===null?"null":$X.JSON.encode(v));

713b=true;

714}

715}

716a.push("]");

717return a.join("");

718};

719var _2a2=function(o){

720return "\""+o.getFullYear()+"-"+pad(o.getMonth()+1)+"-"+pad(o.getDate())+"T"+pad(o.getHours())+":"+pad(o.getMinutes())+":"+pad(o.getSeconds())+"\"";

721};

722this.encode=function(o){

723if(typeof o=="undefined"||o===null){

724return "null";

725}else{

726if(o instanceof Array){

727return _29f(o);

728}else{

729if(o instanceof Date){

730return _2a2(o);

731}else{

732if(typeof o=="string"){

733return _29a(o);

734}else{

735if(typeof o=="number"){

736return isFinite(o)?String(o):"null";

737}else{

738if(typeof o=="boolean"){

739return String(o);

740}else{

741var a=["{"],b,i,v;

742for(var i in o){

743if(!_295||o.hasOwnProperty(i)){

744v=o[i];

745switch(typeof v){

746case "undefined":

747case "function":

748case "unknown":

749break;

750default:

751if(b){

752a.push(",");

753}

754a.push(this.encode(i),":",v===null?"null":this.encode(v));

755b=true;

756}

757}

758}

759a.push("}");

760return a.join("");

761}

762}

763}

764}

765}

766}

767};

768this.decode=function(json){

769if($U.isWhitespace(json)){

770return null;

771}

772var _2a8=$U.getFirstNonWhitespaceIndex(json);

773if(_2a8>0){

774json=json.slice(_2a8);

775}

776if(window._cf_jsonprefix&&json.indexOf(_cf_jsonprefix)==0){

777json=json.slice(_cf_jsonprefix.length);

778}

779try{

780if(_296.test(json)){

781return eval("("+json+")");

782}

783}

784catch(e){

785}

786throw new SyntaxError("parseJSON");

787};

788}();

789if(!$C.JSON){

790$C.JSON={};

791}

792$C.JSON.encode=$X.JSON.encode;

793$C.JSON.decode=$X.JSON.decode;

794$C.navigate=function(url,_2aa,_2ab,_2ac,_2ad,_2ae){

795if(url==null){

796$C.handleError(_2ac,"navigate.urlrequired","widget");

797return;

798}

799if(_2ad){

800_2ad=_2ad.toUpperCase();

801if(_2ad!="GET"&&_2ad!="POST"){

802$C.handleError(null,"navigate.invalidhttpmethod","http",[_2ad],null,null,true);

803}

804}else{

805_2ad="GET";

806}

807var _2af;

808if(_2ae){

809_2af=$C.getFormQueryString(_2ae);

810if(_2af==-1){

811$C.handleError(null,"navigate.formnotfound","http",[_2ae],null,null,true);

812}

813}

814if(_2aa==null){

815if(_2af){

816if(url.indexOf("?")==-1){

817url+="?"+_2af;

818}else{

819url+="&"+_2af;

820}

821}

822$L.info("navigate.towindow","widget",[url]);

823window.location.replace(url);

824return;

825}

826$L.info("navigate.tocontainer","widget",[url,_2aa]);

827var obj=$C.objectCache[_2aa];

828if(obj!=null){

829if(typeof (obj._cf_body)!="undefined"&&obj._cf_body!=null){

830_2aa=obj._cf_body;

831}

832}

833$A.replaceHTML(_2aa,url,_2ad,_2af,_2ab,_2ac);

834};

835$A.checkForm=function(_2b1,_2b2,_2b3,_2b4,_2b5){

836var _2b6=_2b2.call(null,_2b1);

837if(_2b6==false){

838return false;

839}

840var _2b7=$C.getFormQueryString(_2b1);

841$L.info("ajax.submitform.submitting","http",[_2b1.name]);

842$A.replaceHTML(_2b3,_2b1.action,_2b1.method,_2b7,_2b4,_2b5);

843return false;

844};

845$A.replaceHTML=function(_2b8,url,_2ba,_2bb,_2bc,_2bd){

846var _2be=document.getElementById(_2b8);

847if(!_2be){

848$C.handleError(_2bd,"ajax.replacehtml.elnotfound","http",[_2b8]);

849return;

850}

851var _2bf="_cf_containerId="+encodeURIComponent(_2b8);

852_2bb=(_2bb)?_2bb+"&"+_2bf:_2bf;

853$L.info("ajax.replacehtml.replacing","http",[_2b8,url,_2bb]);

854if(_cf_loadingtexthtml){

855try{

856_2be.innerHTML=_cf_loadingtexthtml;

857}

858catch(e){

859}

860}

861var _2c0=function(req,_2c2){

862var _2c3=false;

863if($A.isRequestError(req)){

864$C.handleError(_2bd,"ajax.replacehtml.error","http",[req.status,_2c2.id,req.statusText],req.status,req.statusText);

865_2c3=true;

866}

867var _2c4=new $E.CustomEvent("onReplaceHTML",_2c2);

868var _2c5=new $E.CustomEvent("onReplaceHTMLUser",_2c2);

869$E.loadEvents[_2c2.id]={system:_2c4,user:_2c5};

870if(req.responseText.search(/<script/i)!=-1){

871try{

872_2c2.innerHTML="";

873}

874catch(e){

875}

876$A.replaceHTML.processResponseText(req.responseText,_2c2,_2bd);

877}else{

878try{

879_2c2.innerHTML=req.responseText;

880}

881catch(e){

882}

883}

884$E.loadEvents[_2c2.id]=null;

885_2c4.fire();

886_2c4.unsubscribe();

887_2c5.fire();

888_2c5.unsubscribe();

889$L.info("ajax.replacehtml.success","http",[_2c2.id]);

890if(_2bc&&!_2c3){

891_2bc();

892}

893};

894try{

895$A.sendMessage(url,_2ba,_2bb,true,_2c0,_2be);

896}

897catch(e){

898try{

899_2be.innerHTML=$L.format(CFMessage["ajax.replacehtml.connectionerrordisplay"],[url,e]);

900}

901catch(e){

902}

903$C.handleError(_2bd,"ajax.replacehtml.connectionerror","http",[_2b8,url,e]);

904}

905};

906$A.replaceHTML.processResponseText=function(text,_2c7,_2c8){

907var pos=0;

908var _2ca=0;

909var _2cb=0;

910_2c7._cf_innerHTML="";

911while(pos<text.length){

912var _2cc=text.indexOf("<s",pos);

913if(_2cc==-1){

914_2cc=text.indexOf("<S",pos);

915}

916if(_2cc==-1){

917break;

918}

919pos=_2cc;

920var _2cd=true;

921var _2ce=$A.replaceHTML.processResponseText.scriptTagChars;

922for(var i=1;i<_2ce.length;i++){

923var _2d0=pos+i+1;

924if(_2d0>text.length){

925break;

926}

927var _2d1=text.charAt(_2d0);

928if(_2ce[i][0]!=_2d1&&_2ce[i][1]!=_2d1){

929pos+=i+1;

930_2cd=false;

931break;

932}

933}

934if(!_2cd){

935continue;

936}

937var _2d2=text.substring(_2ca,pos);

938if(_2d2){

939_2c7._cf_innerHTML+=_2d2;

940}

941var _2d3=text.indexOf(">",pos)+1;

942if(_2d3==0){

943pos++;

944continue;

945}else{

946pos+=7;

947}

948var _2d4=_2d3;

949while(_2d4<text.length&&_2d4!=-1){

950_2d4=text.indexOf("</s",_2d4);

951if(_2d4==-1){

952_2d4=text.indexOf("</S",_2d4);

953}

954if(_2d4!=-1){

955_2cd=true;

956for(var i=1;i<_2ce.length;i++){

957var _2d0=_2d4+2+i;

958if(_2d0>text.length){

959break;

960}

961var _2d1=text.charAt(_2d0);

962if(_2ce[i][0]!=_2d1&&_2ce[i][1]!=_2d1){

963_2d4=_2d0;

964_2cd=false;

965break;

966}

967}

968if(_2cd){

969break;

970}

971}

972}

973if(_2d4!=-1){

974var _2d5=text.substring(_2d3,_2d4);

975var _2d6=_2d5.indexOf("<!--");

976if(_2d6!=-1){

977_2d5=_2d5.substring(_2d6+4);

978}

979var _2d7=_2d5.lastIndexOf("//-->");

980if(_2d7!=-1){

981_2d5=_2d5.substring(0,_2d7-1);

982}

983if(_2d5.indexOf("document.write")!=-1){

984_2d5="var _cfDomNode = document.getElementById('"+_2c7.id+"'); var _cfBuffer='';"+"if (!document._cf_write)"+"{document._cf_write = document.write;"+"document.write = function(str){if (_cfBuffer!=null){_cfBuffer+=str;}else{document._cf_write(str);}};};"+_2d5+";_cfDomNode._cf_innerHTML += _cfBuffer; _cfBuffer=null;";

985}

986try{

987eval(_2d5);

988}

989catch(ex){

990$C.handleError(_2c8,"ajax.replacehtml.jserror","http",[_2c7.id,ex]);

991}

992}

993_2cc=text.indexOf(">",_2d4)+1;

994if(_2cc==0){

995_2cb=_2d4+1;

996break;

997}

998_2cb=_2cc;

999pos=_2cc;

1000_2ca=_2cc;

1001}

1002if(_2cb<text.length-1){

1003var _2d2=text.substring(_2cb,text.length);

1004if(_2d2){

1005_2c7._cf_innerHTML+=_2d2;

1006}

1007}

1008try{

1009_2c7.innerHTML=_2c7._cf_innerHTML;

1010}

1011catch(e){

1012}

1013_2c7._cf_innerHTML="";

1014};

1015$A.replaceHTML.processResponseText.scriptTagChars=[["s","S"],["c","C"],["r","R"],["i","I"],["p","P"],["t","T"]];

1016$D.getElement=function(_2d8,_2d9){

1017var _2da=function(_2db){

1018return (_2db.name==_2d8||_2db.id==_2d8);

1019};

1020var _2dc=$D.getElementsBy(_2da,null,_2d9);

1021if(_2dc.length==1){

1022return _2dc[0];

1023}else{

1024return _2dc;

1025}

1026};

1027$D.getElementsBy=function(_2dd,tag,root){

1028tag=tag||"*";

1029var _2e0=[];

1030if(root){

1031root=$D.get(root);

1032if(!root){

1033return _2e0;

1034}

1035}else{

1036root=document;

1037}

1038var _2e1=root.getElementsByTagName(tag);

1039if(!_2e1.length&&(tag=="*"&&root.all)){

1040_2e1=root.all;

1041}

1042for(var i=0,len=_2e1.length;i<len;++i){

1043if(_2dd(_2e1[i])){

1044_2e0[_2e0.length]=_2e1[i];

1045}

1046}

1047return _2e0;

1048};

1049$D.get=function(el){

1050if(!el){

1051return null;

1052}

1053if(typeof el!="string"&&!(el instanceof Array)){

1054return el;

1055}

1056if(typeof el=="string"){

1057return document.getElementById(el);

1058}else{

1059var _2e4=[];

1060for(var i=0,len=el.length;i<len;++i){

1061_2e4[_2e4.length]=$D.get(el[i]);

1062}

1063return _2e4;

1064}

1065return null;

1066};

1067$E.loadEvents={};

1068$E.CustomEvent=function(_2e6,_2e7){

1069return {name:_2e6,domNode:_2e7,subs:[],subscribe:function(func,_2e9){

1070var dup=false;

1071for(var i=0;i<this.subs.length;i++){

1072var sub=this.subs[i];

1073if(sub.f==func&&sub.p==_2e9){

1074dup=true;

1075break;

1076}

1077}

1078if(!dup){

1079this.subs.push({f:func,p:_2e9});

1080}

1081},fire:function(){

1082for(var i=0;i<this.subs.length;i++){

1083var sub=this.subs[i];

1084sub.f.call(null,this,sub.p);

1085}

1086},unsubscribe:function(){

1087this.subscribers=[];

1088}};

1089};

1090$E.windowLoadImpEvent=new $E.CustomEvent("cfWindowLoadImp");

1091$E.windowLoadEvent=new $E.CustomEvent("cfWindowLoad");

1092$E.windowLoadUserEvent=new $E.CustomEvent("cfWindowLoadUser");

1093$E.listeners=[];

1094$E.addListener=function(el,ev,fn,_2f2){

1095var l={el:el,ev:ev,fn:fn,params:_2f2};

1096$E.listeners.push(l);

1097var _2f4=function(e){

1098if(!e){

1099var e=window.event;

1100}

1101fn.call(null,e,_2f2);

1102};

1103if(el.addEventListener){

1104el.addEventListener(ev,_2f4,false);

1105return true;

1106}else{

1107if(el.attachEvent){

1108el.attachEvent("on"+ev,_2f4);

1109return true;

1110}else{

1111return false;

1112}

1113}

1114};

1115$E.isListener=function(el,ev,fn,_2f9){

1116var _2fa=false;

1117var ls=$E.listeners;

1118for(var i=0;i<ls.length;i++){

1119if(ls[i].el==el&&ls[i].ev==ev&&ls[i].fn==fn&&ls[i].params==_2f9){

1120_2fa=true;

1121break;

1122}

1123}

1124return _2fa;

1125};

1126$E.callBindHandlers=function(id,_2fe,ev){

1127var el=document.getElementById(id);

1128if(!el){

1129return;

1130}

1131var ls=$E.listeners;

1132for(var i=0;i<ls.length;i++){

1133if(ls[i].el==el&&ls[i].ev==ev&&ls[i].fn._cf_bindhandler){

1134ls[i].fn.call(null,null,ls[i].params);

1135}

1136}

1137};

1138$E.registerOnLoad=function(func,_304,_305,user){

1139if($E.registerOnLoad.windowLoaded){

1140if(_304&&_304._cf_containerId&&$E.loadEvents[_304._cf_containerId]){

1141if(user){

1142$E.loadEvents[_304._cf_containerId].user.subscribe(func,_304);

1143}else{

1144$E.loadEvents[_304._cf_containerId].system.subscribe(func,_304);

1145}

1146}else{

1147func.call(null,null,_304);

1148}

1149}else{

1150if(user){

1151$E.windowLoadUserEvent.subscribe(func,_304);

1152}else{

1153if(_305){

1154$E.windowLoadImpEvent.subscribe(func,_304);

1155}else{

1156$E.windowLoadEvent.subscribe(func,_304);

1157}

1158}

1159}

1160};

1161$E.registerOnLoad.windowLoaded=false;

1162$E.onWindowLoad=function(fn){

1163if(window.addEventListener){

1164window.addEventListener("load",fn,false);

1165}else{

1166if(window.attachEvent){

1167window.attachEvent("onload",fn);

1168}else{

1169if(document.getElementById){

1170window.onload=fn;

1171}

1172}

1173}

1174};

1175$C.addSpanToDom=function(){

1176var _308=document.createElement("span");

1177document.body.insertBefore(_308,document.body.firstChild);

1178};

1179$E.windowLoadHandler=function(e){

1180if(window.Ext){

1181Ext.BLANK_IMAGE_URL=_cf_contextpath+"/CFIDE/scripts/ajax/resources/ext/images/default/s.gif";

1182}

1183$C.addSpanToDom();

1184$L.init();

1185$E.registerOnLoad.windowLoaded=true;

1186$E.windowLoadImpEvent.fire();

1187$E.windowLoadImpEvent.unsubscribe();

1188$E.windowLoadEvent.fire();

1189$E.windowLoadEvent.unsubscribe();

1190$E.windowLoadUserEvent.fire();

1191$E.windowLoadUserEvent.unsubscribe();

1192};

1193$E.onWindowLoad($E.windowLoadHandler);

1194$B.register=function(_30a,_30b,_30c,_30d){

1195for(var i=0;i<_30a.length;i++){

1196var _30f=_30a[i][0];

1197var _310=_30a[i][1];

1198var _311=_30a[i][2];

1199if(window[_30f]){

1200var _312=eval(_30f);

1201if(_312&&_312._cf_register){

1202_312._cf_register(_311,_30c,_30b);

1203continue;

1204}

1205}

1206var _313=$C.objectCache[_30f];

1207if(_313&&_313._cf_register){

1208_313._cf_register(_311,_30c,_30b);

1209continue;

1210}

1211var _314=$D.getElement(_30f,_310);

1212var _315=(_314&&((!_314.length&&_314.length!=0)||(_314.length&&_314.length>0)||_314.tagName=="SELECT"));

1213if(!_315){

1214$C.handleError(null,"bind.register.elnotfound","bind",[_30f]);

1215}

1216if(_314.length>1&&!_314.options){

1217for(var i=0;i<_314.length;i++){

1218$B.register.addListener(_314[i],_311,_30c,_30b);

1219}

1220}else{

1221$B.register.addListener(_314,_311,_30c,_30b);

1222}

1223}

1224if(!$C.bindHandlerCache[_30b.bindTo]&&typeof (_30b.bindTo)=="string"){

1225$C.bindHandlerCache[_30b.bindTo]=function(){

1226_30c.call(null,null,_30b);

1227};

1228}

1229if(_30d){

1230_30c.call(null,null,_30b);

1231}

1232};

1233$B.register.addListener=function(_316,_317,_318,_319){

1234if(!$E.isListener(_316,_317,_318,_319)){

1235$E.addListener(_316,_317,_318,_319);

1236}

1237};

1238$B.assignValue=function(_31a,_31b,_31c,_31d){

1239if(!_31a){

1240return;

1241}

1242if(_31a.call){

1243_31a.call(null,_31c,_31d);

1244return;

1245}

1246var _31e=$C.objectCache[_31a];

1247if(_31e&&_31e._cf_setValue){

1248_31e._cf_setValue(_31c);

1249return;

1250}

1251var _31f=document.getElementById(_31a);

1252if(!_31f){

1253$C.handleError(null,"bind.assignvalue.elnotfound","bind",[_31a]);

1254}

1255if(_31f.tagName=="SELECT"){

1256var _320=$U.checkQuery(_31c);

1257var _321=$C.objectCache[_31a];

1258if(_320){

1259if(!_321||(_321&&(!_321.valueCol||!_321.displayCol))){

1260$C.handleError(null,"bind.assignvalue.selboxmissingvaldisplay","bind",[_31a]);

1261return;

1262}

1263}else{

1264if(typeof (_31c.length)=="number"&&!_31c.toUpperCase){

1265if(_31c.length>0&&(typeof (_31c[0].length)!="number"||_31c[0].toUpperCase)){

1266$C.handleError(null,"bind.assignvalue.selboxerror","bind",[_31a]);

1267return;

1268}

1269}else{

1270$C.handleError(null,"bind.assignvalue.selboxerror","bind",[_31a]);

1271return;

1272}

1273}

1274_31f.options.length=0;

1275if(!_320){

1276for(var i=0;i<_31c.length;i++){

1277var opt=new Option(_31c[i][1],_31c[i][0]);

1278_31f.options[i]=opt;

1279}

1280}else{

1281if(_320=="col"){

1282var _324=_31c.DATA[_321.valueCol];

1283var _325=_31c.DATA[_321.displayCol];

1284if(!_324||!_325){

1285$C.handleError(null,"bind.assignvalue.selboxinvalidvaldisplay","bind",[_31a]);

1286return;

1287}

1288for(var i=0;i<_324.length;i++){

1289var opt=new Option(_325[i],_324[i]);

1290_31f.options[i]=opt;

1291}

1292}else{

1293if(_320=="row"){

1294var _326=-1;

1295var _327=-1;

1296for(var i=0;i<_31c.COLUMNS.length;i++){

1297var col=_31c.COLUMNS[i];

1298if(col==_321.valueCol){

1299_326=i;

1300}

1301if(col==_321.displayCol){

1302_327=i;

1303}

1304if(_326!=-1&&_327!=-1){

1305break;

1306}

1307}

1308if(_326==-1||_327==-1){

1309$C.handleError(null,"bind.assignvalue.selboxinvalidvaldisplay","bind",[_31a]);

1310return;

1311}

1312for(var i=0;i<_31c.DATA.length;i++){

1313var opt=new Option(_31c.DATA[i][_327],_31c.DATA[i][_326]);

1314_31f.options[i]=opt;

1315}

1316}

1317}

1318}

1319}else{

1320_31f[_31b]=_31c;

1321}

1322$E.callBindHandlers(_31a,null,"change");

1323$L.info("bind.assignvalue.success","bind",[_31c,_31a,_31b]);

1324};

1325$B.localBindHandler=function(e,_32a){

1326var _32b=document.getElementById(_32a.bindTo);

1327var _32c=$B.evaluateBindTemplate(_32a,true);

1328$B.assignValue(_32a.bindTo,_32a.bindToAttr,_32c);

1329};

1330$B.localBindHandler._cf_bindhandler=true;

1331$B.evaluateBindTemplate=function(_32d,_32e,_32f,_330){

1332var _331=_32d.bindExpr;

1333var _332="";

1334for(var i=0;i<_331.length;i++){

1335if(typeof (_331[i])=="object"){

1336var _334=$B.getBindElementValue(_331[i][0],_331[i][1],_331[i][2],_32e,_330);

1337if(_334==null){

1338if(_32e){

1339_332="";

1340break;

1341}else{

1342_334="";

1343}

1344}

1345if(_32f){

1346_334=encodeURIComponent(_334);

1347}

1348_332+=_334;

1349}else{

1350_332+=_331[i];

1351}

1352}

1353return _332;

1354};

1355$B.jsBindHandler=function(e,_336){

1356var _337=_336.bindExpr;

1357var _338=_336.callFunction+"(";

1358for(var i=0;i<_337.length;i++){

1359var _33a;

1360if(typeof (_337[i])=="object"){

1361_33a=$B.getBindElementValue(_337[i][0],_337[i][1],_337[i][2],false);

1362}else{

1363_33a=_337[i];

1364}

1365if(_33a&&_33a.replace){

1366_33a=_33a.replace(/\\/g,"\\\\");

1367_33a=_33a.replace(/\'/g,"\\'");

1368}

1369if(i!=0){

1370_338+=",";

1371}

1372_338+="'"+_33a+"'";

1373}

1374_338+=")";

1375$L.info("bind.jsbindhandler.invoking","bind",[_338]);

1376var _33b=eval(_338);

1377$B.assignValue(_336.bindTo,_336.bindToAttr,_33b,_336.bindToParams);

1378};

1379$B.jsBindHandler._cf_bindhandler=true;

1380$B.urlBindHandler=function(e,_33d){

1381var _33e=_33d.bindTo;

1382if($C.objectCache[_33e]&&$C.objectCache[_33e]._cf_visible===false){

1383$C.objectCache[_33e]._cf_dirtyview=true;

1384return;

1385}

1386var url=$B.evaluateBindTemplate(_33d,false,true);

1387if(_33d.bindToAttr){

1388var _33d={"bindTo":_33d.bindTo,"bindToAttr":_33d.bindToAttr,"bindToParams":_33d.bindToParams,"errorHandler":_33d.errorHandler,"url":url};

1389try{

1390$A.sendMessage(url,"GET",null,true,$B.urlBindHandler.callback,_33d);

1391}

1392catch(e){

1393$C.handleError(_33d.errorHandler,"ajax.urlbindhandler.connectionerror","http",[url,e]);

1394}

1395}else{

1396$A.replaceHTML(_33e,url,null,null,null,_33d.errorHandler);

1397}

1398};

1399$B.urlBindHandler._cf_bindhandler=true;

1400$B.urlBindHandler.callback=function(req,_341){

1401if($A.isRequestError(req)){

1402$C.handleError(_341.errorHandler,"bind.urlbindhandler.httperror","http",[req.status,_341.url,req.statusText],req.status,req.statusText);

1403}else{

1404$L.info("bind.urlbindhandler.response","http",[req.responseText]);

1405var _342;

1406try{

1407_342=$X.JSON.decode(req.responseText);

1408}

1409catch(e){

1410$C.handleError(_341.errorHandler,"bind.urlbindhandler.jsonerror","http",[req.responseText]);

1411}

1412$B.assignValue(_341.bindTo,_341.bindToAttr,_342,_341.bindToParams);

1413}

1414};

1415$A.initSelect=function(_343,_344,_345){

1416$C.objectCache[_343]={"valueCol":_344,"displayCol":_345};

1417};

1418$S.setupSpry=function(){

1419if(typeof (Spry)!="undefined"&&Spry.Data){

1420Spry.Data.DataSet.prototype._cf_getAttribute=function(_346){

1421var val;

1422var row=this.getCurrentRow();

1423if(row){

1424val=row[_346];

1425}

1426return val;

1427};

1428Spry.Data.DataSet.prototype._cf_register=function(_349,_34a,_34b){

1429var obs={bindParams:_34b};

1430obs.onCurrentRowChanged=function(){

1431_34a.call(null,null,this.bindParams);

1432};

1433obs.onDataChanged=function(){

1434_34a.call(null,null,this.bindParams);

1435};

1436this.addObserver(obs);

1437};

1438if(Spry.Debug.trace){

1439var _34d=Spry.Debug.trace;

1440Spry.Debug.trace=function(str){

1441$L.info(str,"spry");

1442_34d(str);

1443};

1444}

1445if(Spry.Debug.reportError){

1446var _34f=Spry.Debug.reportError;

1447Spry.Debug.reportError=function(str){

1448$L.error(str,"spry");

1449_34f(str);

1450};

1451}

1452$L.info("spry.setupcomplete","bind");

1453}

1454};

1455$E.registerOnLoad($S.setupSpry,null,true);

1456$S.bindHandler=function(_351,_352){

1457var url;

1458var _354="_cf_nodebug=true&_cf_nocache=true";

1459if(window._cf_clientid){

1460_354+="&_cf_clientid="+_cf_clientid;

1461}

1462var _355=window[_352.bindTo];

1463var _356=(typeof (_355)=="undefined");

1464if(_352.cfc){

1465var _357={};

1466var _358=_352.bindExpr;

1467for(var i=0;i<_358.length;i++){

1468var _35a;

1469if(_358[i].length==2){

1470_35a=_358[i][1];

1471}else{

1472_35a=$B.getBindElementValue(_358[i][1],_358[i][2],_358[i][3],false,_356);

1473}

1474_357[_358[i][0]]=_35a;

1475}

1476_357=$X.JSON.encode(_357);

1477_354+="&method="+_352.cfcFunction;

1478_354+="&argumentCollection="+encodeURIComponent(_357);

1479$L.info("spry.bindhandler.loadingcfc","http",[_352.bindTo,_352.cfc,_352.cfcFunction,_357]);

1480url=_352.cfc;

1481}else{

1482url=$B.evaluateBindTemplate(_352,false,true,_356);

1483$L.info("spry.bindhandler.loadingurl","http",[_352.bindTo,url]);

1484}

1485var _35b=_352.options||{};

1486if((_355&&_355._cf_type=="json")||_352.dsType=="json"){

1487_354+="&returnformat=json";

1488}

1489if(_355){

1490if(_355.requestInfo.method=="GET"){

1491_35b.method="GET";

1492if(url.indexOf("?")==-1){

1493url+="?"+_354;

1494}else{

1495url+="&"+_354;

1496}

1497}else{

1498_35b.postData=_354;

1499_35b.method="POST";

1500_355.setURL("");

1501}

1502_355.setURL(url,_35b);

1503_355.loadData();

1504}else{

1505if(!_35b.method||_35b.method=="GET"){

1506if(url.indexOf("?")==-1){

1507url+="?"+_354;

1508}else{

1509url+="&"+_354;

1510}

1511}else{

1512_35b.postData=_354;

1513_35b.useCache=false;

1514}

1515var ds;

1516if(_352.dsType=="xml"){

1517ds=new Spry.Data.XMLDataSet(url,_352.xpath,_35b);

1518}else{

1519ds=new Spry.Data.JSONDataSet(url,_35b);

1520ds.preparseFunc=$S.preparseData;

1521}

1522ds._cf_type=_352.dsType;

1523var _35d={onLoadError:function(req){

1524$C.handleError(_352.errorHandler,"spry.bindhandler.error","http",[_352.bindTo,req.url,req.requestInfo.postData]);

1525}};

1526ds.addObserver(_35d);

1527window[_352.bindTo]=ds;

1528}

1529};

1530$S.bindHandler._cf_bindhandler=true;

1531$S.preparseData=function(ds,_360){

1532var _361=$U.getFirstNonWhitespaceIndex(_360);

1533if(_361>0){

1534_360=_360.slice(_361);

1535}

1536if(window._cf_jsonprefix&&_360.indexOf(_cf_jsonprefix)==0){

1537_360=_360.slice(_cf_jsonprefix.length);

1538}

1539return _360;

1540};

1541$P.init=function(_362){

1542$L.info("pod.init.creating","widget",[_362]);

1543var _363={};

1544_363._cf_body=_362+"_body";

1545$C.objectCache[_362]=_363;

1546};

1547$B.cfcBindHandler=function(e,_365){

1548var _366=(_365.httpMethod)?_365.httpMethod:"GET";

1549var _367={};

1550var _368=_365.bindExpr;

1551for(var i=0;i<_368.length;i++){

1552var _36a;

1553if(_368[i].length==2){

1554_36a=_368[i][1];

1555}else{

1556_36a=$B.getBindElementValue(_368[i][1],_368[i][2],_368[i][3],false);

1557}

1558_367[_368[i][0]]=_36a;

1559}

1560var _36b=function(_36c,_36d){

1561$B.assignValue(_36d.bindTo,_36d.bindToAttr,_36c,_36d.bindToParams);

1562};

1563var _36e={"bindTo":_365.bindTo,"bindToAttr":_365.bindToAttr,"bindToParams":_365.bindToParams};

1564var _36f={"async":true,"cfcPath":_365.cfc,"httpMethod":_366,"callbackHandler":_36b,"errorHandler":_365.errorHandler};

1565if(_365.proxyCallHandler){

1566_36f.callHandler=_365.proxyCallHandler;

1567_36f.callHandlerParams=_365;

1568}

1569$X.invoke(_36f,_365.cfcFunction,_367,_36e);

1570};

1571$B.cfcBindHandler._cf_bindhandler=true;

1572}

1573}

1574cfinit();

1575

Firebug's log limit has been reached. %S entries not shown.		Preferences	 

Open in new window

0
 

Author Comment

by:AaronDitto
ID: 22636803
I tried a brand new cfc and cfm ajax binding sample with CFGrid and the exact same error.

Exception Thrown and Not Caught

This has got to be the issue.  I've looked online and noticed several other people have this problem but no solution.

Any thoughts?
0
 
LVL 25

Expert Comment

by:dgrafx
ID: 22636843
some ajax thing i imagine

did you look on adobe and see if any updates to the cf version you are using?

I guess I don't have any other ideas

I'm really sorry ...
0
 

Accepted Solution

by:
AaronDitto earned 0 total points
ID: 22636894
I've found this answer:

That error is due to our application.cfm having a single HTML comment at the start of the file. Apparently if your Application.cfm or Application.cfc file outputs ANYTHING, binds to CFCs with AJAX (via HTML CFGRID or CFAJAXPROXY, for example) do not work. The CFC will be called, but the data from it will never "flow" into the CFGRID. Removing the comment from the Application.cfm file took care of our CFGRID issue.

After I removed both the <cfinclude template="style.cfm"> and <cfinclude template="menu.cfm"> from the Application.cfm file, it worked perfectly.

That unfortunately though is a HUGE pain, as it will take alot of rewriting for the Intranet application as a whole to get some of this functionality in place.

I appreciate your dgrafx - and I will award you 1/2 of the 350 point total for your time.
0
 
LVL 25

Expert Comment

by:dgrafx
ID: 22636962
that is really odd
I'm glad you found it!
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now