|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.markup.html.WebMarkupContainer
org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup
org.apache.wicket.markup.html.panel.Panel
org.apache.wicket.velocity.markup.html.VelocityPanel
public abstract class VelocityPanel
Panel that displays the result of rendering a Velocity template. The template itself can be any
IStringResourceStream
implementation, of which there are a number of convenient implementations in the wicket.util
package. The model can be any normal
Map,
which will be used to create the
VelocityContext.
Note: Be sure to properly initialize the Velocity engine before using
VelocityPanel.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.wicket.Component |
|---|
org.apache.wicket.Component.ComponentModelChange, org.apache.wicket.Component.EnabledChange, org.apache.wicket.Component.IVisitor, org.apache.wicket.Component.VisibilityChange |
| Field Summary |
|---|
| Fields inherited from class org.apache.wicket.Component |
|---|
ENABLE, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED6, FLAG_RESERVED7, FLAG_RESERVED8, PATH_SEPARATOR, RENDER |
| Constructor Summary | |
|---|---|
VelocityPanel(java.lang.String id,
org.apache.wicket.model.IModel model)
Construct. |
|
| Method Summary | |
|---|---|
protected boolean |
escapeHtml()
Gets whether to escape HTML characters. |
static VelocityPanel |
forTemplateResource(java.lang.String id,
org.apache.wicket.model.IModel model,
org.apache.wicket.util.resource.IStringResourceStream templateResource)
Convenience factory method to create a VelocityPanel instance with a given
template resource. |
protected abstract org.apache.wicket.util.resource.IStringResourceStream |
getTemplateResource()
Returns the template resource passed to the constructor. |
protected void |
onComponentTagBody(org.apache.wicket.markup.MarkupStream markupStream,
org.apache.wicket.markup.ComponentTag openTag)
|
protected boolean |
parseGeneratedMarkup()
Gets whether to parse the resulting Wicket markup. |
protected boolean |
throwVelocityExceptions()
Whether any velocity exception should be trapped and displayed on the panel (false) or thrown up to be handled by the exception mechanism of Wicket (true). |
| Methods inherited from class org.apache.wicket.markup.html.panel.Panel |
|---|
onComponentTag, renderHead |
| Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup |
|---|
newHeaderPartContainer, renderHeadFromAssociatedMarkupFile |
| Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer |
|---|
getMarkupType, getWebPage |
| Methods inherited from class org.apache.wicket.MarkupContainer |
|---|
add, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, replace, setMarkupStream, setModel, size, toString, toString, visitChildren, visitChildren |
| Methods inherited from class org.apache.wicket.Component |
|---|
add, addStateChange, afterRender, beforeRender, callOnBeforeRenderIfNotVisible, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, continueToOriginalDestination, debug, detach, detachBehaviors, detachModel, detachModels, error, exceptionMessage, fatal, findPage, findParent, findParentWithAssociatedMarkup, getApplication, getBehaviors, getBehaviors, getClassRelativePath, getComponentBorder, getConverter, getConverter, getEscapeModelStrings, getFeedbackMessage, getFlag, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkupAttributes, getMarkupId, getMetaData, getModel, getModelComparator, getModelObject, getModelObjectAsString, getModelObjectAsString, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageFactory, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalAttach, internalDetach, internalOnAttach, internalOnDetach, internalOnModelChanged, isActionAuthorized, isAncestorOf, isAttached, isBehaviorAccepted, isEnableAllowed, isEnabled, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisible, isVisibleInHierarchy, locateMarkupStream, markAttached, markRendering, modelChanged, modelChanging, newPage, newPage, onAfterRender, onAttach, onBeforeRender, onBeginRequest, onDetach, onEndRequest, onModelChanged, onModelChanging, prepareForRender, redirectToInterceptPage, remove, remove, render, render, renderComponent, renderComponent, renderComponentTag, rendered, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, setAuto, setComponentBorder, setEnabled, setEscapeModelStrings, setFlag, setFlag, setIgnoreAttributeModifier, setMarkupId, setMetaData, setModelObject, setOutputMarkupId, setOutputMarkupPlaceholderTag, setRedirect, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisible, urlFor, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, warn, wrap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public VelocityPanel(java.lang.String id,
org.apache.wicket.model.IModel model)
id - Component idtemplateResource - The velocity template as a string resourcemodel - Model with variables that can be substituted by Velocity. Must return a
Map.| Method Detail |
|---|
public static VelocityPanel forTemplateResource(java.lang.String id,
org.apache.wicket.model.IModel model,
org.apache.wicket.util.resource.IStringResourceStream templateResource)
VelocityPanel instance with a given
template resource.
id - Component idmodel - optional model for variable substituation.templateResource - The template resource
protected boolean escapeHtml()
protected abstract org.apache.wicket.util.resource.IStringResourceStream getTemplateResource()
protected void onComponentTagBody(org.apache.wicket.markup.MarkupStream markupStream,
org.apache.wicket.markup.ComponentTag openTag)
onComponentTagBody in class org.apache.wicket.markup.html.panel.PanelPanel.onComponentTagBody(org.apache.wicket.markup.MarkupStream,
org.apache.wicket.markup.ComponentTag)protected boolean parseGeneratedMarkup()
protected boolean throwVelocityExceptions()
Trapping these exceptions without disturbing the other components is especially usefull in CMS like applications, where 'normal' users are allowed to do basic scripting. On errors, you want them to be able to have them correct them while the rest of the application keeps on working.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||