Solved

Do you have to pass variables as hidden fields in CF FW1 form?

Posted on 2014-02-13
1
560 Views
Last Modified: 2014-02-23
I have a 3-page form. This is my first time using FW1 model. I thought declaring variables as rc.variablename in my controller would carry the variables from page to page but they don't appear to. Do I really have to pass as hidden input from page to page?
0
Comment
Question by:traport
1 Comment
 
LVL 4

Accepted Solution

by:
Rodrigo Munera earned 500 total points
ID: 39870396
Declaring variables in the framework allows other objects within that framework to access the value of those variables, think of those variables set in FW1 as "global" variables that can exist outside of the object. The whole premise of FW1 in OO programming is that your code is encapsulated in beans so any variables defined inside that bean are not available to the code outside, setting request variables makes those variables available to other objects without having to explicitly pass them outside of the object and having to create an argument input in another object or method, but it all ends when the request ends (after the page has finished loading).

If you want your data to persist through several requests (page loads) you can use your session scope, or pass the data from one page to another using URL or form variables.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 …
I spent nearly three days trying to figure out how incorporate OAuth in Coldfusion for the Eventful API. Hopefully, this article will allow Coldfusion Programmers to buzz through the API when they need to. Basically, what this script does is authori…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

828 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