public abstract class FormTablePage extends BorderPage
getDataObjectClass()
- to define the DataObject class to editgetDataObject(Object)
- to look up the DataObject for the given idgetRowList()
- to provide the table the list of DataObject to displayModifier and Type | Field and Description |
---|---|
protected ActionLink |
editLink |
protected org.apache.click.extras.cayenne.CayenneForm |
form |
protected ActionLink |
removeLink |
protected Table |
table |
controls, format, forward, headElements, headers, includeControlHeadElements, messages, model, PAGE_ACTION, PAGE_MESSAGES, pageImports, path, redirect, stateful, template
Constructor and Description |
---|
FormTablePage()
Create a FormTablePage instance and initialize the form and table
properties.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the form dataObject and any errors it might have.
|
org.apache.click.extras.cayenne.CayenneForm |
createForm()
Return a new CayenneForm instance.
|
void |
deleteDataObject(org.apache.cayenne.DataObject dataObject)
Delete the given DataObject.
|
abstract org.apache.cayenne.DataObject |
getDataObject(Object id)
Return the DataObject for the given id.
|
abstract Class |
getDataObjectClass()
Return the DataObject class to edit and display.
|
int |
getMaxTableSize()
Return the maximum number of rows to display in the table.
|
abstract List |
getRowList()
Return the list of DataObjects to display in the table.
|
boolean |
onCancelClick()
The cancel event handler.
|
boolean |
onEditClick()
The edit event handler.
|
void |
onInit()
Complete the initialization of the form and table controls.
|
boolean |
onRemoveClick()
The remove event handler.
|
void |
onRender() |
boolean |
onSaveClick()
The save event handler.
|
boolean |
onSecurityCheck()
Perform a form submission check to ensure the form was not double posted.
|
void |
saveDataObject(org.apache.cayenne.DataObject dataObject)
Save the given DataObject.
|
getTemplate, onDestroy
addControl, addModel, getContentType, getContext, getControls, getFormat, getForward, getHeadElements, getHeaders, getHtmlImports, getMessage, getMessage, getMessages, getModel, getPageImports, getPath, getRedirect, hasControls, hasHeaders, isIncludeControlHeadElements, isStateful, onGet, onPost, removeControl, setFormat, setForward, setForward, setForward, setHeader, setHeaders, setIncludeControlHeadElements, setPageImports, setPath, setRedirect, setRedirect, setRedirect, setRedirect, setStateful, setTemplate
protected org.apache.click.extras.cayenne.CayenneForm form
protected Table table
protected ActionLink editLink
protected ActionLink removeLink
public FormTablePage()
public boolean onSecurityCheck()
onSecurityCheck
in class Page
Page.onSecurityCheck()
public void onInit()
onInit
in class BorderPage
Page.onInit()
public boolean onSaveClick()
public boolean onCancelClick()
public boolean onEditClick()
public boolean onRemoveClick()
public void clear()
public void onRender()
onRender
in class Page
Page.onRender()
public abstract org.apache.cayenne.DataObject getDataObject(Object id)
id
- the DataObject identifierpublic abstract Class getDataObjectClass()
public abstract List getRowList()
public org.apache.click.extras.cayenne.CayenneForm createForm()
public void saveDataObject(org.apache.cayenne.DataObject dataObject)
dataObject
- the DataObject to savepublic void deleteDataObject(org.apache.cayenne.DataObject dataObject)
dataObject
- the DataObject to deletepublic int getMaxTableSize()