Documentation home page

cfrails
Component View

View

The base View class from which all other view cfcs should derive.

Method Summary
public any init(any model)
          Initializes the appropriate view
public any combine_columns_in_list(any column_list, any human_name, any priority, [any delimiter])
          Combines columns in the list into one column. Columns specified as hidden or null will remain undisplayed.
public any edit([any message=""])
          Outputs the model's form submitting to the update action.
public any index([any message=""])
          Outputs a list of all the rows in the table to which the model refers.
public any list([any message=""], [any queryResult="#variables.model.find_all()#"])
          Outputs a list of all the rows in the table to which the model refers.
public any new([any message=""])
          Outputs the model's form submitting to the create action.
public any onChange([any field], [any code])
          Sets the onchange event handler for a given field.
public any onOutputOf([any column], [any run])
          Given the name of a column and function to run, it will run that function instead of outputting the column's actual value. The function should not require any arguments. A structure representing the current row will be injected into the function for your use.
public any set_field_type(String whichFieldName, String newFieldType, [any values="#arrayNew(1)#"], [any displayValues="#arrayNew(1)#"], [any yearRange="1900,#year(now())+10#"])
public any set_human_name(String whichFieldName, String newHumanName)
public any set_priority(String whichFieldName, numeric newPriority)
public any set_show_list_link_on_form([boolean value])
public any set_title_edit([string value])
public any set_title_list([string value])
public any set_title_new([string value])
public any setModelField([any fieldname], [any value])
public any setShowActionsOnList([boolean value])
public any show()
          Shows a record
public any underTitleAddText()
public any underTitleEditText()
public any underTitleFormText()
public any underTitleListText()
 

Method Detail

combine_columns_in_list

public any combine_columns_in_list(any column_list, any human_name, any priority, [any delimiter])
Combines columns in the list into one column. Columns specified as hidden or null will remain undisplayed.

Parameters:
any column_list - A comma delimited list of the column names you want to combine.
any human_name - The display name of the new column.
any priority - A number representing what order the new column should be shown in the list. Ties are resolved by making combined columns display first.
[any delimiter]

edit

public any edit([any message=""])
Outputs the model's form submitting to the update action.

Parameters:
[any message=""] - A message to display.

index

public any index([any message=""])
Outputs a list of all the rows in the table to which the model refers.

Parameters:
[any message=""] - A message to display.

init

public any init(any model)
Initializes the appropriate view

Parameters:
any model - The model object that this view is referring to

list

public any list([any message=""], [any queryResult="#variables.model.find_all()#"])
Outputs a list of all the rows in the table to which the model refers.

Parameters:
[any message=""] - A message to display.
[any queryResult="#variables.model.find_all()#"]

new

public any new([any message=""])
Outputs the model's form submitting to the create action.

Parameters:
[any message=""] - A message to display.

onChange

public any onChange([any field], [any code])
Sets the onchange event handler for a given field.

Parameters:
[any field] - The name of the field for which you want to set the onchange event handle.
[any code]

onOutputOf

public any onOutputOf([any column], [any run])
Given the name of a column and function to run, it will run that function instead of outputting the column's actual value. The function should not require any arguments. A structure representing the current row will be injected into the function for your use.

Parameters:
[any column]
[any run]

set_field_type

public any set_field_type(String whichFieldName, String newFieldType, [any values="#arrayNew(1)#"], [any displayValues="#arrayNew(1)#"], [any yearRange="1900,#year(now())+10#"])
Parameters:
String whichFieldName - The field whose type you want to change.
String newFieldType - The type the field should be.
[any values="#arrayNew(1)#"] - select' or multipleselect, radiolist, or checkboxlist
[any displayValues="#arrayNew(1)#"] - select' or multipleselect, radiolist, or checkboxlist, to be shown in the options/beside the checkbox or radio button. It should match the values.
[any yearRange="1900,#year(now())+10#"] - A range of years if this is a date, datetime, or monthyeardate. Should be in the form 'minYear,maxYear'. The range is inclusive.

set_human_name

public any set_human_name(String whichFieldName, String newHumanName)
Parameters:
String whichFieldName
String newHumanName

set_priority

public any set_priority(String whichFieldName, numeric newPriority)
Parameters:
String whichFieldName
numeric newPriority

set_show_list_link_on_form

public any set_show_list_link_on_form([boolean value])
Parameters:
[boolean value] - Should the link to the list show below the add and edit forms?

set_title_edit

public any set_title_edit([string value])
Parameters:
[string value] - The title that should show above the form for edits

set_title_list

public any set_title_list([string value])
Parameters:
[string value] - The title that should show above the list table

set_title_new

public any set_title_new([string value])
Parameters:
[string value] - The title that should show above the form for new records

setModelField

public any setModelField([any fieldname], [any value])
Parameters:
[any fieldname]
[any value]

setShowActionsOnList

public any setShowActionsOnList([boolean value])
Parameters:
[boolean value] - Should the list show actions for delete and edit?

show

public any show()
Shows a record


underTitleAddText

public any underTitleAddText()

underTitleEditText

public any underTitleEditText()

underTitleFormText

public any underTitleFormText()

underTitleListText

public any underTitleListText()