|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wicket.Component
public abstract class Component
Component serves as the highest level abstract base class for all components.
isAncestorOf(Component)
method returns
true if this Component is an ancestor of the given Component.
RequestCycle
which is accessible via
getRequestCycle()
. The convenience methods
getRequest()
, getResponse()
and
getSession()
provide easy access to the contents of this
container.
IFormSubmitListener.onFormSubmitted()
method
implemented by the Form class is really a private implementation detail of
the Form class that is not designed to be overridden (although unfortunately,
it must be public since all interface methods in Java must be public).
Instead, Form subclasses should override user-oriented methods such as
onValidate(), onSubmit() and onError() (although only the latter two are
likely to be overridden in practice).
onBeginRequest()
method is
called.
render()
, which calls subclass implementation code
contained in onRender()
. Once this phase begins, a
Component becomes immutable. Attempts to alter the Component will result in a
WicketRuntimeException.
onEndRequest()
method is
called.
setModel(IModel model)
and retrieved via
getModel()
, to render a response in an appropriate markup
language, such as HTML. In addition, form components know how to update their
models based on request information. Since the IModel interface is a wrapper
around an actual model object, a convenience method
getModelObject()
is provided to retrieve the model Object
from its IModel wrapper. A further convenience method,
getModelObjectAsString()
, is provided for the very common
operation of converting the wrapped model Object to a String.
getPage()
. If the Component is not attached to
a Page, an IllegalStateException will be thrown. An equivalent method,
findPage()
is available for special circumstances where it
might be desirable to get a null reference back instead.
getLocalizer()
. The convenience methods
getString(String key)
and
getString(String key, IModel model)
wrap the identical
methods on the Application Localizer for easy access in Components.
getStyle()
, which is equivalent to
getSession().getStyle(). Styles are intended to give a particular look to a
Component or Resource that is independent of its Locale. For example, a style
might be a set of resources, including images and markup files, which gives
the design look of "ocean" to the user. If the Session's style is set to
"ocean" and these resources are given names suffixed with "_ocean", Wicket's
resource management logic will prefer these resources to other resources,
such as default resources, which are not as good of a match.
AttributeModifier
s to any component if you need to programmatically
manipulate attributes of the markup tag to which a Component is attached.
debug(String)
,
info(String)
, warn(String)
,
error(String)
and fatal(String)
methods
associate feedback messages with a Component. It is generally not necessary
to use these methods directly since Wicket validators automatically register
feedback messages on Components. Any feedback message for a given Component
can be retrieved with getFeedbackMessage()
.
getPageFactory()
method,
returning your own implementation of IPageFactory
.
setVersioned(boolean)
method. The
versioning participation of a given Component can be retrieved with
isVersioned()
.
Nested Class Summary | |
---|---|
class |
Component.ComponentModelChange
Change record of a model. |
protected static class |
Component.EnabledChange
A enabled change operation. |
static interface |
Component.IVisitor
Generic component visitor interface for component traversals. |
protected static class |
Component.VisibilityChange
A visibility change operation. |
Field Summary | |
---|---|
static Action |
ENABLE
Action used with IAuthorizationStrategy to determine whether a component is allowed to be enabled. |
protected static int |
FLAG_RESERVED1
Reserved subclass-definable flag bit |
protected static int |
FLAG_RESERVED2
Reserved subclass-definable flag bit |
protected static int |
FLAG_RESERVED3
Reserved subclass-definable flag bit |
protected static int |
FLAG_RESERVED4
Reserved subclass-definable flag bit |
protected static int |
FLAG_RESERVED5
Reserved subclass-definable flag bit |
protected static int |
FLAG_RESERVED6
Reserved subclass-definable flag bit |
protected static int |
FLAG_RESERVED7
Reserved subclass-definable flag bit |
protected static int |
FLAG_RESERVED8
Reserved subclass-definable flag bit |
static char |
PATH_SEPARATOR
Separator for component paths |
static Action |
RENDER
Action used with IAuthorizationStrategy to determine whether a component and its children are allowed to be rendered. |
Constructor Summary | |
---|---|
Component(java.lang.String id)
Constructor. |
|
Component(java.lang.String id,
IModel model)
Constructor. |
Method Summary | |
---|---|
Component |
add(IBehavior behavior)
Adds an behavior modifier to the component. |
protected void |
addStateChange(Change change)
Adds state change to page. |
protected void |
checkComponentTag(ComponentTag tag,
java.lang.String name)
Checks whether the given type has the expected name. |
protected void |
checkComponentTagAttribute(ComponentTag tag,
java.lang.String key,
java.lang.String value)
Checks that a given tag has a required attribute value. |
boolean |
continueToOriginalDestination()
Redirects to any intercept page previously specified by a call to redirectToInterceptPage. |
void |
debug(java.lang.String message)
Registers a debug feedback message for this component |
void |
detachBehaviors()
THIS IS WICKET INTERNAL ONLY. |
protected void |
detachModel()
Detaches the model for this component if it is detachable. |
void |
detachModels()
Detaches all models |
void |
error(java.lang.String message)
Registers an error feedback message for this component |
protected java.lang.String |
exceptionMessage(java.lang.String message)
Prefixes an exception message with useful information about this. |
void |
fatal(java.lang.String message)
Registers an fatal error feedback message for this component |
protected MarkupStream |
findMarkupStream()
Finds the markup stream for this component. |
protected Page |
findPage()
If this Component is a Page, returns self. |
MarkupContainer |
findParent(java.lang.Class c)
Finds the first container parent of this component of the given class. |
MarkupContainer |
findParentWithAssociatedMarkup()
|
Application |
getApplication()
Gets interface to application that this component is a part of. |
IApplicationSettings |
getApplicationPages()
Deprecated. |
Settings |
getApplicationSettings()
Deprecated. will be removed after 1.2 |
java.util.List |
getBehaviors()
Gets the currently coupled IBehavior s as a unmodifiable list. |
protected java.util.List |
getBehaviors(java.lang.Class type)
Gets the subset of the currently coupled IBehavior s that are of
the provided type as a unmodifiable list or null if there are no
behaviors attached. |
java.lang.String |
getClassRelativePath()
|
IConverter |
getConverter()
Gets the converter that should be used by this component. |
boolean |
getEscapeModelStrings()
Gets whether model strings should be escaped. |
FeedbackMessage |
getFeedbackMessage()
|
protected boolean |
getFlag(int flag)
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
protected boolean |
getFlag(short flag)
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
java.lang.String |
getId()
Gets the id of this component. |
java.util.Locale |
getLocale()
Gets the locale for the session holding this component. |
Localizer |
getLocalizer()
Convenience method to provide easy access to the localizer object within any component. |
ValueMap |
getMarkupAttributes()
THIS IS WICKET INTERNAL ONLY. |
java.lang.String |
getMarkupId()
Retrieves id by which this component is represented within the markup. |
java.io.Serializable |
getMetaData(MetaDataKey key)
Gets metadata for this component using the given key. |
IModel |
getModel()
Gets the model. |
protected IModelComparator |
getModelComparator()
Gets the value defaultModelComparator. |
java.lang.Object |
getModelObject()
Gets the backing model object; this is shorthand for getModel().getObject(). |
java.lang.String |
getModelObjectAsString()
Gets a model object as a string. |
boolean |
getOutputMarkupId()
Gets whether or not component will output id attribute into the markup. |
Page |
getPage()
Gets the page holding this component. |
IPageFactory |
getPageFactory()
|
java.lang.String |
getPageRelativePath()
Gets the path to this component relative to the page it is in. |
MarkupContainer |
getParent()
Gets any parent container, or null if there is none. |
java.lang.String |
getPath()
Gets this component's path. |
boolean |
getRenderBodyOnly()
If false the component's tag will be printed as well as its body (which is default). |
Request |
getRequest()
|
RequestCycle |
getRequestCycle()
Gets the active request cycle for this component |
Response |
getResponse()
|
Session |
getSession()
Gets the current Session object. |
long |
getSizeInBytes()
|
java.lang.String |
getString(java.lang.String key)
|
java.lang.String |
getString(java.lang.String key,
IModel model)
|
java.lang.String |
getString(java.lang.String key,
IModel model,
java.lang.String defaultValue)
|
java.lang.String |
getStyle()
Gets the style of this component (see Session ). |
java.lang.String |
getVariation()
Gets the variation string of this component that will be used to look up markup for this component. |
boolean |
hasErrorMessage()
|
boolean |
hasFeedbackMessage()
|
void |
info(java.lang.String message)
Registers an informational feedback message for this component |
protected IModel |
initModel()
Called when a null model is about to be retrieved in order to allow a subclass to provide an initial model. |
protected void |
internalAttach()
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
protected void |
internalDetach()
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
protected void |
internalOnAttach()
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
protected void |
internalOnDetach()
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
protected void |
internalOnModelChanged()
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
boolean |
isActionAuthorized(Action action)
Authorizes an action for a component. |
boolean |
isAncestorOf(Component component)
Deprecated. use getParent().contains(component, false) |
protected boolean |
isBehaviorAccepted(IBehavior behavior)
Components are allowed to reject behavior modifiers. |
boolean |
isEnableAllowed()
|
boolean |
isEnabled()
Gets whether this component is enabled. |
protected boolean |
isHeadRendered()
Returns whether the head has already been rendered. |
protected boolean |
isIgnoreAttributeModifier()
If true, all attribute modifiers will be ignored |
protected boolean |
isRenderAllowed()
|
boolean |
isVersioned()
|
boolean |
isVisible()
Gets whether this component and any children are visible. |
boolean |
isVisibleInHierarchy()
Checks if the component itself and all its parents are visible. |
void |
modelChanged()
Called to indicate that the model content for this component has been changed |
void |
modelChanging()
Called to indicate that the model content for this component is about to change |
Page |
newPage(java.lang.Class c)
Creates a new page using the component's page factory |
Page |
newPage(java.lang.Class c,
PageParameters parameters)
Creates a new page using the component's page factory |
protected void |
onAfterRender()
Called just after a component is rendered. |
protected void |
onAttach()
Called to allow a component to attach resources for use. |
protected void |
onBeforeRender()
Called just before a component is rendered. |
protected void |
onBeginRequest()
Deprecated. use onAttach() instead. This method will be removed in 1.3 |
protected void |
onComponentTag(ComponentTag tag)
Processes the component tag. |
protected void |
onComponentTagBody(MarkupStream markupStream,
ComponentTag openTag)
Processes the body. |
protected void |
onDetach()
Called to allow a component to detach resources after use. |
protected void |
onEndRequest()
Deprecated. This method will be removed in Wicket 1.3. It will PROBABLY be replaced by onEndRender or afterRender with different semantics. Instead of calling it after a request is done like is currently the case, that new method will be called after this component is rendered, which is a more precise scope. This semantical change shouldn't have a noticable impact on it's use I believe. |
protected void |
onModelChanged()
Called anytime a model is changed after the change has occurred |
protected void |
onModelChanging()
Called anytime a model is changed, but before the change actually occurs |
protected void |
onRender()
Deprecated. since 1.2 Please implement onRender(MarkupStream) instead |
protected abstract void |
onRender(MarkupStream markupStream)
Implementation that renders this component. |
void |
redirectToInterceptPage(Page page)
Redirects browser to an intermediate page such as a sign-in page. |
void |
remove()
Removes this component from its parent. |
void |
render()
Performs a render of this component as part of a Page level render process. |
void |
render(MarkupStream markupStream)
Performs a render of this component as part of a Page level render process. |
void |
renderComponent()
Page.renderPage() is used to render a whole page. |
void |
renderComponent(MarkupStream markupStream)
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
protected void |
renderComponentTag(ComponentTag tag)
Writes a simple tag out to the response stream. |
void |
rendered()
Called to indicate that a component has been rendered. |
void |
renderedBehaviors()
THIS IS WICKET INTERNAL ONLY. |
void |
renderHead(HtmlHeaderContainer container)
Print to the web response what ever the component wants to contribute to the head section. |
protected void |
replaceComponentTagBody(MarkupStream markupStream,
ComponentTag tag,
java.lang.CharSequence body)
Replaces the body with the given one. |
void |
replaceWith(Component replacement)
Replaces this component with another. |
protected void |
resetHeadRendered()
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
boolean |
sameRootModel(Component component)
|
boolean |
sameRootModel(IModel model)
|
protected void |
setAuto(boolean auto)
|
Component |
setEnabled(boolean enabled)
Sets whether this component is enabled. |
Component |
setEscapeModelStrings(boolean escapeMarkup)
Sets whether model strings should be escaped. |
protected void |
setFlag(int flag,
boolean set)
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
protected void |
setFlag(short flag,
boolean set)
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
protected Component |
setIgnoreAttributeModifier(boolean ignore)
If true, all attribute modifiers will be ignored |
protected void |
setMarkupStream(MarkupStream markupStream)
The markup stream will be assigned to the component at the beginning of the component render phase. |
void |
setMetaData(MetaDataKey key,
java.io.Serializable object)
Sets the metadata for this component using the given key. |
Component |
setModel(IModel model)
Sets the given model. |
Component |
setModelObject(java.lang.Object object)
Sets the backing model object; shorthand for getModel().setObject(object). |
Component |
setOutputMarkupId(boolean output)
Sets whether or not component will output id attribute into the markup. |
void |
setRedirect(boolean redirect)
|
Component |
setRenderBodyOnly(boolean renderTag)
If false the component's tag will be printed as well as its body (which is default). |
void |
setResponsePage(java.lang.Class cls)
Sets the page that will respond to this request |
void |
setResponsePage(java.lang.Class cls,
PageParameters parameters)
Sets the page class and its parameters that will respond to this request |
void |
setResponsePage(Page page)
Sets the page that will respond to this request |
Component |
setVersioned(boolean versioned)
|
Component |
setVisible(boolean visible)
Sets whether this component and any children are visible. |
java.lang.String |
toString()
Gets the string representation of this component. |
java.lang.String |
toString(boolean detailed)
|
java.lang.CharSequence |
urlFor(java.lang.Class pageClass,
PageParameters parameters)
Returns a bookmarkable URL that references a given page class using a given set of page parameters. |
java.lang.CharSequence |
urlFor(IRequestTarget requestTarget)
Returns a URL that references the given request target. |
java.lang.CharSequence |
urlFor(PageMap pageMap,
java.lang.Class pageClass,
PageParameters parameters)
Returns a bookmarkable URL that references a given page class using a given set of page parameters. |
java.lang.CharSequence |
urlFor(RequestListenerInterface listener)
Gets a URL for the listener interface (e.g. |
java.lang.CharSequence |
urlFor(ResourceReference resourceReference)
Returns a URL that references a shared resource through the provided resource reference. |
java.lang.Object |
visitParents(java.lang.Class c,
Component.IVisitor visitor)
Traverses all parent components of the given class in this container, calling the visitor's visit method at each one. |
void |
warn(java.lang.String message)
Registers a warning feedback message for this component. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Action ENABLE
If enabling is authorized, a component may decide by itself (typically using it's enabled property) whether it is enabled or not. If enabling is not authorized, the given component is marked disabled, regardless its enabled property.
When a component is not allowed to be enabled (in effect disabled through the implementation of this interface), Wicket will try to prevent model updates too. This is not completely fail safe, as constructs like:
User u = (User)getModelObject(); u.setName("got you there!");can't be prevented. Indeed it can be argued that any model protection is best dealt with in your model objects to be completely secured. Wicket will catch all normal framework-directed use though.
public static final char PATH_SEPARATOR
public static final Action RENDER
There are two uses for this method:
AuthorizationException
, which will
then be handled further by the framework.
protected static final int FLAG_RESERVED1
protected static final int FLAG_RESERVED2
protected static final int FLAG_RESERVED3
protected static final int FLAG_RESERVED4
protected static final int FLAG_RESERVED5
protected static final int FLAG_RESERVED6
protected static final int FLAG_RESERVED7
protected static final int FLAG_RESERVED8
Constructor Detail |
---|
public Component(java.lang.String id)
id
- The non-null id of this component
WicketRuntimeException
- Thrown if the component has been given a null id.public Component(java.lang.String id, IModel model)
id
- The non-null id of this componentmodel
- The component's model
WicketRuntimeException
- Thrown if the component has been given a null id.Method Detail |
---|
public final Component add(IBehavior behavior)
behavior
- The behavior modifier to be added
public final boolean continueToOriginalDestination()
redirectToInterceptPage(Page)
public final void debug(java.lang.String message)
message
- The feedback messagepublic void detachModels()
public final void error(java.lang.String message)
message
- The feedback messagepublic final void fatal(java.lang.String message)
message
- The feedback messagepublic final MarkupContainer findParent(java.lang.Class c)
c
- MarkupContainer class to search for
public final MarkupContainer findParentWithAssociatedMarkup()
public final Application getApplication()
Application
public final IApplicationSettings getApplicationPages()
IApplicationSettings
public final Settings getApplicationSettings()
Settings
public final java.util.List getBehaviors()
IBehavior
s as a unmodifiable list.
Returns an empty list rather than null if there are no behaviors coupled
to this component.
public final java.lang.String getClassRelativePath()
getPageRelativePath()
public IConverter getConverter()
public final boolean getEscapeModelStrings()
public final FeedbackMessage getFeedbackMessage()
public java.lang.String getId()
public java.util.Locale getLocale()
getSession()
public final Localizer getLocalizer()
public final ValueMap getMarkupAttributes()
Modifications to the map returned don't change the tags attributes. It is just a copy.
Note: The component must have been added (directly or indirectly) to a container with an associated markup file (Page, Panel or Border).
public java.lang.String getMarkupId()
The point of this function is to generate a unique id to make it easy to locate this component in the generated markup for post-wicket processing such as javascript or an xslt transform.
Note: The component must have been added (directly or indirectly) to a container with an associated markup file (Page, Panel or Border). This TODO post 1.2 this restriction will be implicitly met after implementing 2.0's constructor change
getPageRelativePath()
where the ':' character (the
internal path seperator of Wicket) are replaced by the '_'
character.public final java.io.Serializable getMetaData(MetaDataKey key)
key
- The key for the data
MetaDataKey
public IModel getModel()
public final java.lang.Object getModelObject()
public final java.lang.String getModelObjectAsString()
public final Page getPage()
java.lang.IllegalStateException
- Thrown if component is not yet attached to a Page.public final IPageFactory getPageFactory()
public final java.lang.String getPageRelativePath()
public final MarkupContainer getParent()
public final java.lang.String getPath()
public final boolean getRenderBodyOnly()
public final Request getRequest()
public final RequestCycle getRequestCycle()
public final Response getResponse()
public final Session getSession()
public long getSizeInBytes()
public final java.lang.String getString(java.lang.String key)
key
- Key of string resource in property file
Localizer
public final java.lang.String getString(java.lang.String key, IModel model)
key
- The resource keymodel
- The model
Localizer
public final java.lang.String getString(java.lang.String key, IModel model, java.lang.String defaultValue)
key
- The resource keymodel
- The modeldefaultValue
- A default value if the string cannot be found
Localizer
public final java.lang.String getStyle()
Session
).
Session
,
Session.getStyle()
public java.lang.String getVariation()
public final boolean hasErrorMessage()
public final boolean hasFeedbackMessage()
public final void info(java.lang.String message)
message
- The feedback messagepublic final boolean isActionAuthorized(Action action)
action
- The action to authorize
AuthorizationException
- Can be thrown by implementation if action is unauthorizedpublic final boolean isAncestorOf(Component component)
component
- The component to check
public final boolean isEnableAllowed()
public boolean isEnabled()
public boolean isVersioned()
public boolean isVisible()
public final boolean isVisibleInHierarchy()
public final void modelChanged()
public final void modelChanging()
public final Page newPage(java.lang.Class c)
c
- The class of page to create
public final Page newPage(java.lang.Class c, PageParameters parameters)
c
- The class of page to createparameters
- Any parameters to pass to the constructor
public final void redirectToInterceptPage(Page page)
page
- The sign in pagecontinueToOriginalDestination()
public final void remove()
public final void render()
For component level re-render (e.g. AJAX) please call
renderComponent()
. Though render() does seem to work, it will
fail for panel children.
public final void render(MarkupStream markupStream)
For component level re-render (e.g. AJAX) please call
renderComponent(MarkupStream)
. Though render() does seem to
work, it will fail for panel children.
markupStream
- public final void renderComponent()
Note: it is not necessary that the page has previously been rendered. But the component must have been added (directly or indirectly) to a container with an associated markup file (Page, Panel or Border).
public final void renderComponent(MarkupStream markupStream)
Renders the component at the current position in the given markup stream. The method onComponentTag() is called to allow the component to mutate the start tag. The method onComponentTagBody() is then called to permit the component to render its body.
markupStream
- The markup streampublic final void rendered()
public final void renderedBehaviors()
rendered()
because we don't want to call
getPage().componentRendered(this)
every time.
public final void detachBehaviors()
AjaxRequestTarget
to be able to cleanup
component's behaviors after header contribution has been done (which is
separated from component render).
public void renderHead(HtmlHeaderContainer container)
container
- The HtmlHeaderContainerpublic void replaceWith(Component replacement)
this.getParent().replace(replacement)
and provides a
better context for errors.
replacement
- component to replace this onepublic final boolean sameRootModel(Component component)
component
- The component to compare with
public final boolean sameRootModel(IModel model)
model
- The model to compare with
public final Component setEnabled(boolean enabled)
enabled
- whether this component is enabled
public final Component setEscapeModelStrings(boolean escapeMarkup)
escapeMarkup
- True is model strings should be escaped
public final void setMetaData(MetaDataKey key, java.io.Serializable object)
MetaDataKey
.
key
- The singleton key for the metadataobject
- The metadata object
java.lang.IllegalArgumentException
MetaDataKey
public Component setModel(IModel model)
WARNING: DO NOT OVERRIDE THIS METHOD UNLESS YOU HAVE A VERY GOOD REASON FOR IT. OVERRIDING THIS MIGHT OPEN UP SECURITY LEAKS AND BREAK BACK-BUTTON SUPPORT.
model
- The model
public final Component setModelObject(java.lang.Object object)
object
- The object to set
public final Component setOutputMarkupId(boolean output)
getMarkupId()
.
output
-
public final boolean getOutputMarkupId()
getMarkupId()
.
public final void setRedirect(boolean redirect)
redirect
- True if the response should be redirected toRequestCycle.setRedirect(boolean)
public final Component setRenderBodyOnly(boolean renderTag)
renderTag
- If true, the component tag will not be printed
public final void setResponsePage(java.lang.Class cls)
cls
- The response page classRequestCycle.setResponsePage(Class)
public final void setResponsePage(java.lang.Class cls, PageParameters parameters)
cls
- The response page classparameters
- The parameters for thsi bookmarkable page.RequestCycle.setResponsePage(Class, PageParameters)
public final void setResponsePage(Page page)
page
- The response pageRequestCycle.setResponsePage(Page)
public Component setVersioned(boolean versioned)
versioned
- True to turn on versioning for this component, false to turn
it off for this component and any children.
public final Component setVisible(boolean visible)
visible
- True if this component and any children should be visible
public final java.lang.Object visitParents(java.lang.Class c, Component.IVisitor visitor)
c
- Classvisitor
- The visitor to call at each parent of the given type
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(boolean detailed)
detailed
- True if a detailed string is desired
public final java.lang.CharSequence urlFor(java.lang.Class pageClass, PageParameters parameters)
pageClass
- Class of pageparameters
- Parameters to page
RequestCycle.urlFor(PageMap, Class, PageParameters)
public final java.lang.CharSequence urlFor(IRequestTarget requestTarget)
requestTarget
- the request target to reference
RequestCycle.urlFor(IRequestTarget)
public final java.lang.CharSequence urlFor(PageMap pageMap, java.lang.Class pageClass, PageParameters parameters)
pageMap
- Page map to usepageClass
- Class of pageparameters
- Parameters to page
RequestCycle.urlFor(PageMap, Class, PageParameters)
public final java.lang.CharSequence urlFor(RequestListenerInterface listener)
listener
- The listener interface that the URL should call
public final java.lang.CharSequence urlFor(ResourceReference resourceReference)
resourceReference
- The resource reference
RequestCycle.urlFor(ResourceReference)
public final void warn(java.lang.String message)
message
- The feedback messageprotected final void addStateChange(Change change)
change
- The changeprotected final void checkComponentTag(ComponentTag tag, java.lang.String name)
tag
- The tag to checkname
- The expected tag name
MarkupException
- Thrown if the tag is not of the right nameprotected final void checkComponentTagAttribute(ComponentTag tag, java.lang.String key, java.lang.String value)
tag
- The tagkey
- The attribute keyvalue
- The required value for the attribute key
MarkupException
- Thrown if the tag does not have the required attribute valueprotected void detachModel()
protected final java.lang.String exceptionMessage(java.lang.String message)
message
- The message
protected MarkupStream findMarkupStream()
protected final Page findPage()
protected final java.util.List getBehaviors(java.lang.Class type)
IBehavior
s that are of
the provided type as a unmodifiable list or null if there are no
behaviors attached. Returns an empty list rather than null if there are
no behaviors coupled to this component.
type
- The type
protected final boolean getFlag(int flag)
flag
- The flag to test
protected final boolean getFlag(short flag)
flag
- The flag to test
protected IModelComparator getModelComparator()
protected IModel initModel()
protected void internalAttach()
protected void internalDetach()
protected void internalOnAttach()
protected void internalOnDetach()
protected void internalOnModelChanged()
protected boolean isBehaviorAccepted(IBehavior behavior)
behavior
-
protected final boolean isIgnoreAttributeModifier()
protected void onAfterRender()
protected void onAttach()
protected void onBeforeRender()
protected void onBeginRequest()
protected void onComponentTag(ComponentTag tag)
tag
- Tag to modifyprotected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag)
markupStream
- The markup streamopenTag
- The open tag for the bodyprotected void onDetach()
protected void onEndRequest()
protected void onModelChanged()
protected void onModelChanging()
protected final void onRender()
protected abstract void onRender(MarkupStream markupStream)
markupStream
- protected final void renderComponentTag(ComponentTag tag)
tag
- The tag to writeprotected final void replaceComponentTagBody(MarkupStream markupStream, ComponentTag tag, java.lang.CharSequence body)
markupStream
- The markup stream to replace the tag body intag
- The tagbody
- The new markupprotected final void setFlag(int flag, boolean set)
flag
- The flag to setset
- True to turn the flag on, false to turn it offprotected final void setFlag(short flag, boolean set)
flag
- The flag to setset
- True to turn the flag on, false to turn it offprotected final Component setIgnoreAttributeModifier(boolean ignore)
ignore
- If true, all attribute modifiers will be ignored
protected void setMarkupStream(MarkupStream markupStream)
markupStream
- The current markup stream which should be applied by the
component to render itselffindMarkupStream()
,
MarkupContainer.getMarkupStream()
protected final boolean isRenderAllowed()
protected final void setAuto(boolean auto)
auto
- True to put component into auto-add modeprotected final boolean isHeadRendered()
protected final void resetHeadRendered()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |