我正在使用ColdFusion开发Flash Builder\Flex Mobile应用程序.我需要帮助来修复我的搜索功能.当我尝试搜索某些内容时,我必须输入确切的单词,否则它不返回任何内容.

如果我只键入"app",而不是"applet",它什么也不返回.
搜索功能:
<cffunction name="getwordsSummaryByTerm" output="false" access="remote" returntype="Query" >
<cfargument name="searchStr" type="string" required="true" />
<cfset var qItem="">
<cfquery name="qItem" datasource="databaseyo">
SELECT *
FROM words
WHERE term = <CFQUERYPARAM CFSQLTYPE="CF_SQL_VARCHAR" VALUE="#ARGUMENTS.searchStr#">
</cfquery>
<cfreturn qItem>
</cffunction>
Run Code Online (Sandbox Code Playgroud)
Flex代码:
protected function doSearch(event:MouseEvent):void
{
if(searchTerm.text!="")
{
getAllwordsResult.token = wordsService.getwordsSummaryByTerm(searchTerm.text);
}
else
{
getAllwordsResult.token = wordsService.getAllwords();
}
}
Run Code Online (Sandbox Code Playgroud) 我从CFThread得到了一个奇怪的错误.我把它包裹在一个在CFThread之外运行完美的函数.但是,它需要大约20秒才能完成,因此我将其拍摄到CFThread,然后将用户CFLocation到新页面并在完成后提醒他们.
它还包含在CFTRY中,如果出现问题,请给我发电子邮件.
我收到CFCATCH.Message所在的电子邮件:
"由于请求已经完成,CFThread无法将标头设置为响应"
我在Google上找不到任何类似错误的引用.我假设它不喜欢我在调用Thread后直接使用CFLocation的事实.所以,对于它的地狱,我尝试使用META REFRESH重定向用户.相同的错误结果.
有任何想法吗?
2013年7月8日更新:
代码在这里:
<cfset admsID = replace(createUUID(),"-","","all")>
<cfthread action="run" name="runADMS#admsID#" admsID="#admsID#" formstruct="#form#">
<cftry>
<cfobject component="cfc.AutoDealerBrandMarketShare" name="adms">
<cfset rptPDF = adms.buildReport(dealer=formstruct.chosenDealer,mkt=formstruct.DMACode,make=formstruct.Make,rptID=admsID)>
<cfcatch type="any">
<cfmail to="pmascari@mysite.com" from="techsupport@mysite.com" subject="ADMS Error">
Error occurred running a Polk Auto Dealer Market Share report.
#cfcatch.Message#
#cfcatch.detail#
</cfmail>
</cfcatch>
</cftry>
</cfthread>
<cflocation url="http://www.usercanwaithere.com">
Run Code Online (Sandbox Code Playgroud) 我想从列表中循环选定的数字(cfselect).我尝试了getElementById但只能在同一页面上显示它.我无法将此数字传递给循环.有人能帮我吗?谢谢.
function item()
var a = document.formName.numList.selectedIndex;
document.getElementById('i').value = document. family.tBro.options[a].value;
var n=document. family.tBro.options[a].value;
<!----OTHER INPUT TEXT BOXES --->
<cfform name="family" action="complete.cfm" method="post">
How many brothers do you have?
<cfselect name="tBro" onChange="item();" required="yes">
<option value="1"> 1</option>
<option value="2"> 2</option>
<option value="3"> 3</option>
<option value="4">4</option>
</cfselect>
<!---DISPLAY THE SELECTED CHOICE from getElementById--->
Total number of brothers: <cfinput type="text" name="i" id="i">
<!---LOOP x amount of time from selected choice above.
For example, if 2 is selected, the below info will display two …Run Code Online (Sandbox Code Playgroud) 我在abc.cfm中运行以下表单.
//参数定义
<cfparam name="startdate" default="#DateFormat(dateAdd('d',-40,now()), 'yyyy-mm-dd')#">
<cfparam name="enddate" default="#DateFormat(dateAdd('d',-1,now()), 'yyyy-mm-dd')#">
<cfform format="HTML" action="datedownload.cfm" method="get" >
<cfformgroup type="horizontal">
<cfinput type="dateField" name="startdate" width="100" value="#startdate#">
<cfinput type="dateField" name="enddate" width="100" value="#enddate#">
<cfinput name="submitApply" type="submit" value = "Apply">
<cfinput type="button" name="download" value="Download" onclick="window.location.href='datedownload.cfm?startdate=#form.startdate#&enddate=#form.enddate#path=http://abc.xyz.com/username/July30/datedownload.cfm'">
</cfformgroup>
</cfform>
Run Code Online (Sandbox Code Playgroud)
使用datedownload.cfm中的以下代码,一切都正常打印
Startdate: <cfdump var = "#startdate#">
End Date :<cfdump var = "#enddate#">
Run Code Online (Sandbox Code Playgroud)
除此之外,Enddate正在打印完整路径,如下所示:
Startdate: 2013-06-20 End Date : 2013-07-29path=http://abc.xyz.com/username/July30/datedownload.cfm
Run Code Online (Sandbox Code Playgroud)
如何从路径中删除东西?
我正在将PHP插件转换为ColdFusion.在PHP中,使用了OO概念,因此使用了类和对象.
我如何将这些类转换为ColdFusion类并为这些类创建对象.
我也创建了Java类并使用<cfobject>标签,我创建了对象,但我需要ColdFusion类并创建对象.
如果您有任何想法,请告诉我.
我从disqus.com API获得以下结构返回,我只是不知道如何使用Coldfusion仅以红色检索以下"id"值.

这是返回的完整数组.
{
"cursor":{
"prev":null,
"hasNext":false,
"next":"1213061503000000:1:0",
"hasPrev":false,
"total":null,
"id":"1213061503000000:1:0",
"more":false
},
"code":0,
"response":[
{
"category":"1",
"reactions":0,
"identifiers":[],
"forum":"bobross",
"title":"Donkeys live a long time",
"dislikes":0,
"isDeleted":false,
"author":"1",
"userScore":0,
"id":"2",
"isClosed":false,
"posts":0,
"link":null,
"likes":0,
"message":"\"Donkeys live a long time. None of you have ever seen a dead donkey.\"",
"ipAddress":"127.0.0.1",
"slug":"donkeys_live_a_long_time",
"createdAt":"2008-06-10T02:31:43"
},
{
"category":"1",
"reactions":0,
"identifiers":[
"my-identifier"
],
"forum":"bobross",
"title":"Happy Accidents",
"dislikes":0,
"isDeleted":false,
"author":"1",
"userScore":0,
"id":"1",
"isClosed":false,
"posts":76,
"link":null,
"likes":0,
"message":"\"If you've painted before you know that we don't make …Run Code Online (Sandbox Code Playgroud) 我有几台运行ColdFusion 8的Windows 2003 Web服务器,其中ColdFusion Administrator应用程序作为自己的IIS网站运行,只能通过127.0.0.1(localhost)访问.
如果只有远程访问服务器的用户是管理员,是否需要在应用程序中使用密码?
我有一个分页的表单页面.我想保留表单值,因为用户使用分页进入上一页或下一页.我知道可以使用会话范围来完成.但是,这里我不想使用会话范围.有没有人对如何在不使用会话时这样做有任何想法?请告诉我.
这是我的表单页面:
<cfoutput>
<form action="#buildUrl(action='survey.save_surveyresults',querystring='surveyId=#rc.surveyid#')#" method="post">
<input type="hidden" name="id" value="0">
<input type="hidden" name="surveyid" value="#rc.surveyId#">
<div class="container-fluid">
<div class="row">
<div class="control-group">
<label class="label-control" for="name">Name</label>
<div class="controls">
<input type="text" name="name" id="name" required="true" placeholder="enter your name" value="#rc.name#">
</div>
</div>
<div class="control-group">
<label class="label-control" for="email">Email</label>
<div class="controls">
<input type="text" name="email" id="email" required="true" placeholder="enter your Email" value="#rc.email#">
</div>
</div>
<cfloop query="rc.questions" startrow="#startrow#" maxrows="#perpage#">
<!--- because we have all questions and answers in query we can use switch instead calling template or view
for each question, …Run Code Online (Sandbox Code Playgroud) 似乎当我使用<cfsavecontent>标签时,它的输出由服务器提供(没有输出变量),这对我来说,有点挫败了目的<cfsavecontent>.
如果这很重要:我的应用程序使用ColdSpring,ModelGlue和Transfer ORM.
这是我在函数中的示例代码:
<cfsavecontent variable="testvar">
<cfinclude template="test.cfm" />
</cfsavecontent>
<cfreturn testvar>
Run Code Online (Sandbox Code Playgroud)
和模板:
<cfdocument format="PDF" pagetype="A4" orientation="portrait" unit="cm">
<cfoutput>
<!--- PDF content here --->
</cfoutput>
</cfdocument>
Run Code Online (Sandbox Code Playgroud)
我的浏览器(谷歌浏览器)正在解析PDF内容,而视图甚至没有加载.我怎样才能最好地防止这种情况发生?
只是为了澄清:我#testvar#还没有在这段代码中输出变量,尽管它似乎无论如何都会在浏览器中加载模板.
我编写了简单的重写规则,重写.cfm扩展链接(使用出站规则),并使用等效的入站规则解析为完整的.cfm路径.例:
此出站链接:
http://mysite/section/page
解决了这个完整的路径:
http://mysite/section/page.cfm
当我访问没有文件扩展名的链接时,在任何浏览器中,页面都显示在屏幕上,但浏览器似乎仍在等待页面完成加载(在浏览器选项卡中获取旋转的圆圈,而Firefox则说"转移"来自mywebsite的数据...")
在"等待"加载页面大约5分钟后,浏览器将停止尝试加载并显示"无法显示页面"错误.我使用Firebug的NET面板来查看最新情况,基本上页面永远不会完成加载(文件大小保持0kb直到浏览器崩溃).
如果我转到一个完全限定的路径页面,http://mysite/section/page.cfm那么页面会在大约20ms内完全加载,Firebug会给我页面的大小.
任何人都可以建议发生什么事情以及如何解决它?
coldfusion ×10
coldfusion-8 ×2
apache-flex ×1
cfdocument ×1
cfform ×1
cfthread ×1
header ×1
iis-7 ×1
java ×1
response ×1
security ×1