Model |
View |
Controller |
Migration
cfrails.Controller
Component Controller
The base Controller class, from which all controllers should be derived.
properties: |
|
methods: |
after, before,
create, destroy,
edit,
getModelType,
index,
init,
list,
new,
render,
setModelType,
show,
update |
after
|
public
after
(
String
noneExcept="",
String
allExcept="",
required
string
run
)
Runs function run() after the list of functions in noneExcept is executed or after all functions except those in allExcept, only if using the default url/action mapper.
Output: enabled
Parameters:
noneExcept:
String,
optional,
noneExcept
- A comma delimited list of functions that run should be run after.
allExcept:
String,
optional,
allExcept
- A comma delimited list of functions that run should not be run after.
run:
string,
required,
run
|
before
|
public
before
(
String
noneExcept="",
String
allExcept="",
required
string
run
)
Runs function run() before the list of functions in noneExcept is executed or before all functions except those in allExcept, only if using the default url/action mapper.
Output: enabled
Parameters:
noneExcept:
String,
optional,
noneExcept
- A comma delimited list of functions that run should be run before.
allExcept:
String,
optional,
allExcept
- A comma delimited list of functions that run should be run before.
run:
string,
required,
run
|
create
|
public
create
(
)
Initializes the model with the contents of the form, and saves the new record to the database. Upon success, executes after_create() method, which defaults to redirect to the list() action. Upon failure, executes after_create_failure() sending a · (alt-250) delimited list of the errors.
Output: enabled
|
destroy
|
public
destroy
(
)
Deletes a row from the table the model references.
Output: enabled
|
edit
|
public
edit
(
)
Renders and populates the form for the controller's model, and instantiates an object of the model, with all member variables initialized to the values found in the row of the id passed in url.
Output: enabled
|
getAfterAllButThisList
|
public
getAfterAllButThisList
(
)
This function shouldn't really be used, it may not exist later when I figure out a better way to accomplish the goal.
Output: enabled
|
getAfterNoneButThisList
|
public
getAfterNoneButThisList
(
)
This function shouldn't really be used, it may not exist later when I figure out a better way to accomplish the goal.
Output: enabled
|
getBeforeAllButThisList
|
public
getBeforeAllButThisList
(
)
This function shouldn't really be used, it may not exist later when I figure out a better way to accomplish the goal.
Output: enabled
|
getBeforeNoneButThisList
|
public
getBeforeNoneButThisList
(
)
This function shouldn't really be used, it may not exist later when I figure out a better way to accomplish the goal.
Output: enabled
|
getModelType
|
public
getModelType
(
)
Output: enabled
|
index
|
public
index
(
)
The default action of the controller. cfrails by default calls the list action.
Output: enabled
|
init
|
public
Controller
init
(
)
Returns the derived Controller. Objects of type Controller cannot be instantiated (i.e., this is supposed to be an abstract class).
Output: suppressed
|
list
|
public
list
(
filter=""
)
Lists all of the rows in the table the model refers to.
Output: enabled
Parameters:
filter:
any,
optional,
filter
- Filters the results for the list. For instance, you might have: name like '%joe%'
|
new
|
public
new
(
)
Renders and populates the form for the controller's model, and instantiates an object of the model, with all member variables initialized to blank values.
Output: enabled
|
render
|
public
render
(
controller="[runtime expression]",
required
action,
message=""
)
Outputs the given controller/action
Output: enabled
Parameters:
controller:
any,
optional,
controller
- The controller in which the given action to be rendered can be found. If not given, uses the current controller.
action:
any,
required,
action
- The action whose view should be shown.
message:
any,
optional,
message
- A message to display in the view, if it displays a message.
|
setModelType
|
public
setModelType
(
modelType
)
Output: enabled
Parameters:
modelType:
any,
optional,
modelType
- The full name of model type, since cfrails will be trying to instantiate it, likely from a different directory than the one in which you're calling it. For example, 'org.eclipse.cfeclipse.somepackage.somecomponent'
|
show
|
public
show
(
)
Output: enabled
|
update
|
public
update
(
)
Initializes the model with the contents of the form, and saves the new record to the database. Upon success, executes after_update() method, which defaults to redirect to the list() action. Upon failure, executes after_create_failure() sending a · (alt-250) delimited list of the errors.
Output: enabled
|
|
Me
|