page1
lick Framework v1.5 Cheat Sheet
Page Processing
no-args constructor used to create new Page
context, format, headers and path dependencies set
request parameter values bound to matching named fields
onSecurityCheck() – called for security check
onInit() – called to complete initialization
all the page controls are processed
onGet/Post() – called for additional processing
onRender() – called for pre-render processing
page template and model is rendered
onDestroy() – called to clean up any resources
Template Model Includes
any public Page fields by field name
context – the servlet context path
cssImports – the CSS style imports object
format – the Format object
imports – the PageImports object
jsImports – the JavaScript imports object
messages – the MessagesMap object
path – the path of the Page template
request – the HttpServletRequest object
response – the HttpServletResponse object
session – the SessionMap object
Velocity Directives
#if #elseif #else #end – conditional statement
#foreach – list iterator
#macro – defines Velocity macro
#set – variable declaration
#include – include file directly without parsing
#parse – parse and render the specified template
#stop – stops the execution of template
click.xml File
<?xml version="1.0" encoding="UTF-8"?>
<click-app charset="UTF-8" locale="de">
<pages package="com.mycorp.page"/>
<mode value="debug"/>
</click-app>
Core Controls
ActionButton
ActionLink
Button
Checkbox
Column
FieldSet
Form
HiddenField
ImageSubmit
Label
Option
OptionGroup
PageLink
Panel
PasswordField
Radio
RadioGroup
Reset
Select
Submit
Table
TextArea
TextField
Extras Controls
CayenneForm
CheckList
ColorPicker
CreditCardField
DateField
DoubleField
EmailField
FieldColumn
FormTable
IntegerField
LinkDecorator
ListPanel
LongField
Menu
NumberField
PageSubmit
PickList
PropertySelect
QuerySelect
RegexField
TabbedForm
TabbedPanel
TelephoneField
Click App Modes
production – caching, warn logging
profile – caching, info logging
development – info logging (default)
debug – debug logging
trace – trace logging