code
stringlengths
23
201k
docstring
stringlengths
17
96.2k
func_name
stringlengths
0
235
language
stringclasses
1 value
repo
stringlengths
8
72
path
stringlengths
11
317
url
stringlengths
57
377
license
stringclasses
7 values
public final void rendered() { Page page = findPage(); if (page != null) { // Tell the page that the component rendered page.componentRendered(this); } else { log.error("Component is not connected to a Page. Cannot register the component as being rendered. Component: " + toString()); } }
Called to indicate that a component has been rendered. This method should only very rarely be called at all. Some components may render its children without calling render() on them. These components need to call rendered() to indicate that its child components were actually rendered, the framework would think they had...
rendered
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected final IMarkupSourcingStrategy getMarkupSourcingStrategy() { if (markupSourcingStrategy == null) { markupSourcingStrategy = newMarkupSourcingStrategy(); // If not strategy by provided, than we use a default one. if (markupSourcingStrategy == null) { markupSourcingStrategy = DefaultMarkupS...
Get the markup sourcing strategy for the component. If null, {@link #newMarkupSourcingStrategy()} will be called. @return Markup sourcing strategy
getMarkupSourcingStrategy
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected IMarkupSourcingStrategy newMarkupSourcingStrategy() { return null; }
If {@link #getMarkupSourcingStrategy()} returns null, this method will be called. By default it returns null, which means that a default markup strategy will be attached to the component. <p> Please note that markup source strategies are not persisted. Instead they get re-created by calling this method again. That's ok...
newMarkupSourcingStrategy
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public Component replaceWith(Component replacement) { Args.notNull(replacement, "replacement"); if (!getId().equals(replacement.getId())) { throw new IllegalArgumentException( "Replacement component must have the same id as the component it will replace. Replacement id [[" + replacement.getId() + "]...
Replaces this component with another. The replacing component must have the same component id as this component. This method serves as a shortcut to <code>this.getParent().replace(replacement)</code> and provides a better context for errors. <p> Usage: <code>component = component.replaceWith(replacement);</code> </p>...
replaceWith
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final boolean sameInnermostModel(final Component component) { return sameInnermostModel(component.getDefaultModel()); }
@param component The component to compare with @return True if the given component's model is the same as this component's model.
sameInnermostModel
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final boolean sameInnermostModel(final IModel<?> model) { // Get the two models IModel<?> thisModel = getDefaultModel(); // If both models are non-null they could be the same if (thisModel != null && model != null) { return getInnermostModel(thisModel) == getInnermostModel(model); } return fa...
@param model The model to compare with @return True if the given component's model is the same as this component's model.
sameInnermostModel
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final Component setEnabled(final boolean enabled) { // Is new enabled state a change? if (enabled != getFlag(FLAG_ENABLED)) { // Tell the page that this component's enabled was changed if (isVersioned()) { final Page page = findPage(); if (page != null) { addStateChange(); } ...
Sets whether this component is enabled. Specific components may decide to implement special behavior that uses this property, like web form components that add a disabled='disabled' attribute when enabled is false. If it is not enabled, it will not be allowed to call any listener method on it (e.g. Link.onClick) and th...
setEnabled
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
void clearEnabledInHierarchyCache() { setRequestFlag(RFLAG_ENABLED_IN_HIERARCHY_SET, false); }
Sets whether this component is enabled. Specific components may decide to implement special behavior that uses this property, like web form components that add a disabled='disabled' attribute when enabled is false. If it is not enabled, it will not be allowed to call any listener method on it (e.g. Link.onClick) and th...
clearEnabledInHierarchyCache
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
void onEnabledStateChanged() { clearEnabledInHierarchyCache(); }
Sets whether this component is enabled. Specific components may decide to implement special behavior that uses this property, like web form components that add a disabled='disabled' attribute when enabled is false. If it is not enabled, it will not be allowed to call any listener method on it (e.g. Link.onClick) and th...
onEnabledStateChanged
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final Component setEscapeModelStrings(final boolean escapeMarkup) { setFlag(FLAG_ESCAPE_MODEL_STRINGS, escapeMarkup); return this; }
Sets whether model strings should be escaped. @param escapeMarkup True is model strings should be escaped @return This
setEscapeModelStrings
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final void setMarkupIdImpl(Object markupId) { if (markupId != null && !(markupId instanceof String) && !(markupId instanceof Integer)) { throw new IllegalArgumentException("markupId must be String or Integer"); } setOutputMarkupId(true); if (markupId instanceof Integer) { generatedMarkupId = ...
Set markup ID, which must be String or Integer @param markupId
setMarkupIdImpl
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public Component setMarkupId(String markupId) { Args.notEmpty(markupId, "markupId"); // TODO check if an automatic id has already been generated or getmarkupid() called // previously and throw an illegalstateexception because something else might be depending // on previous id setMarkupIdImpl(markupId); ...
Sets this component's markup id to a user defined value. It is up to the user to ensure this value is unique. <p> The recommended way is to let wicket generate the value automatically, this method is here to serve as an override for that value in cases where a specific id must be used. <p> If null is passed in the user...
setMarkupId
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final <M extends Serializable> Component setMetaData(final MetaDataKey<M> key, final M object) { MetaDataEntry<?>[] old = getMetaData(); Object metaData = null; MetaDataEntry<?>[] metaDataArray = key.set(getMetaData(), object); if (metaDataArray != null && metaDataArray.length > 0) { metaData = (m...
Sets the metadata for this component using the given key. If the metadata object is not of the correct type for the metadata key, an IllegalArgumentException will be thrown. For information on creating MetaDataKeys, see {@link MetaDataKey}. @param <M> The type of the metadata @param key The sing...
setMetaData
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public Component setDefaultModel(final IModel<?> model) { IModel<?> prevModel = getModelImpl(); IModel<?> wrappedModel = prevModel; if (prevModel instanceof IWrapModel) { wrappedModel = ((IWrapModel<?>)prevModel).getWrappedModel(); } // Change model if (wrappedModel != model) { // Detach the ol...
Sets the given model. <p> 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. </p> @param model The model @return This
setDefaultModel
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
@SuppressWarnings("unchecked") public final Component setDefaultModelObject(final Object object) { final IModel<Object> model = (IModel<Object>)getDefaultModel(); // Check whether anything can be set at all if (model == null) { throw new IllegalStateException( "Attempt to set a model object on a compo...
Sets the backing model object. Unlike <code>getDefaultModel().setObject(object)</code>, this method checks authorisation and model comparator, and invokes <code>modelChanging</code> and <code>modelChanged</code> if the value really changes. @param object The object to set @return This @throws IllegalStateEx...
setDefaultModelObject
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final Component setOutputMarkupId(final boolean output) { setFlag(FLAG_OUTPUT_MARKUP_ID, output); return this; }
Sets whether or not component will output id attribute into the markup. id attribute will be set to the value returned from {@link Component#getMarkupId()}. @param output True if the component will output the id attribute into markup. Please note that the default behavior is to use the same id as...
setOutputMarkupId
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final Component setOutputMarkupPlaceholderTag(final boolean outputTag) { if (outputTag != getFlag(FLAG_PLACEHOLDER)) { if (outputTag) { setOutputMarkupId(true); setFlag(FLAG_PLACEHOLDER, true); } else { setFlag(FLAG_PLACEHOLDER, false); // I think it's better to not setOutputM...
Render a placeholder tag when the component is not visible. The tag is of form: &lt;componenttag style="display:none;" id="markupid"/&gt;. This method will also call <code>setOutputMarkupId(true)</code>. This is useful, for example, in ajax situations where the component starts out invisible and then becomes visible t...
setOutputMarkupPlaceholderTag
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final Component setRenderBodyOnly(final boolean renderTag) { setFlag(FLAG_RENDER_BODY_ONLY, renderTag); return this; }
If false the component's tag will be printed as well as its body (which is default). If true only the body will be printed, but not the component's tag. @param renderTag If true, the component tag will not be printed @return This
setRenderBodyOnly
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final <C extends IRequestablePage> void setResponsePage(final Class<C> cls) { getRequestCycle().setResponsePage(cls, (PageParameters)null); }
Sets the page that will respond to this request @param <C> @param cls The response page class @see RequestCycle#setResponsePage(Class)
setResponsePage
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final <C extends IRequestablePage> void setResponsePage(final Class<C> cls, PageParameters parameters) { getRequestCycle().setResponsePage(cls, parameters); }
Sets the page class and its parameters that will respond to this request @param <C> @param cls The response page class @param parameters The parameters for this bookmarkable page. @see RequestCycle#setResponsePage(Class, PageParameters)
setResponsePage
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public Component setVersioned(boolean versioned) { setFlag(FLAG_VERSIONED, versioned); return this; }
@param versioned True to turn on versioning for this component, false to turn it off for this component and any children. @return This
setVersioned
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final Component setVisible(final boolean visible) { // Is new visibility state a change? if (visible != getFlag(FLAG_VISIBLE)) { // record component's visibility change addStateChange(); // Change visibility setFlag(FLAG_VISIBLE, visible); onVisibleStateChanged(); } return this; }
Sets whether this component and any children are visible. @param visible True if this component and any children should be visible @return This
setVisible
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
void clearVisibleInHierarchyCache() { setRequestFlag(RFLAG_VISIBLE_IN_HIERARCHY_SET, false); }
Sets whether this component and any children are visible. @param visible True if this component and any children should be visible @return This
clearVisibleInHierarchyCache
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
void onVisibleStateChanged() { clearVisibleInHierarchyCache(); }
Sets whether this component and any children are visible. @param visible True if this component and any children should be visible @return This
onVisibleStateChanged
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
@Override public String toString() { return toString(false); }
Gets the string representation of this component. @return The path to this component
toString
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public String toString(final boolean detailed) { try { final StringBuilder buffer = new StringBuilder(); buffer.append("[Component id = ").append(getId()); if (detailed) { final Page page = findPage(); if (page == null) { buffer.append(", page = <No Page>, path = ") .append(getP...
@param detailed True if a detailed string is desired @return The string
toString
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final CharSequence urlFor(final Behavior behaviour, final RequestListenerInterface listener, final PageParameters parameters) { int id = getBehaviorId(behaviour); IRequestHandler handler = createRequestHandler(listener, parameters, id); return getRequestCycle().urlFor(handler); }
Gets a URL for the listener interface on a behavior (e.g. IBehaviorListener on AjaxPagingNavigationBehavior). @param behaviour The behavior that the URL should point to @param listener The listener interface that the URL should call @param parameters The parameters that should be rende...
urlFor
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
private IRequestHandler createRequestHandler(RequestListenerInterface listener, PageParameters parameters, Integer id) { Page page = getPage(); PageAndComponentProvider provider = new PageAndComponentProvider(page, this, parameters); if (page.isPageStateless() || (page.isBookmarkable() && page.wasCreatedB...
Create a suitable request handler depending whether the page is stateless or bookmarkable.
createRequestHandler
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final CharSequence urlFor(final IRequestHandler requestHandler) { return getRequestCycle().urlFor(requestHandler); }
Returns a URL that references the given request target. @see RequestCycle#urlFor(IRequestHandler) @param requestHandler the request target to reference @return a URL that references the given request target
urlFor
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final CharSequence urlFor(final RequestListenerInterface listener, final PageParameters parameters) { IRequestHandler handler = createRequestHandler(listener, parameters, null); return getRequestCycle().urlFor(handler); }
Gets a URL for the listener interface (e.g. ILinkListener). @see RequestCycle#urlFor(IRequestHandler) @param listener The listener interface that the URL should call @param parameters The parameters that should be rendered into the urls @return The URL
urlFor
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final CharSequence urlFor(final ResourceReference resourceReference, PageParameters parameters) { return getRequestCycle().urlFor(resourceReference, parameters); }
Returns a URL that references a shared resource through the provided resource reference. @see RequestCycle#urlFor(IRequestHandler) @param resourceReference The resource reference @param parameters parameters or {@code null} if none @return The url for the shared resource
urlFor
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final <R, C extends MarkupContainer> R visitParents(final Class<C> parentClass, final IVisitor<C, R> visitor) { return visitParents(parentClass, visitor, IVisitFilter.ANY); }
Traverses all parent components of the given class in this parentClass, calling the visitor's visit method at each one. @param <R> the type of the result object @param parentClass Class @param visitor The visitor to call at each parent of the given type @return First non-null value ret...
visitParents
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
@SuppressWarnings("unchecked") public final <R, C extends MarkupContainer> R visitParents(final Class<C> parentClass, final IVisitor<C, R> visitor, IVisitFilter filter) { Args.notNull(filter, "filter"); // Start here MarkupContainer current = getParent(); Visit<R> visit = new Visit<R>(); // Walk up con...
Traverses all parent components of the given class in this parentClass, calling the visitor's visit method at each one. @param <R> the type of the result object @param parentClass the class of the parent component @param visitor The visitor to call at each parent of the given type @par...
visitParents
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final void warn(final Serializable message) { getFeedbackMessages().warn(this, message); addStateChange(); }
Registers a warning feedback message for this component. @param message The feedback message
warn
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
private void notifyBehaviorsComponentBeforeRender() { for (Behavior behavior : getBehaviors()) { if (isBehaviorAccepted(behavior)) { behavior.beforeRender(this); } } }
{@link Behavior#beforeRender(Component)} Notify all behaviors that are assigned to this component that the component is about to be rendered.
notifyBehaviorsComponentBeforeRender
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
private void notifyBehaviorsComponentRendered() { // notify the behaviors that component has been rendered for (Behavior behavior : getBehaviors()) { if (isBehaviorAccepted(behavior)) { behavior.afterRender(this); } } }
{@link Behavior#afterRender(Component)} Notify all behaviors that are assigned to this component that the component has rendered.
notifyBehaviorsComponentRendered
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected final void addStateChange() { checkHierarchyChange(this); final Page page = findPage(); if (page != null) { page.componentStateChanging(this); } }
TODO WICKET-NG rename to something more useful - like componentChanged(), this method used to be called with a Change object Adds state change to page.
addStateChange
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected final void checkComponentTag(final ComponentTag tag, final String name) { if (!tag.getName().equalsIgnoreCase(name)) { String msg = String.format("Component [%s] (path = [%s]) must be " + "applied to a tag of type [%s], not: %s", getId(), getPath(), name, tag.toUserDebugString()); findMark...
Checks whether the given type has the expected name. @param tag The tag to check @param name The expected tag name @throws MarkupException Thrown if the tag is not of the right name
checkComponentTag
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected final void checkComponentTagAttribute(final ComponentTag tag, final String key, final String... values) { if (key != null) { final String tagAttributeValue = tag.getAttributes().getString(key); boolean found = false; if (tagAttributeValue != null) { for (String value : values) { ...
Checks that a given tag has a required attribute value. @param tag The tag @param key The attribute key @param values The required value for the attribute key @throws MarkupException Thrown if the tag does not have the required attribute value
checkComponentTagAttribute
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected void checkHierarchyChange(final Component component) { // Throw exception if modification is attempted during rendering if (getFlag(FLAG_RENDERING) && !component.isAuto()) { throw new WicketRuntimeException( "Cannot modify component hierarchy after render phase has started (page version cant cha...
Checks whether the hierarchy may be changed at all, and throws an exception if this is not the case. @param component the component which is about to be added or removed
checkHierarchyChange
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected void detachModel() { IModel<?> model = getModelImpl(); if (model != null) { model.detach(); } // also detach the wrapped model of a component assigned wrap (not // inherited) if (model instanceof IWrapModel && !getFlag(FLAG_INHERITABLE_MODEL)) { ((IWrapModel<?>)model).getWrappedModel()....
Detaches the model for this component if it is detachable.
detachModel
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected final String exceptionMessage(final String message) { return message + ":\n" + toString(); }
Suffixes an exception message with useful information about this. component. @param message The message @return The modified message
exceptionMessage
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected final MarkupStream findMarkupStream() { return new MarkupStream(getMarkup()); }
Finds the markup stream for this component. @return The markup stream for this component. Since a Component cannot have a markup stream, we ask this component's parent to search for it.
findMarkupStream
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected final Page findPage() { // Search for page return (Page)(this instanceof Page ? this : findParent(Page.class)); }
If this Component is a Page, returns self. Otherwise, searches for the nearest Page parent in the component hierarchy. If no Page parent can be found, {@code null} is returned. @return The Page or {@code null} if none can be found
findPage
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public <M extends Behavior> List<M> getBehaviors(Class<M> type) { return new Behaviors(this).getBehaviors(type); }
Gets the subset of the currently coupled {@link Behavior}s that are of the provided type as an unmodifiable list. Returns an empty list if there are no behaviors coupled to this component. @param type The type or null for all @return The subset of the currently coupled behaviors that are of the provided typ...
getBehaviors
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected final boolean getFlag(final int flag) { return (flags & flag) != 0; }
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT USE IT! @param flag The flag to test @return True if the flag is set
getFlag
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected final boolean getRequestFlag(final short flag) { return (requestFlags & flag) != 0; }
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT USE IT! @param flag The flag to test @return True if the flag is set
getRequestFlag
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected final IModel<?> getInnermostModel(final IModel<?> model) { IModel<?> nested = model; while (nested != null && nested instanceof IWrapModel) { final IModel<?> next = ((IWrapModel<?>)nested).getWrappedModel(); if (nested == next) { throw new WicketRuntimeException("Model for " + nested + " i...
Finds the innermost IModel object for an IModel that might contain nested IModel(s). @param model The model @return The innermost (most nested) model
getInnermostModel
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public IModelComparator getModelComparator() { return defaultModelComparator; }
Gets the component's current model comparator. Implementations can be used for testing the current value of the components model data with the new value that is given. @return the value defaultModelComparator
getModelComparator
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected boolean getStatelessHint() { return true; }
Returns whether the component can be stateless. Also the component behaviors must be stateless, otherwise the component will be treat as stateful. In order for page to be stateless (and not to be stored in session), all components (and component behaviors) must be stateless. @return whether the component can be statel...
getStatelessHint
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected IModel<?> initModel() { IModel<?> foundModel = null; // Search parents for IComponentInheritedModel (i.e. CompoundPropertyModel) for (Component current = getParent(); current != null; current = current.getParent()) { // Get model // Don't call the getModel() that could initialize many in betwee...
Called when a null model is about to be retrieved in order to allow a subclass to provide an initial model. <p> By default this implementation looks components in the parent chain owning a {@link IComponentInheritedModel} to provide a model for this component via {@link IComponentInheritedModel#wrapOnInheritance(Compon...
initModel
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected boolean isBehaviorAccepted(final Behavior behavior) { // Ignore AttributeModifiers when FLAG_IGNORE_ATTRIBUTE_MODIFIER is set if ((behavior instanceof AttributeModifier) && (getFlag(FLAG_IGNORE_ATTRIBUTE_MODIFIER) != false)) { return false; } return behavior.isEnabled(this); }
Components are allowed to reject behavior modifiers. @param behavior @return False, if the component should not apply this behavior
isBehaviorAccepted
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected final boolean isIgnoreAttributeModifier() { return getFlag(FLAG_IGNORE_ATTRIBUTE_MODIFIER); }
If true, all attribute modifiers will be ignored @return True, if attribute modifiers are to be ignored
isIgnoreAttributeModifier
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected void onAfterRender() { setFlag(FLAG_AFTER_RENDERING, false); }
Called just after a component is rendered.
onAfterRender
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
@SuppressWarnings("deprecation") protected void onComponentTag(final ComponentTag tag) { // We can't try to get the ID from markup. This could be different than // id returned from getMarkupId() prior first rendering the component // (due to transparent resolvers and borders which break the 1:1 // component <...
Processes the component tag. Overrides of this method most likely should call the super implementation. @param tag Tag to modify
onComponentTag
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected void onDetach() { setFlag(FLAG_DETACHING, false); }
Called to allow a component to detach resources after use. Overrides of this method MUST call the super implementation, the most logical place to do this is the last line of the override method.
onDetach
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected void onRemove() { setFlag(FLAG_REMOVING_FROM_HIERARCHY, false); }
Called to notify the component it is being removed from the component hierarchy Overrides of this method MUST call the super implementation, the most logical place to do this is the last line of the override method.
onRemove
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected final void renderComponentTag(ComponentTag tag) { if (needToRenderTag(tag)) { // apply behaviors that are attached to the component tag. if (tag.hasBehaviors()) { Iterator<? extends Behavior> tagBehaviors = tag.getBehaviors(); while (tagBehaviors.hasNext()) { final Behavior beha...
Writes a simple tag out to the response stream. Any components that might be referenced by the tag are ignored. Also undertakes any tag attribute modifications if they have been added to the component. @param tag The tag to write
renderComponentTag
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected final void replaceComponentTagBody(final MarkupStream markupStream, final ComponentTag tag, final CharSequence body) { // The tag might have been changed from open-close to open. Hence // we'll need what was in the markup itself ComponentTag markupOpenTag = null; // If tag has a body if (tag.isO...
Replaces the body with the given one. @param markupStream The markup stream to replace the tag body in @param tag The tag @param body The new markup
replaceComponentTagBody
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected final Component setAuto(final boolean auto) { setFlag(FLAG_AUTO, auto); return this; }
@param auto True to put component into auto-add mode
setAuto
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected final Component setFlag(final int flag, final boolean set) { if (set) { flags |= flag; } else { flags &= ~flag; } return this; }
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT USE IT! @param flag The flag to set @param set True to turn the flag on, false to turn it off
setFlag
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected final Component setRequestFlag(final short flag, final boolean set) { if (set) { requestFlags |= flag; } else { requestFlags &= ~flag; } return this; }
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT USE IT! @param flag The flag to set @param set True to turn the flag on, false to turn it off
setRequestFlag
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected final Component setIgnoreAttributeModifier(final boolean ignore) { setFlag(FLAG_IGNORE_ATTRIBUTE_MODIFIER, ignore); return this; }
If true, all attribute modifiers will be ignored @param ignore If true, all attribute modifiers will be ignored @return This
setIgnoreAttributeModifier
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
protected final <V> IModel<V> wrap(final IModel<V> model) { if (model instanceof IComponentAssignedModel) { return ((IComponentAssignedModel<V>)model).wrapOnAssignment(this); } return model; }
@param <V> The model type @param model The model to wrap if need be @return The wrapped model
wrap
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
@Override public Component get(final String path) { // Path to this component is an empty path if (path.length() == 0) { return this; } throw new IllegalArgumentException( exceptionMessage("Component is not a container and so does not contain the path " + path)); }
Gets the component at the given path. @param path Path to component @return The component at the path
get
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final boolean isAuto() { // Search up hierarchy for FLAG_AUTO for (Component current = this; current != null; current = current.getParent()) { if (current.getFlag(FLAG_AUTO)) { return true; } } return false; }
@return True if this component or any of its parents is in auto-add mode
isAuto
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
boolean isPreparedForRender() { return getFlag(FLAG_PREPARED_FOR_RENDER); }
@return <code>true</code> if component has been prepared for render
isPreparedForRender
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
final void renderClosingComponentTag(final MarkupStream markupStream, final ComponentTag openTag, final boolean renderBodyOnly) { // Tag should be open tag and not openclose tag if (openTag.isOpen()) { // If we found a close tag and it closes the open tag, we're good if (markupStream.atCloseTag() && mark...
Renders the close tag at the current position in the markup stream. @param markupStream the markup stream @param openTag the tag to render @param renderBodyOnly if true, the tag will not be written to the output
renderClosingComponentTag
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
final Component setId(final String id) { if (!(this instanceof Page)) { if (Strings.isEmpty(id)) { throw new WicketRuntimeException("Null or empty component ID's are not allowed."); } } if ((id != null) && (id.indexOf(':') != -1 || id.indexOf('~') != -1)) { throw new WicketRuntimeException("...
Sets the id of this component. @param id The non-null id of this component
setId
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final void setParent(final MarkupContainer parent) { if (this.parent != null && log.isDebugEnabled()) { log.debug("Replacing parent " + this.parent + " with " + parent); } this.parent = parent; }
THIS IS A WICKET INTERNAL API. DO NOT USE IT. Sets the parent of a component. Typically what you really want is parent.add(child). <p/> Note that calling setParent() and not parent.add() will connect the child to the parent, but the parent will not know the child. This might not be a problem in some cases, but e.g. ch...
setParent
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
final void setRenderAllowed(boolean renderAllowed) { setFlag(FLAG_IS_RENDER_ALLOWED, renderAllowed); }
Sets the render allowed flag. @param renderAllowed
setRenderAllowed
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
void setRenderAllowed() { setRenderAllowed(isActionAuthorized(RENDER)); }
Sets the render allowed flag. Visit all this page's children (overridden in MarkupContainer) to check rendering authorization, as appropriate. We set any result; positive or negative as a temporary boolean in the components, and when a authorization exception is thrown it will block the rendering of this page
setRenderAllowed
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final Component setVisibilityAllowed(boolean allowed) { setFlag(FLAG_VISIBILITY_ALLOWED, allowed); return this; }
Sets whether or not this component is allowed to be visible. This method is meant to be used by components to control visibility of other components. A call to {@link #setVisible(boolean)} will not always have a desired effect because that component may have {@link #isVisible()} overridden. Both {@link #setVisibilityAl...
setVisibilityAllowed
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final boolean isVisibilityAllowed() { return getFlag(FLAG_VISIBILITY_ALLOWED); }
Gets whether or not visibility is allowed on this component. See {@link #setVisibilityAllowed(boolean)} for details. @return true if this component is allowed to be visible, false otherwise.
isVisibilityAllowed
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final boolean determineVisibility() { return isVisible() && isRenderAllowed() && isVisibilityAllowed(); }
Determines whether or not a component should be visible, taking into account all the factors: {@link #isVisible()}, {@link #isVisibilityAllowed()}, {@link #isRenderAllowed()} @return <code>true</code> if the component should be visible, <code>false</code> otherwise
determineVisibility
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public boolean isEnabledInHierarchy() { if (getRequestFlag(RFLAG_ENABLED_IN_HIERARCHY_SET)) { return getRequestFlag(RFLAG_ENABLED_IN_HIERARCHY_VALUE); } final boolean state; Component parent = getParent(); if (parent != null && !parent.isEnabledInHierarchy()) { state = false; } else { sta...
Calculates enabled state of the component taking its hierarchy into account. A component is enabled iff it is itself enabled ({@link #isEnabled()} and {@link #isEnableAllowed()} both return <code>true</code>), and all of its parents are enabled. @return <code>true</code> if this component is enabled</code>
isEnabledInHierarchy
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final boolean isRendering() { return getFlag(FLAG_RENDERING); }
Says if the component is rendering or not checking the corresponding flag. @return true if this component is rendering, false otherwise.
isRendering
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public boolean canCallListenerInterface(Method method) { return isEnabledInHierarchy() && isVisibleInHierarchy(); }
Checks whether or not a listener method can be invoked on this component. Usually components deny these invocations if they are either invisible or disabled in hierarchy. Components can examine which listener interface is being invoked by examining the declaring class of the passed in {@literal method} parameter. <p> W...
canCallListenerInterface
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
@Override public void renderHead(IHeaderResponse response) { // noop }
Render to the web response whatever the component wants to contribute to the head section. @param response Response object
renderHead
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public Component remove(final Behavior... behaviors) { Behaviors helper = new Behaviors(this); for (Behavior behavior : behaviors) { helper.remove(behavior); } return this; }
Removes behavior from component @param behaviors behaviors to remove @return this (to allow method call chaining)
remove
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public Component add(final Behavior... behaviors) { new Behaviors(this).add(behaviors); return this; }
Adds a behavior modifier to the component. @param behaviors The behavior modifier(s) to be added @return this (to allow method call chaining)
add
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public final List<? extends Behavior> getBehaviors() { return getBehaviors(null); }
Gets the currently coupled {@link Behavior}s as a unmodifiable list. Returns an empty list rather than null if there are no behaviors coupled to this component. @return The currently coupled behaviors as a unmodifiable list
getBehaviors
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
@Override public boolean canCallListenerInterfaceAfterExpiry() { return getApplication().getPageSettings() .getCallListenerInterfaceAfterExpiry() || isStateless(); }
Gets the currently coupled {@link Behavior}s as a unmodifiable list. Returns an empty list rather than null if there are no behaviors coupled to this component. @return The currently coupled behaviors as a unmodifiable list
canCallListenerInterfaceAfterExpiry
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/Component.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/Component.java
MIT
public static RequestListenerInterface forName(final String interfaceName) { return interfaces.get(interfaceName); }
Looks up a request interface listener by name. @param interfaceName The interface name @return The RequestListenerInterface object, or null if none is found
forName
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/RequestListenerInterface.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/RequestListenerInterface.java
MIT
public Class<? extends IRequestListener> getListenerInterfaceClass() { return listenerInterfaceClass; }
@return The interface class, which must extend IRequestListener.
getListenerInterfaceClass
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/RequestListenerInterface.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/RequestListenerInterface.java
MIT
public boolean isIncludeRenderCount() { return includeRenderCount; }
@return whether the render count should be included in url
isIncludeRenderCount
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/RequestListenerInterface.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/RequestListenerInterface.java
MIT
public boolean isRenderPageAfterInvocation() { return renderPageAfterInvocation; }
@return whether the page should be rendered after invocation of this interface (during non-ajax requests)
isRenderPageAfterInvocation
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/RequestListenerInterface.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/RequestListenerInterface.java
MIT
public final Method getMethod() { return method; }
@return The method for this request listener interface
getMethod
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/RequestListenerInterface.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/RequestListenerInterface.java
MIT
public final String getName() { return name; }
@return The name of this request listener interface
getName
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/RequestListenerInterface.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/RequestListenerInterface.java
MIT
public final void invoke(final IRequestableComponent rcomponent) { // we are in Wicket core land final Component component = (Component)rcomponent; ComponentContext.push(new ComponentContext(component)); try { if (!component.canCallListenerInterface(method)) { // just return so that we have a silent...
Invokes a given interface on a component. @param rcomponent The component @throws ListenerInvocationNotAllowedException when listener invocation attempted on a component that does not allow it
invoke
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/RequestListenerInterface.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/RequestListenerInterface.java
MIT
public final void invoke(final IRequestableComponent rcomponent, final Behavior behavior) { // we are in Wicket core land final Component component = (Component)rcomponent; ComponentContext.push(new ComponentContext(component)); try { if (!behavior.canCallListenerInterface(component, method)) { log....
Invokes a given interface on a component's behavior. @param rcomponent The component @param behavior @throws ListenerInvocationNotAllowedException when listener invocation attempted on a component that does not allow it
invoke
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/RequestListenerInterface.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/RequestListenerInterface.java
MIT
private void internalInvoke(final Component component, final Object target) { // save a reference to the page because the component can be removed // during the invocation of the listener and thus lose its parent Page page = component.getPage(); // initialization is required for stateless pages if (!page.is...
Invokes a given interface on a component's behavior. @param rcomponent The component @param behavior @throws ListenerInvocationNotAllowedException when listener invocation attempted on a component that does not allow it
internalInvoke
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/RequestListenerInterface.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/RequestListenerInterface.java
MIT
public void register() { // Register this listener interface registerRequestListenerInterface(this); }
Method to call to register this interface for use
register
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/RequestListenerInterface.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/RequestListenerInterface.java
MIT
private void registerRequestListenerInterface(final RequestListenerInterface requestListenerInterface) { // Check that a different interface method with the same name has not // already been registered final RequestListenerInterface existingInterface = RequestListenerInterface.forName(requestListenerInterface.ge...
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT CALL IT. <p> In previous versions of Wicket, request listeners were manually registered by calling this method. Now there is a first class RequestListenerInterface object which should be constructed as a constant member of the interface to enable automatic interf...
registerRequestListenerInterface
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/RequestListenerInterface.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/RequestListenerInterface.java
MIT
public static Collection<RequestListenerInterface> getRegisteredInterfaces() { return Collections.unmodifiableCollection(interfaces.values()); }
@return collection of all registered interfaces
getRegisteredInterfaces
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/RequestListenerInterface.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/RequestListenerInterface.java
MIT
public static Url getOriginalUrl() { Url originalUrl = null; InterceptData data = InterceptData.get(); if (data != null) { originalUrl = data.getOriginalUrl(); } return originalUrl; }
@return the url of the request when the interception happened or {@code null} or {@code null} if there was no interception yet
getOriginalUrl
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
MIT
public Url getOriginalUrl() { return originalUrl; }
INTERNAL CLASS, DO NOT USE @author igor.vaynberg
getOriginalUrl
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
MIT
public Map<String, List<StringValue>> getPostParameters() { return postParameters; }
INTERNAL CLASS, DO NOT USE @author igor.vaynberg
getPostParameters
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
MIT
public static void set() { Session session = Session.get(); session.bind(); InterceptData data = new InterceptData(); Request request = RequestCycle.get().getRequest(); data.originalUrl = request.getOriginalUrl(); data.originalUrl.setHost(null); data.originalUrl.setPort(null); data.originalUrl...
INTERNAL CLASS, DO NOT USE @author igor.vaynberg
set
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
MIT
public static InterceptData get() { if (Session.exists()) { return Session.get().getMetaData(key); } return null; }
INTERNAL CLASS, DO NOT USE @author igor.vaynberg
get
java
theonedev/onedev
server-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
MIT