URLActions

<< Back to Dashboard

Contents

ColdBox's URL Actions

Covers up to version 3.1.0

ColdBox has some URL actions that will be very useful when coding and using the framework. Below is a quick table listing and below are the full descriptions

Quick URL Actions Table

URL Action Type Description
fwreinit string Reinitialize the framework and all its variables. If a password is set in the config, place the password here
fwCache any Override a cached event so it can be purged and re-cached. The framework just detects that the URL action exists
debugmode boolean Make your current session go into/out of debugging mode.
debugpass string If DebugPassword setting used, then place here.
dumpvar list A comma delimited list of variables to dump.

Expanded Descriptions

fwreinit

The most useful url action you will ever use. This action will reload the framework to a new state. It will re-initialize the configuration structures, clean the cache, and give you a fresh start. You can also password protect this URL action by filling out the ReinitPassword setting in the ConfigurationCFC, which we definitely recommend for production.

  • No ReinitPassword setting.
index.cfm?fwreinit=1

index.cfm?fwreinit=true
  • Using ReinitPassword setting, lets pretend the password is yea.
index.cfm?fwreinit=yea

Please only use URL safe or encoded passwords for the reinit command.

Important : All passwords are hashed internally when loaded to memory.

fwCache

This flag is used to override a cached event so it can be purged and re-cached by the framework. The framework just detects that the URL action exists, so it can be equals to anything.

index.cfm?event=blog.dspBlog&fwCache=true

debugmode & debugpass

This URL action is used in order for the user only to go into or out of ColdBox debug mode. Debug mode, means that a debugging panel will be rendered at the end of the requested page output. This is a very convenient way to test in production environments or while development. You can set the initial debug mode for an application via the ConfigurationCFC. In order for this action to work correctly, it must determine if the application has a DebugPassword setting. If the DebugPassword is blank, then this action works on its own.

We highly recommend setting a password for the debug mode. The debug cookie expires when the user closes the browser, that is, the cookie is a vapor cookie.

Look at the samples below.

  • DebugPassword set to blank.
index.cfm?debugmode=true

index.cfm?debugmode=1
  • Using DebugPassword setting, lets pretend the password is "yea"
index.cfm?debugmode=true&debugpass=yea

dumpvar

This URL action is used as a utility to dump variables in the debugging panel. Therefore, you need to be in debug mode in order to use it. Look at section above. You can send a single variable name or a list and it will be dumped in the DumpVar section of the debugging panel.

You can also disable this utility action via the ConfigurationCFC

Important: I highly advice setting this setting to false in production systems

  • Single Variable Dump
index.cfm?dumpvar=session

index.cfm?dumpvar=myvariable
  • Variable List
index.cfm?dumpvar=session,application,request

category Categories:
 
Download in other Formats:
markup Markup | pdf PDF | html HTML | word Word

comments Comments (0)


ColdBox Book

book