Questions tagged [fw1]

Framework One, or FW/1, is a lightweight convention-based MVC framework for CFML.

enter image description here

Framework One, or FW/1, is a lightweight convention-based MVC framework for CFML.

It is designed to require near-zero configuration, and not to get in the way, with controllers, services, views and layouts being discovered with straightforward conventions, and can auto-wire any bean factories used.

Multiple FW/1 applications can be combined as one using the subsystems feature.

Usage FW/1 uses Application.cfc and simple conventions to provide an' MVC framework in a single file.

//application.cfc

component  extends="framework.one" output="false"   {

  this.name= "Sample";
  this.sessionManagement = "yes";
  this.sessionTimeout = CreateTimeSpan(0, 4, 0, 0); 

  variables.framework = {
    home = 'main.home',
    baseURL = 'useCgiScriptName',
    trace = isDebugMode()
    };

variables.framework.routes = [
  { "main/{id:[0-9]+}"  = "main/home/id/:id"},
  { "main/home"     = "main/home"}
  ];

}

Version 3.5 was released October 21, 2015

Blog: http://framework-one.github.io/

72 questions
2
votes
1 answer

too much pathinfo using buildURL

I try to get an impression how to build a REST-API using FW/1 version 4. I set this in my Application.cfc: My controller method
Bernhard Döbler
  • 1,960
  • 2
  • 25
  • 39
2
votes
0 answers

FW1 - 404 error instead of processing controller

I started this job recently. The site is written in CF using the FW1 framework (I'm brand new to FW1). I am building out a 2012 R2 server and upgrading to CF11 at the same time. I copied the site files over and the home page loads correctly so I…
cjblonda
  • 57
  • 7
2
votes
1 answer

FW/1 App Calling onApplicationStart on Every Request

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…
Todd Sharp
  • 3,207
  • 2
  • 19
  • 27
2
votes
1 answer

On FW/1, do I need to return after doing a redirect?

I have a function in a controller that looks something like this void function edit(required struct rc) output="false" { ... if (...) { ArrayAppend(rc.message, "Error: Something did not work right."); …
James A Mohler
  • 11,060
  • 15
  • 46
  • 72
2
votes
1 answer

URL Rewrite not working on new laptop - Windows 7 Pro 64bit, IIS, ColdFusion 10, FW/1

So I have a new laptop and moving all my stuff over from the old one. Ran into several issues but I was able to overcome them except for the URL Rewrite. I’m on Windows 7 pro 64bit, Adobe ColdFusion 10 update 13, FW/1 2.2, and IIS 7, with URL…
user752746
  • 617
  • 9
  • 31
2
votes
1 answer

Error: "argument passed ... is not of type string."

I’m been struggling with this error and can’t seem to find a solution for it. I’m using FW/1 - Framework One 2.2, ACF 9, MS SQL 2008, jQyery 1.10.2. I’m trying to post a simple form via AJAX and I’m getting this error message. Any insight is much…
user752746
  • 617
  • 9
  • 31
2
votes
1 answer

while adding records separately using many-to-one relationship getting variable undefined

I am using ColdFusion ORM with FW/1. I have two tables student and parent, I have given many-to-one relationship as we know parent can have more wards in a school. I am adding student and parent separately, while adding parent I need parentId to be…
suleman khan
  • 97
  • 1
  • 1
  • 9
2
votes
1 answer

Connect Subdomain to Subsystem in FW1

I have set up a subsystem in my app: example.com/index.cfm/subsys:foo/bar What I want to do is map a subdomain to that subsystem to eliminate the need for the subsystem specification in the PATH subsys.example.com/index.cfm/foo/bar We serve our…
Kyle Macey
  • 8,074
  • 2
  • 38
  • 78
1
vote
1 answer

FW/1 Controller changes not updating in view

Way late to the party, but was messing around with FW/1 this week and I am having a problem with controllers and real time updates. I have the following code to simulate authentication for now. application.cfc public function setupRequest() { …
spacerobot
  • 265
  • 1
  • 5
  • 23
1
vote
1 answer

How ColdFusion framework ONE making view function available in views

I am wondering how framework one (fw1) making view() function available in views, like ColdFusion in built functions? For example, in the below code , the view() function can be called like any ColdFusion in built functions. How fw1 making it…
to-find
  • 33
  • 3
1
vote
1 answer

fw/1 - Can not display foreign characters in views

I have got the following main Controller default action in fw/1 (framework one 4.2), where i define some rc scope variables to be displayed in views/main/default.cfm. main.cfc function default( struct rc ) { rc.name="ΡΨΩΓΔ"; …
asimkon
  • 915
  • 1
  • 14
  • 21
1
vote
1 answer

Render JSON from controller method

I'm on FW/1 4.2. The documentation states the following: You can return data directly to the caller, bypassing views and layouts, using the renderData() function. variables.fw.renderData().data( resultData ).type( contentType ); When I attempt to…
mrSpear
  • 453
  • 5
  • 9
1
vote
0 answers

Returning string with diacritics

I want to use FW/1 to return a string that looks like this: "Wüf!" framework.renderData().data("Wüf!").type( "text" ); Note that this is not normal FW/1, but REST When I run this I get Wüf! Postman reports in the headers, Content-Type…
James A Mohler
  • 11,060
  • 15
  • 46
  • 72
1
vote
0 answers

Need explanation for 'convention over configuration'

I saw 'convention over configuration' in most of the CF frameworks. Could anyone please explain this with example? I got a different answer from different people. So, I little bit confused. Why fw1 is 'convention over configuration'?
jawahar N
  • 462
  • 2
  • 13
1
vote
1 answer

Display JSON array in Vuejs

I'm getting this data from the Coldfusion Framework/1 API in JSON format: { "COLUMNS": [ "PRODUCT_ID", "PRODUCT_NAME", "PRODUCT_STATUS", "DT_CREATED" ], "DATA": [ [ 102, "Window", "In Production", …
dkgcb
  • 81
  • 1
  • 2
  • 9