|
ColdBox Platform Version 2.6.3 | ||||
FRAMES |
WEB-INF.cftags.componentcoldbox.system.beans.requestContext
public class requestContext
I am a coldbox request
Constructor Summary | |
---|---|
init(any struct1, any struct2, any properties)
constructor |
Method Summary | |
---|---|
void |
NoRender([boolean remove='false'])
Set the flag that tells the framework not to render, just execute |
any |
buildLink(string linkto, [boolean translate='true'], [boolean ssl='false'], [string baseURL=''])
Builds a link to a passed event, either SES or normal link. If the ses interceptor is declared it will create routes. |
void |
clearCollection()
Clear the entire collection |
void |
collectionAppend(any collection, [boolean overwrite='false'])
Append a structure to the collection, with overwrite or not. Overwrite = false by default |
any |
getCollection([boolean DeepCopyFlag='false'])
I Get a reference or deep copy of the request Collection: Returns a structure |
any |
getCurrentAction()
Gets the current action requested in the current event: String |
any |
getCurrentEvent()
Gets the current set event: String |
any |
getCurrentHandler()
Gets the current handler requested in the current event: String |
string |
getCurrentLayout()
Gets the current set layout |
string |
getCurrentView()
Gets the current set view |
any |
getDefaultLayout()
Get's the default layout of the application: String |
any |
getDefaultView()
Get's the default view of the application: String |
any |
getEventCacheableEntry()
Get the event cacheable entry |
any |
getEventName()
The event name used by the application: String |
struct |
getFolderLayouts()
|
any |
getSelf()
Returns index.cfm?{eventName}= : String |
numeric |
getSize()
The number of elements in the collection |
Any |
getTrimValue([any name], [any defaultValue='NONE'])
I Get a value from the request collection and if simple value, I will trim it. |
Any |
getValue([any name], [any defaultValue='NONE'])
I Get a value from the request collection. |
any |
getViewCacheableEntry()
Get the event cacheable entry |
struct |
getViewLayouts()
|
boolean |
getdebugpanelFlag()
I return the debugpanel flag for this request. |
any |
getmemento()
|
struct |
getrenderData()
Get the renderData structure. |
struct |
getroutedStruct()
Get the routed structure of key-value pairs. What the ses interceptor could match. |
string |
getsesBaseURL()
Get the sesBaseURL |
boolean |
isEventCacheable()
Check wether the incoming event has been flagged for caching |
boolean |
isNoRender()
Is this a no render request |
boolean |
isProxyRequest()
Is this a coldbox proxy request |
boolean |
isSES()
Determine if you are in SES mode. |
boolean |
isViewCacheable()
Check wether the incoming view has been flagged for caching |
void |
overrideEvent([string event])
I Override the current event in the request collection. This method does not execute the event, it just replaces the event to be executed by the framework's RunEvent() method. This method is usually called from an onRequestStart or onApplicationStart method. |
void |
paramValue([any name], [Any value])
Just like cfparam, but for the request collection |
void |
removeEventCacheableEntry()
Remove the cacheable entry |
void |
removeValue([string name])
I remove a value in the request collection |
void |
renderData(string type='PLAIN', any data, string contenttype='text/html')
Use this method to tell the framework to render data for you. The framework will take care of marshalling the data for you |
void |
setCollection(struct collection)
Overwrite the collection with another collection |
void |
setDefaultLayout(string DefaultLayout)
|
void |
setDefaultView(string DefaultView)
|
void |
setEventCacheableEntry(any mdCacheEntry)
Set the event cacheable entry |
void |
setEventName(string EventName)
|
void |
setFolderLayouts(struct FolderLayouts)
|
void |
setLayout([string name])
I Set the layout to override and render. Layouts are pre-defined in the config file. However I can override these settings if needed. Do not append a the cfm extension. Request Collection name: currentLayout |
void |
setProxyRequest()
Set that this is a proxy request |
void |
setValue([any name], [Any value])
I Set a value in the request collection |
void |
setView(string name, [boolean nolayout='false'], [boolean cache='false'], [string cacheTimeout=''], [string cacheLastAccessTimeout=''])
I Set the view to render in this request.I am called from event handlers. Request Collection Name: currentView, currentLayout |
void |
setViewCacheableEntry(any mdCacheEntry)
Set the view cacheable entry |
void |
setViewLayouts(struct ViewLayouts)
|
void |
setisSES(boolean isSES)
Set isSES flag |
void |
setmemento(any memento)
|
void |
setroutedStruct(struct routedStruct)
Set routed struct of key-value pairs. This is used only by the SES interceptor. Not for public use. |
void |
setsesBaseURL(string sesBaseURL)
Set the sesBaseURL |
void |
showdebugpanel(boolean show)
I can override to show or not the debug panel. Very useful in AJAX debugging |
private any |
throwit(string message, [string detail=''], [string type='Framework'])
Facade for cfthrow |
boolean |
valueExists([any name])
I Check if a value exists in the request collection. |
Methods inherited from class WEB-INF.cftags.component |
---|
|
Constructor Detail |
---|
public init(any struct1, any struct2, any properties)
Method Detail |
---|
public void NoRender([boolean remove='false'])
remove
- If true, it removes the flag, else its set.public any buildLink(string linkto, [boolean translate='true'], [boolean ssl='false'], [string baseURL=''])
linkto
- The event or route you want to create the link totranslate
- Translate between . and / depending on the ses mode. So you can just use dot notation.ssl
- If true, it will change http to https if found in the ses base url.baseURL
- If not using SES, you can use this argument to create your own base url apart from the default of index.cfm. Example: https://mysample.com/index.cfmpublic void clearCollection()
public void collectionAppend(any collection, [boolean overwrite='false'])
collection
- A collection to appendoverwrite
- If you need to override data in the collection, set this to true.Public any getCollection([boolean DeepCopyFlag='false'])
DeepCopyFlag
- Default is false, gives a reference to the collection. True, creates a deep copy of the collection.public any getCurrentAction()
public any getCurrentEvent()
public any getCurrentHandler()
public string getCurrentLayout()
public string getCurrentView()
public any getDefaultLayout()
public any getDefaultView()
public any getEventCacheableEntry()
public any getEventName()
public struct getFolderLayouts()
public any getSelf()
public numeric getSize()
Public Any getTrimValue([any name], [any defaultValue='NONE'])
name
- Name of the variable to get from the request collection: StringdefaultValue
- Default value to return if not found.There are no default values for complex structures. You can send [array][struct][query] and the
method will return the empty complex variable.Please remember to include the brackets, syntax sensitive.You can also send complex variables
as the defaultValue argument.Public Any getValue([any name], [any defaultValue='NONE'])
name
- Name of the variable to get from the request collection: StringdefaultValue
- Default value to return if not found.There are no default values for complex structures. You can send [array][struct][query] and the
method will return the empty complex variable.Please remember to include the brackets, syntax sensitive.You can also send complex variables
as the defaultValue argument.public any getViewCacheableEntry()
public struct getViewLayouts()
public boolean getdebugpanelFlag()
public any getmemento()
public struct getrenderData()
public struct getroutedStruct()
public string getsesBaseURL()
public boolean isEventCacheable()
public boolean isNoRender()
public boolean isProxyRequest()
public boolean isSES()
public boolean isViewCacheable()
Public void overrideEvent([string event])
event
- The name of the event to override.Public void paramValue([any name], [Any value])
name
- Name of the variable to param in the request collection: Stringvalue
- The value of the variable to set if not found.public void removeEventCacheableEntry()
Public void removeValue([string name])
name
- The name of the variable to remove.public void renderData(string type='PLAIN', any data, string contenttype='text/html')
type
- The type of data to render. Valid types are JSON, WDDX, PLAIN. THe deafult is PLAIN. IF an invalid type is sent in, this method will throw an errordata
- The data you would like to marshall and return by the frameworkcontenttype
- The content type of the data. This will be used in the cfcontent tag: text/html, text/plain, text/xml, text/json, etc. The default value is text/html. However, if you choose JSON this method will choose text/plain, if you choose WDDX this method will choose text/xml for you. The default encoding is utf-8public void setCollection(struct collection)
collection
public void setDefaultLayout(string DefaultLayout)
DefaultLayout
public void setDefaultView(string DefaultView)
DefaultView
public void setEventCacheableEntry(any mdCacheEntry)
mdCacheEntry
- The cache entry we need to get to cachepublic void setEventName(string EventName)
EventName
public void setFolderLayouts(struct FolderLayouts)
FolderLayouts
public void setLayout([string name])
name
- The name of the layout file to set.public void setProxyRequest()
Public void setValue([any name], [Any value])
name
- The name of the variable to set. Stringvalue
- The value of the variable to setpublic void setView(string name, [boolean nolayout='false'], [boolean cache='false'], [string cacheTimeout=''], [string cacheLastAccessTimeout=''])
name
- The name of the view to set. If a layout has been defined it will assign it, else if will assign the default layout. No extension pleasenolayout
- Boolean flag, wether the view sent in will be using a layout or not. Default is false. Uses a pre set layout or the default layout.cache
- True if you want to cache the view.cacheTimeout
- The cache timeoutcacheLastAccessTimeout
- The last access timeoutpublic void setViewCacheableEntry(any mdCacheEntry)
mdCacheEntry
- The cache entry we need to get to cachepublic void setViewLayouts(struct ViewLayouts)
ViewLayouts
public void setisSES(boolean isSES)
isSES
public void setmemento(any memento)
memento
public void setroutedStruct(struct routedStruct)
routedStruct
public void setsesBaseURL(string sesBaseURL)
sesBaseURL
public void showdebugpanel(boolean show)
show
private any throwit(string message, [string detail=''], [string type='Framework'])
message
detail
type
Public boolean valueExists([any name])
name
- Name of the variable to find in the request collection: String
|
ColdBox Platform Version 2.6.3 | ||||
FRAMES |