fw1

cfc that bring in additional functions via include

与世无争的帅哥 提交于 2020-01-05 21:06:27
问题 My application.cfc starts with: <cfcomponent extends="org.corfield.framework"> later on void function setupApplication() output="false" { I have // tools include "initapp.cfm"; initapp.cfm has nothing but functions in it. Things like: <!--- Helper functions ---> <cfscript> string function stripHTML(str) output="false" { return REReplaceNoCase(arguments.str,"<[^>]*>","","ALL"); } application.stripHTML = stripHTML; </cfscript> The nature of the functions is NOT associated with a session. Is

cfc that bring in additional functions via include

流过昼夜 提交于 2020-01-05 21:05:12
问题 My application.cfc starts with: <cfcomponent extends="org.corfield.framework"> later on void function setupApplication() output="false" { I have // tools include "initapp.cfm"; initapp.cfm has nothing but functions in it. Things like: <!--- Helper functions ---> <cfscript> string function stripHTML(str) output="false" { return REReplaceNoCase(arguments.str,"<[^>]*>","","ALL"); } application.stripHTML = stripHTML; </cfscript> The nature of the functions is NOT associated with a session. Is

FW/1 App Calling onApplicationStart on Every Request

被刻印的时光 ゝ 提交于 2020-01-04 15:51:23
问题 I have a FW/1 app on Railo 4.2.2/Apache and for some reason it's calling onApplicationStart on every request. I can tell it's not any reinit code - put in a callStackGet() dump in setupApplication and can see that the root call is onApplicationStart (not via any init hook). Are there any known bugs in Railo that would cause this? I've double checked the application timeout (1 day) and the FW/1 setting - it's turned off - so there should be no reason the app would be losing application scope

Creating FW/1 Service in application.cfc

喜你入骨 提交于 2019-12-25 07:10:03
问题 I am trying to create call a service in application.cfc The original code looked like It is now void function setupApplication() { ... application.objCCFRO = new model.services.setting(); application.stSetting = application.objCCFRO.loadini("standard.ini"); I am trying to convert it to application.stSetting = variables.beanFactory.getBean( "settingService" ).loadIni("standard.ini"); The documentation says sometimes you need access to the bean factory directly (such as for obtaining a

ColdFusion Converting Form Values into a Struct

半城伤御伤魂 提交于 2019-12-23 12:10:02
问题 I am building a form for my ColdFusion application using the naming format report[{field-name}] which when using RoR or CFWheels would give me a struct on the backend called report containing all of my field names. I am using FW/1 so all of my form fields get put into the RC scope rather than remaining in the Form scope. I know that it is possible to convert my form fields into a ColdFusion struct, because, as I said, CFWheels does it. I just have no idea how to make my application do it.

How do I return JSON from an action in FW/1?

孤者浪人 提交于 2019-12-20 05:13:14
问题 FW/1 seems to be oriented to returning complete web pages what if JSON data is needed? A typical layout looks like: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>User Manager</title> <link rel="stylesheet" type="text/css" href="assets/css/styles.css" /> </head> <body> <h1>User Manager</h1> <ul class="nav horizontal clear"> <li><a href="index.cfm">Home</a></li> <li><a href="index.cfm?action=user.list" title="View the list of users">Users</a></li> <li><a

How do I return JSON from an action in FW/1?

荒凉一梦 提交于 2019-12-02 05:00:28
FW/1 seems to be oriented to returning complete web pages what if JSON data is needed? A typical layout looks like: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>User Manager</title> <link rel="stylesheet" type="text/css" href="assets/css/styles.css" /> </head> <body> <h1>User Manager</h1> <ul class="nav horizontal clear"> <li><a href="index.cfm">Home</a></li> <li><a href="index.cfm?action=user.list" title="View the list of users">Users</a></li> <li><a href="index.cfm?action=user.form" title="Fill out form to add new user">Add User</a></li> <li><a href=