wicket.markup.html.border
Class Border
java.lang.Object
wicket.Component
wicket.MarkupContainer
wicket.markup.html.WebMarkupContainer
wicket.markup.html.border.Border
- All Implemented Interfaces:
- IComponentResolver, java.io.Serializable
- Direct Known Subclasses:
- BoxBorder, FormComponentFeedbackBorder
- public abstract class Border
- extends WebMarkupContainer
- implements IComponentResolver
A border component has associated markup which is drawn and determines
placement of any markup and/or components nested within the border component.
The portion of the border's associated markup file which is to be used in
rendering the border is denoted by a <wicket:border> tag. The children
of the border component instance are then inserted into this markup,
replacing the first <wicket:body> tag in the border's associated
markup.
For example, if a border's associated markup looked like this:
<html>
<body>
<wicket:border>
First <wicket:body/> Last
</wicket:border>
</body>
</html>
And the border was used on a page like this:
<html>
<body>
<span wicket:id = "myBorder">
Middle
</span>
</body>
</html>
Then the resulting HTML would look like this:
<html>
<body>
First Middle Last
</body>
</html>
In other words, the body of the myBorder component is substituted into the
border's associated markup at the position indicated by the
<wicket:body> tag.
Regarding <wicket:body/> you have two options. Either use
<wicket:body/> (open-close tag) which will automatically be expanded
to <wicket:body>body content</wicket:body> or use
<wicket:body>preview region</wicket:body> in your border's
markup. The preview region (everything in between the open and close tag)
will automatically be removed.
- Author:
- Jonathan Locke
- See Also:
- Serialized Form
| Methods inherited from class wicket.MarkupContainer |
add, autoAdd, contains, findMarkupStream, get, getMarkupStream, internalAdd, internalBeginRequest, internalEndRequest, iterator, remove, removeAll, renderAssociatedMarkup, renderComponentTagBody, replace, setMarkupStream, setModel, size, toString, toString, visitChildren, visitChildren |
| Methods inherited from class wicket.Component |
add, addStateChange, checkComponentTag, checkComponentTagAttribute, debug, detachModel, error, exceptionMessage, fatal, findPage, findParent, findParentWithAssociatedMarkup, getApplication, getApplicationPages, getApplicationSettings, getClassRelativePath, getConverter, getEscapeModelStrings, getFeedbackMessage, getFlag, getId, getLocale, getLocalizer, getModel, getModelObject, getModelObjectAsString, getPage, getPageFactory, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getResource, getResponse, getSession, getString, getString, getString, getStyle, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnBeginRequest, internalOnEndRequest, internalOnModelChanged, internalOnModelChanging, isAncestorOf, isVersioned, isVisible, isVisibleInHierarchy, modelChanged, modelChanging, newPage, newPage, onBeginRequest, onComponentTag, onEndRequest, onModelChanged, onModelChanging, onSessionAttach, redirectTo, remove, render, renderComponent, renderComponentTag, rendered, replaceComponentTagBody, sameRootModel, sameRootModel, setFlag, setModelObject, setRedirect, setRenderBodyOnly, setResponsePage, setShouldEscapeModelStrings, setVersioned, setVisible, urlFor, visitParents, warn |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Border
public Border(java.lang.String id)
- See Also:
Component.Component(String)
Border
public Border(java.lang.String id,
IModel model)
- See Also:
Component.Component(String, IModel)
resolve
public boolean resolve(MarkupContainer container,
MarkupStream markupStream,
ComponentTag tag)
- Border makes use of a <wicket:body> tag to indentify the position
to insert within the border's body. As <wicket:body> is a special
tag and MarkupContainer is not able to handle it, we do that here.
You have two options. Either use <wicket:body/> (open-close tag)
which will automatically be expanded to
<wicket:body>body content</wicket:body> or use
<wicket:body>preview region</wicket:body> in your border's
markup. The preview region (everything in between the open and close tag)
will automatically be removed.
- Specified by:
resolve in interface IComponentResolver
- Parameters:
container - The container parsing its markupmarkupStream - The current markupStreamtag - The current component tag while parsing the markup
- Returns:
- True if componentId was handled by the resolver, false otherwise.
- See Also:
IComponentResolver.resolve(MarkupContainer, MarkupStream, ComponentTag)
onComponentTagBody
protected final void onComponentTagBody(MarkupStream markupStream,
ComponentTag openTag)
- Description copied from class:
MarkupContainer
- Handle the container's body. If your override of this method does not
advance the markup stream to the close tag for the openTag, a runtime
exception will be thrown by the framework.
- Overrides:
onComponentTagBody in class MarkupContainer
- Parameters:
markupStream - The markup streamopenTag - The open tag for the body- See Also:
Component.onComponentTagBody(wicket.markup.MarkupStream,
wicket.markup.ComponentTag)
Copyright © 2004-2005 Wicket developers. All Rights Reserved.