Controller
| Method Summary | |
public Controller |
init()
Returns the derived Controller. Objects of type Controller cannot be instantiated (i.e., this is supposed to be an abstract class). |
public any |
after([String noneExcept=""], [String allExcept=""], 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. |
public any |
before([String noneExcept=""], [String allExcept=""], 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. |
public any |
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. |
public any |
destroy()
Deletes a row from the table the model references. |
public any |
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. |
public any |
getAfterAllButThisList()
This function shouldn't really be used, it may not exist later when I figure out a better way to accomplish the goal. |
public any |
getAfterNoneButThisList()
This function shouldn't really be used, it may not exist later when I figure out a better way to accomplish the goal. |
public any |
getBeforeAllButThisList()
This function shouldn't really be used, it may not exist later when I figure out a better way to accomplish the goal. |
public any |
getBeforeNoneButThisList()
This function shouldn't really be used, it may not exist later when I figure out a better way to accomplish the goal. |
public any |
getModelType()
|
public any |
index()
The default action of the controller. cfrails by default calls the list action. |
public any |
list([any filter=""])
Lists all of the rows in the table the model refers to. |
public any |
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. |
public any |
render([any controller="#listdeleteat(variables.thisControllerName,listlen(variables.thisControllerName,"], any action, [any message=""], [struct args="#structNew()#"])
Outputs the given controller/action |
public any |
setModelType([any modelType])
|
public any |
show()
|
public any |
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. |
| Method Detail |
public any after([String noneExcept=""], [String allExcept=""], string run)
[String noneExcept=""] - A comma delimited list of functions that run should be run after.[String allExcept=""] - A comma delimited list of functions that run should not be run after.string runpublic any before([String noneExcept=""], [String allExcept=""], string run)
[String noneExcept=""] - A comma delimited list of functions that run should be run before.[String allExcept=""] - A comma delimited list of functions that run should be run before.string runpublic any create()
public any destroy()
public any edit()
public any getAfterAllButThisList()
public any getAfterNoneButThisList()
public any getBeforeAllButThisList()
public any getBeforeNoneButThisList()
public any getModelType()
public any index()
public Controller init()
public any list([any filter=""])
[any filter=""] - Filters the results for the list. For instance, you might have: name like '%joe%'public any new()
public any render([any controller="#listdeleteat(variables.thisControllerName,listlen(variables.thisControllerName,"], any action, [any message=""], [struct args="#structNew()#"])
[any controller="#listdeleteat(variables.thisControllerName,listlen(variables.thisControllerName,"] - The controller in which the given action to be rendered can be found. If not given, uses the current controller.any action - The action whose view should be shown.[any message=""] - A message to display in the view, if it displays a message.[struct args="#structNew()#"] - Arguments to pass to viewpublic any setModelType([any modelType])
[any 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'public any show()
public any update()