|
||||||||||
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.internal.Enclosure
public class Enclosure
An Enclosure are automatically created by Wicket. Do not create it yourself. An Enclosure container is created if <wicket:enclosure> is found in the markup. It is meant to solve the following situation. Instead of
<table wicket:id="label-container" class="notify"><tr><td><span wicket:id="label">[[notification]]</span></td></tr></table> WebMarkupContainer container=new WebMarkupContainer("label-container") { public boolean isVisible() { return hasNotification(); } }; add(container); container.add(new Label("label", notificationModel));with Enclosure you are able to do the following:
<wicket:enclosure> <table class="notify"><tr><td><span wicket:id="label">[[notification]]</span></td></tr></table> </wicket:enclosure> add(new Label("label", notificationModel)) { public boolean isVisible() { return hasNotification(); } }
EnclosureResolver
,
EnclosureHandler
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.wicket.Component |
---|
Component.ComponentModelChange, Component.EnabledChange, Component.IVisitor<T extends Component>, Component.VisibilityChange |
Field Summary | |
---|---|
protected CharSequence |
childId
Id of the child component that will control visibility of the enclosure |
Fields inherited from class org.apache.wicket.Component |
---|
ENABLE, FLAG_CONFIGURED, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED6, FLAG_RESERVED7, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER |
Constructor Summary | |
---|---|
Enclosure(String id,
CharSequence childId)
Construct. |
Method Summary | |
---|---|
protected MarkupContainer |
getEnclosureParent()
Get the real parent container |
boolean |
isTransparentResolver()
Some MarkupContainers (e.g. |
protected void |
onComponentTagBody(MarkupStream markupStream,
ComponentTag enclosureOpenTag)
Handle the container's body. |
protected void |
onDetach()
Called to allow a component to detach resources after use. |
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer |
---|
getMarkupType, getWebPage, getWebRequest |
Methods inherited from class org.apache.wicket.MarkupContainer |
---|
add, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, iterator, iterator, newMarkupResourceStream, onAfterRenderChildren, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, renderNext, replace, setDefaultModel, setMarkupStream, size, swap, toString, toString, visitChildren, visitChildren |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final CharSequence childId
Constructor Detail |
---|
public Enclosure(String id, CharSequence childId)
id
- childId
- Method Detail |
---|
public boolean isTransparentResolver()
MarkupContainer
isTransparentResolver
in class MarkupContainer
MarkupContainer.isTransparentResolver()
protected MarkupContainer getEnclosureParent()
protected void onComponentTagBody(MarkupStream markupStream, ComponentTag enclosureOpenTag)
MarkupContainer
onComponentTagBody
in class MarkupContainer
markupStream
- The markup streamenclosureOpenTag
- The open tag for the bodyMarkupContainer.onComponentTagBody(org.apache.wicket.markup.MarkupStream,
org.apache.wicket.markup.ComponentTag)
protected void onDetach()
Component
onDetach
in class Component
Component.onDetach()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |