public abstract class InstantiateBeanAction extends TableBeanAction
TableBean. Several methods can be overridden to customize the
behavior.CLIENT_TASK_ERROR, CLIENT_TASK_ERROR_KEY, CLIENT_TASK_NOTICE_KEY, CLIENT_TASK_WARNING_KEY, GLOBAL_ERROR_KEY, INFORMATION_ERRORCHOOSABLE_FILTERS_REQUEST_KEY, CHOOSABLE_SYSTEM_TABLES_REQUEST_KEY, CHOOSABLE_VIEWS_REQUEST_KEY, CURRENT_FILTERS_REQUEST_KEY, CURRENT_SYSTEM_TABLE_REQUEST_KEY, CURRENT_VIEW_REQUEST_KEY, DISPLAY_MODE_CURRENT_VIEW_REQUEST_KEY, DISPLAYABLE_CHOOSABLE_FILTERS_REQUEST_KEY, DISPLAYABLE_CHOOSABLE_SYSTEM_TABLES_REQUEST_KEY, DISPLAYABLE_CHOOSABLE_VIEWS_REQUEST_KEY, DISPLAYABLE_CURRENT_FILTERS_REQUEST_KEY, DISPLAYABLE_CURRENT_SYSTEM_TABLE_REQUEST_KEY, DISPLAYABLE_CURRENT_VIEW_REQUEST_KEY, KEY_GENERATOR_SESSION_KEY, TABLE_BEAN_REQUEST_KEY, TABLE_NAME_REQUEST_KEY| Constructor and Description |
|---|
InstantiateBeanAction(TxType type)
Constructor that allows you to specify the requested transaction type for
all requests being processed.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterCreate(javax.servlet.http.HttpServletRequest request,
TableBean<?> table)
This method is called after
createTableInstance(HttpServletRequest) to initialize the table
that just was created. |
protected void |
copyEnv(javax.servlet.http.HttpServletRequest request,
TableBean<?> oldTable,
TableBean<?> newTable)
Copy the environment from the original table but do not overwrite the
existing variables.
|
protected EntryProcessor |
createEntryProcessor(javax.servlet.http.HttpServletRequest request)
Returns the
EntryProcessor that has been configured for the
current table/request. |
protected SelectionBehavior |
createSelectionBehavior(javax.servlet.http.HttpServletRequest request)
Returns the
SelectionBehavior that has been configured for the
current table/request. |
TableBean<?> |
createTable(javax.servlet.http.HttpServletRequest request)
This method should be implemented in subclasses to create a new instance
of a class implementing the TableBean interface.
|
protected TableFactory |
createTableFactory(javax.servlet.http.HttpServletRequest request) |
protected TableBean<?> |
createTableInstance(javax.servlet.http.HttpServletRequest request)
This method is called first inside
createTable(HttpServletRequest) to create the actual
TableBean instance. |
protected com.technia.tvc.structurebrowser.util.TableLinkFactory |
createTableLinkFactory(javax.servlet.http.HttpServletRequest request)
Returns the
TableLinkFactory that has been configured for the
current table/request. |
protected TableRenderer |
createTableRenderer(javax.servlet.http.HttpServletRequest request)
Returns the
TableRenderer that has been configured for the
current table/request. |
protected ViewFactory |
createViewFactory(javax.servlet.http.HttpServletRequest request)
Returns the
ViewFactory that has been configured for the current
table/request. |
protected void |
finishRequest(TableBean<?> table,
javax.servlet.http.HttpServletRequest request) |
abstract boolean |
getAlwaysInstantiate()
Returns whether to always instantiate a
TableBean when this
action executes. |
protected java.lang.Class<?> |
getBeanClass(javax.servlet.http.HttpServletRequest request)
Returns the
TableBean class that should be instantiated. |
protected java.lang.String |
getBeanClassName(javax.servlet.http.HttpServletRequest request)
Returns the
TableBean class name. |
protected boolean |
getCopyEnv(javax.servlet.http.HttpServletRequest request,
boolean defaultValue) |
abstract java.lang.String |
getDefaultBeanClassName()
Returns the default
TableBean class name that should be used
unless another class name was explicitly defined in the request. |
protected java.lang.String |
getDefaultPageConfigName()
Returns the default name of the
PageConfig. |
protected java.lang.String |
getObjectNameFromRequest(javax.servlet.http.HttpServletRequest request)
Returns the name of the
TableBean. |
protected PageConfig |
getPageConfig(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Returns the
PageConfig that should be used. |
abstract java.lang.String |
getRequiredBeanClassName()
Returns the reqired
TableBean class name. |
protected boolean |
isBeanInstantiated(javax.servlet.http.HttpServletRequest request)
Returns true if a new
TableBean was instantiated for this
request. |
protected void |
setBeanInstantiated(javax.servlet.http.HttpServletRequest request,
boolean instantiated)
Sets whether a
TableBean has been instantiated in this request. |
protected boolean |
setSystemTableAndFilters(javax.servlet.http.HttpServletRequest request) |
protected boolean |
setView(javax.servlet.http.HttpServletRequest request) |
TableBean<?> |
updateTable(javax.servlet.http.HttpServletRequest request,
TableBean<?> table)
Updates the table for the current request.
|
afterPerform, beforePerform, createEnvironment, discardEnv, discardTable, ensureContextMenu, ensureMenuBar, execute, generateKey, getChoosableViewNamesParameter, getEnv, getGeneratedKey, getMonitor, getOriginalTable, getParameter, getTable, getTable, getViewNameParameter, handleErrors, insertCategoryMenu, loadContextMenu, loadMenuBar, perform, replaceRequest, saveEnv, saveTable, storePageConfig, storeRequestAttributes, updateexecuteImpl, getOriginContext, handleClientTasks, handleException, handleLogin, handleTransactionEndFailure, ignoreClientTasksaddError, addError, addErrors, addGlobalError, addGlobalError, addInformationError, asActionError, asActionErrors, copy, debugRequest, execute, findErrorForward, findForwardOrTargetPage, perform, perform, saveError, saveError, saveGlobalError, saveGlobalError, saveInformationError, setLocaleaddErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setServletpublic InstantiateBeanAction(TxType type)
type - The transaction type.protected void afterCreate(javax.servlet.http.HttpServletRequest request,
TableBean<?> table)
throws TVCException
createTableInstance(HttpServletRequest) to initialize the table
that just was created.request - The request.table - The table that was created.TVCException - If a serious error occurs.protected void copyEnv(javax.servlet.http.HttpServletRequest request,
TableBean<?> oldTable,
TableBean<?> newTable)
TableBeanActioncopyEnv in class TableBeanActionrequest - The current requestoldTable - The old table to copy the env variables fromnewTable - The new table to copy the env veriables toprotected EntryProcessor createEntryProcessor(javax.servlet.http.HttpServletRequest request) throws TVCException
EntryProcessor that has been configured for the
current table/request.request - The current request.EntryProcessor.TVCException - If a serious error occurs.protected SelectionBehavior createSelectionBehavior(javax.servlet.http.HttpServletRequest request) throws TVCException
SelectionBehavior that has been configured for the
current table/request.request - The current request.SelectionBehavior.TVCException - If a serious error occurs.public TableBean<?> createTable(javax.servlet.http.HttpServletRequest request) throws TVCException
TableBeanActioncreateTable in class TableBeanActionTVCExceptionprotected TableFactory createTableFactory(javax.servlet.http.HttpServletRequest request) throws TVCException
request - TableFactory.TVCExceptionprotected TableBean<?> createTableInstance(javax.servlet.http.HttpServletRequest request) throws java.lang.Throwable
createTable(HttpServletRequest) to create the actual
TableBean instance.protected com.technia.tvc.structurebrowser.util.TableLinkFactory createTableLinkFactory(javax.servlet.http.HttpServletRequest request)
throws TVCException
TableLinkFactory that has been configured for the
current table/request.request - The current request.TableLinkFactory.TVCException - If a serious error occurs.protected TableRenderer createTableRenderer(javax.servlet.http.HttpServletRequest request) throws TVCException
TableRenderer that has been configured for the
current table/request.request - The current request.TableRenderer.TVCException - If a serious error occurs.protected ViewFactory createViewFactory(javax.servlet.http.HttpServletRequest request) throws TVCException
ViewFactory that has been configured for the current
table/request.request - The current request.ViewFactory.TVCException - If a serious error occurs.protected void finishRequest(TableBean<?> table, javax.servlet.http.HttpServletRequest request) throws TVCException
finishRequest in class TableBeanActiontable - The current table.request - The current request.TVCException - If unable to finish the request processing, such as
validating the table.public abstract boolean getAlwaysInstantiate()
TableBean when this
action executes. If not, any existing TableBean that was found will be
reused.protected java.lang.Class<?> getBeanClass(javax.servlet.http.HttpServletRequest request)
TableBean class that should be instantiated.request - The request.TableBean class that should be instantiated.protected java.lang.String getBeanClassName(javax.servlet.http.HttpServletRequest request)
TableBean class name.request - The current request being processed.TableBean class name.protected boolean getCopyEnv(javax.servlet.http.HttpServletRequest request,
boolean defaultValue)
public abstract java.lang.String getDefaultBeanClassName()
TableBean class name that should be used
unless another class name was explicitly defined in the request.TableBean class name.protected java.lang.String getDefaultPageConfigName()
PageConfig. This name will be
used unless a another name was explicitly configured.PageConfig.protected java.lang.String getObjectNameFromRequest(javax.servlet.http.HttpServletRequest request)
TableBeanActionTableBean.getObjectNameFromRequest in class TableBeanActionprotected PageConfig getPageConfig(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws TVCException
TableBeanActionPageConfig that should be used.getPageConfig in class TableBeanActionrequest - The request.response - The response.PageConfig that was loaded.TVCException - If loading the PageConfig failed.public abstract java.lang.String getRequiredBeanClassName()
TableBean class name. If a custom class name
was explicitly defined in the request that class has to be assignable to
the class returned by this method.TableBean class name.protected boolean isBeanInstantiated(javax.servlet.http.HttpServletRequest request)
TableBean was instantiated for this
request.request - The request.TableBean was instantiated.protected void setBeanInstantiated(javax.servlet.http.HttpServletRequest request,
boolean instantiated)
TableBean has been instantiated in this request.request - The request.instantiated - True if instantiated, false if not.protected boolean setSystemTableAndFilters(javax.servlet.http.HttpServletRequest request)
setSystemTableAndFilters in class TableBeanActionrequest - The current request.protected boolean setView(javax.servlet.http.HttpServletRequest request)
setView in class TableBeanActionrequest - The current request.public TableBean<?> updateTable(javax.servlet.http.HttpServletRequest request, TableBean<?> table) throws TVCException
TableBeanActionThis implementation will make sure the current table's view, system table and filters are valid.
updateTable in class TableBeanActionTVCExceptionCopyright ? Technia AB. All Rights Reserved.