public abstract class TemplatePage
extends org.apache.wicket.markup.html.WebPage
implements org.apache.wicket.ajax.IAjaxIndicatorAware, org.apache.wicket.markup.html.IHeaderContributor
| Modifier and Type | Field and Description |
|---|---|
static String |
PATTERN_ENUM_VALUE_LABEL
Pattern: enum value label (simpleClassName.valueString)
|
| Modifier | Constructor and Description |
|---|---|
protected |
TemplatePage(Class<? extends TemplatePage> page)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addValidationErrors(Collection<String> violations)
Convert validation errors (violations) into readable message, and display them
|
void |
addValidationErrors(List<Pair<String,String>> violations)
Convert validation errors (violations) into readable message, and display them
|
<E extends Enum<?>> |
enumValueMessage(E enumValue)
Retrieve an enum value message (class.value).
|
void |
errorCurrentPage(Class<? extends TemplatePage> pageClass,
String action,
Exception exception)
Display an error message (pageClass.action.Exception) on the current page
|
void |
errorCurrentPage(org.apache.wicket.Component component)
Display an error message (componentId.KO) on the current page
|
void |
errorCurrentPage(String action,
Exception exception)
Display an error message (resource.action.Exception) on the current page
|
String |
getAjaxIndicatorMarkupId() |
protected String |
getResource()
resource getter
|
AuthSession |
getSession() |
org.apache.wicket.model.IModel<String> |
getStringModel(String key,
Object... parameters)
Translation method, similar to
Component.getString(String), but return a model instead of a static String to fix
page reload in case of locale change. |
void |
refreshFeedbackPage(org.apache.wicket.ajax.AjaxRequestTarget target)
Refresh feedback page and scroll up to the anchor if any feedback message
|
void |
renderHead(org.apache.wicket.markup.head.IHeaderResponse response) |
void |
successCurrentPage(Class<? extends TemplatePage> pageClass,
String action)
Display a success message on the current page (pageClass.action.OK)
|
void |
successCurrentPage(String action)
Display a success message on the current page (resource.action.OK)
|
void |
successNextPage(Class<? extends TemplatePage> pageClass,
String action)
Display a success message on the next page (pageClass.action.OK)
|
void |
successNextPage(String action)
Display a success message on the next page (resource.action.OK)
|
configureResponse, dirty, getMarkupType, homePageLink, onAfterRender, onRender, renderXmlDecl, setHeaderscomponentChanged, componentRendered, detachModels, dirty, endComponentRender, getAutoIndex, getId, getPageClass, getPageId, getPageParameters, getPageReference, getRenderCount, getSizeInBytes, getStatelessHint, hierarchyAsString, internalOnModelChanged, internalPrepareForRender, isBookmarkable, isErrorPage, isPageStateless, onBeforeRender, onDetach, onInitialize, onRedirect, renderPage, setFreezePageId, setNumericId, setStatelessHint, setWasCreatedBookmarkable, startComponentRender, toString, wasCreatedBookmarkable, wasRenderedadd, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onComponentTagBody, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, visitChildren, visitChildren, visitChildren, visitChildrenadd, addStateChange, afterRender, beforeRender, canCallListenerInterface, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, debug, detach, detachModel, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalRenderComponent, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onComponentTag, onConfigure, onEvent, onModelChanged, onModelChanging, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final String PATTERN_ENUM_VALUE_LABEL
protected TemplatePage(Class<? extends TemplatePage> page)
page - Page (permet de construire la "resource" qui servira d'identifiant à la page)public void renderHead(org.apache.wicket.markup.head.IHeaderResponse response)
renderHead in interface org.apache.wicket.markup.html.IHeaderContributorrenderHead in class org.apache.wicket.Componentpublic final void addValidationErrors(Collection<String> violations)
violations - Violationspublic final void addValidationErrors(List<Pair<String,String>> violations)
violations - Violationspublic final void errorCurrentPage(Class<? extends TemplatePage> pageClass, String action, Exception exception)
pageClass - Page classaction - Actionexception - Exceptionpublic final void errorCurrentPage(org.apache.wicket.Component component)
component - Componentpublic final void errorCurrentPage(String action, Exception exception)
action - Actionexception - Exceptionpublic final String getAjaxIndicatorMarkupId()
getAjaxIndicatorMarkupId in interface org.apache.wicket.ajax.IAjaxIndicatorAwareprotected final String getResource()
public final AuthSession getSession()
getSession in class org.apache.wicket.Componentpublic final void refreshFeedbackPage(org.apache.wicket.ajax.AjaxRequestTarget target)
target - Ajax targetpublic final void successCurrentPage(Class<? extends TemplatePage> pageClass, String action)
pageClass - Page classaction - Actionpublic final void successCurrentPage(String action)
action - Actionpublic final void successNextPage(Class<? extends TemplatePage> pageClass, String action)
pageClass - Page classaction - Actionpublic final void successNextPage(String action)
action - Actionpublic final <E extends Enum<?>> String enumValueMessage(E enumValue)
E - Enum typeenumValue - Enum value, null is the enumValue is nullpublic org.apache.wicket.model.IModel<String> getStringModel(String key, Object... parameters)
Component.getString(String), but return a model instead of a static String to fix
page reload in case of locale change.key - key to translateparameters - translation parameterkeyCopyright © 2009–2014 IRD. All rights reserved.