• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfprogressbar - binding problem - not well formed html

Explorer ,
Jul 11, 2022 Jul 11, 2022

Copy link to clipboard

Copied

In our application on some pages we use cfprogressbar to show the progress of long running actions to the user. The progress bar is bound to a cfc which returns status and message from out of the session of the user.

This coding has been in use many years and always worked well.

 

For some time in version 2018 we sporadically get an error of the meaning that the cfc cannot be bound:

 

java.lang.NullPointerException at coldfusion.tagext.html.ajax.AjaxProxyTag.getCFCInvocationPath(AjaxProxyTag.java:520) at coldfusion.tagext.html.ajax.AjaxProxyTag.getCallParameters(AjaxProxyTag.java:386) at coldfusion.tagext.html.ajax.BindProcessor.parseBind(BindProcessor.java:558) at coldfusion.tagext.html.ajax.BindProcessor.processBind(BindProcessor.java:325) at coldfusion.tagext.html.ajax.ProgressBarTag.generateBindFunction(ProgressBarTag.java:335) at coldfusion.tagext.html.ajax.ProgressBarTag.doEndTag(ProgressBarTag.java:273) at cfplpButtons2ecfm1713680839._factor0(G:\Websites\icmms\farcry\tags\plp\plpButtons.cfm:148)

...

 

Thie problem is not reproducable, if the same users call the pages once again they work.

 

So in order to hide this problem from the users we wanted to use try/catch to either display the page without the progressbar in case of the error or f.i. try x times to get a working progress bar.

But unfortunately this did not work either, because if one tries to add a correct cfprogressbar after the error, the html header will contain not well formed code:

 

<head>
...
<script type="text/javascript">/* <![CDATA[ */
	ColdFusion.Ajax.importTag('CFPROGRESSBAR');
/* ]]> */</script>

<script type="text/javascript">/* <![CDATA[ */
	var <div  id="mydataProgressbarCatch">
		
	 </div>var _cf_cf_progressbar_getStatus_2256099664541202=function(_cf_progressBarId)
	{
		
		ColdFusion.Bind.cfcBindHandler(null, {'bindTo':ColdFusion.ProgressBar.loadStatus,'bindToAttr':'true','errorHandler':ColdFusion.ProgressBar.errorHandler,'cfc':'/remote/services/progress.cfc','cfcFunction':'getProgress','_cf_ajaxproxytoken':'55A687F2','bindExpr':[], 'bindToParams': { '_cf_progressbarid':'mydataProgressbarCatch' }});
	};
	_cf_progressbar_init_2256099664541203=function()
	{
		var _cf_progressbar=ColdFusion.ProgressBar.create('mydataProgressbarCatch',_cf_cf_progressbar_getStatus_2256099664541202,null,1000,null,634,false,null,'mydataProgressbarCatch',null);
	};ColdFusion.Event.registerOnLoad(_cf_progressbar_init_2256099664541203);</head>

The script containing the javascript for the second, correct cfprogressbar has no end tag!

Also if  I add a cfmessagebox after the caught error in the cfprogressbar, the end tag of the scripts is missing!

 

Are those known problems? Has anybody else the problem that cfc binding sporadically does not work?
And how can I get around the try/catch problem if I do not get the binding under control?

Views

90

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

Sorry, this is a duplicate - I did not find the posting any more and posted it twice

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

LATEST

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation