ViewPageCommand

Package: MachII.framework.commands
Inherits from: framework.EventCommand
An EventCommand for processing a view.
Method Summary
public void init(string viewName, [string contentKey=""], [string append="false"])
public boolean execute(Event event, EventContext eventContext)
private boolean getAppend()
private string getContentKey()
private string getViewName()
private boolean hasContentKey()
private void setAppend(string append)
private void setContentKey(string contentKey)
private void setViewName(string viewName)
Methods inherited from framework.EventCommand:   setParameter , getParameter , setParameters
Method Detail
execute

public boolean execute( Event event, EventContext eventContext )

Parameters:
Event event
EventContext eventContext

Code:

	<cffunction name="execute" access="public" returntype="boolean" output="true">
		<cfargument name="event" type="MachII.framework.Event" required="true" />
		<cfargument name="eventContext" type="MachII.framework.EventContext" required="true" />
		
		<cfset arguments.eventContext.displayView(arguments.event, getViewName(), getContentKey(), getAppend()) />
		
		<cfreturn true />
	</cffunction> 

getAppend

private boolean getAppend( )

Parameters:

Code:

	<cffunction name="getAppend" access="private" returntype="boolean" output="false">
		<cfreturn variables.append />
	</cffunction> 

getContentKey

private string getContentKey( )

Parameters:

Code:

	<cffunction name="getContentKey" access="private" returntype="string" output="false">
		<cfreturn variables.contentKey />
	</cffunction> 

getViewName

private string getViewName( )

Parameters:

Code:

	<cffunction name="getViewName" access="private" returntype="string" output="false">
		<cfreturn variables.viewName />
	</cffunction> 

hasContentKey

private boolean hasContentKey( )

Parameters:

Code:

	<cffunction name="hasContentKey" access="private" returntype="boolean" output="false">
		<cfreturn NOT getContentKey() IS '' />
	</cffunction> 

init

public void init( string viewName, [string contentKey=""], [string append="false"] )

Parameters:
string viewName
[string contentKey=""]
[string append="false"]

Code:

	<cffunction name="init" access="public" returntype="void" output="false">
		<cfargument name="viewName" type="string" required="true" />
		<cfargument name="contentKey" type="string" required="false" default="" />
		<cfargument name="append" type="string" required="false" default="false" />
		
		<cfset setViewName(arguments.viewName) />
		<cfset setContentKey(arguments.contentKey) />
		<cfset setAppend(arguments.append) />
	</cffunction> 

setAppend

private void setAppend( string append )

Parameters:
string append

Code:

	<cffunction name="setAppend" access="private" returntype="void" output="false">
		<cfargument name="append" type="string" required="true" />
		<cfset variables.append = (arguments.append is "true") />
	</cffunction> 

setContentKey

private void setContentKey( string contentKey )

Parameters:
string contentKey

Code:

	<cffunction name="setContentKey" access="private" returntype="void" output="false">
		<cfargument name="contentKey" type="string" required="true" />
		<cfset variables.contentKey = arguments.contentKey />
	</cffunction> 

setViewName

private void setViewName( string viewName )

Parameters:
string viewName

Code:

	<cffunction name="setViewName" access="private" returntype="void" output="false">
		<cfargument name="viewName" type="string" required="true" />
		<cfset variables.viewName = arguments.viewName />
	</cffunction>