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 |
|---|---|---|---|---|---|---|---|
private DisabledSessionException newNoSessionCreationException() {
String msg = "Session creation has been disabled for the current request. This exception indicates " +
"that there is either a programming error (using a session when it should never be " +
"used) or that Shiro's... | Constructs and returns a {@link DisabledSessionException} with an appropriate message explaining why
session creation has been disabled.
@return a new DisabledSessionException with appropriate no creation message
@since 1.2 | newNoSessionCreationException | java | theonedev/onedev | server-core/src/main/java/org/apache/shiro/web/servlet/ShiroHttpServletRequest.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/shiro/web/servlet/ShiroHttpServletRequest.java | MIT |
public HttpSession getSession() {
return getSession(true);
} | Constructs and returns a {@link DisabledSessionException} with an appropriate message explaining why
session creation has been disabled.
@return a new DisabledSessionException with appropriate no creation message
@since 1.2 | getSession | java | theonedev/onedev | server-core/src/main/java/org/apache/shiro/web/servlet/ShiroHttpServletRequest.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/shiro/web/servlet/ShiroHttpServletRequest.java | MIT |
public boolean isRequestedSessionIdValid() {
if (isHttpSessions()) {
return super.isRequestedSessionIdValid();
} else {
Boolean value = (Boolean) getAttribute(REFERENCED_SESSION_ID_IS_VALID);
return (value != null && value.equals(Boolean.TRUE));
}
} | Constructs and returns a {@link DisabledSessionException} with an appropriate message explaining why
session creation has been disabled.
@return a new DisabledSessionException with appropriate no creation message
@since 1.2 | isRequestedSessionIdValid | java | theonedev/onedev | server-core/src/main/java/org/apache/shiro/web/servlet/ShiroHttpServletRequest.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/shiro/web/servlet/ShiroHttpServletRequest.java | MIT |
public boolean isRequestedSessionIdFromCookie() {
if (isHttpSessions()) {
return super.isRequestedSessionIdFromCookie();
} else {
String value = (String) getAttribute(REFERENCED_SESSION_ID_SOURCE);
return value != null && value.equals(COOKIE_SESSION_ID_SOURCE);
... | Constructs and returns a {@link DisabledSessionException} with an appropriate message explaining why
session creation has been disabled.
@return a new DisabledSessionException with appropriate no creation message
@since 1.2 | isRequestedSessionIdFromCookie | java | theonedev/onedev | server-core/src/main/java/org/apache/shiro/web/servlet/ShiroHttpServletRequest.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/shiro/web/servlet/ShiroHttpServletRequest.java | MIT |
public boolean isRequestedSessionIdFromURL() {
if (isHttpSessions()) {
return super.isRequestedSessionIdFromURL();
} else {
String value = (String) getAttribute(REFERENCED_SESSION_ID_SOURCE);
return value != null && value.equals(URL_SESSION_ID_SOURCE);
}
} | Constructs and returns a {@link DisabledSessionException} with an appropriate message explaining why
session creation has been disabled.
@return a new DisabledSessionException with appropriate no creation message
@since 1.2 | isRequestedSessionIdFromURL | java | theonedev/onedev | server-core/src/main/java/org/apache/shiro/web/servlet/ShiroHttpServletRequest.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/shiro/web/servlet/ShiroHttpServletRequest.java | MIT |
public boolean isRequestedSessionIdFromUrl() {
return isRequestedSessionIdFromURL();
} | Constructs and returns a {@link DisabledSessionException} with an appropriate message explaining why
session creation has been disabled.
@return a new DisabledSessionException with appropriate no creation message
@since 1.2 | isRequestedSessionIdFromUrl | java | theonedev/onedev | server-core/src/main/java/org/apache/shiro/web/servlet/ShiroHttpServletRequest.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/shiro/web/servlet/ShiroHttpServletRequest.java | MIT |
public Object getObject() {
return object;
} | Constructs and returns a {@link DisabledSessionException} with an appropriate message explaining why
session creation has been disabled.
@return a new DisabledSessionException with appropriate no creation message
@since 1.2 | getObject | java | theonedev/onedev | server-core/src/main/java/org/apache/shiro/web/servlet/ShiroHttpServletRequest.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/shiro/web/servlet/ShiroHttpServletRequest.java | MIT |
public String getName() {
return getObject().toString();
} | Constructs and returns a {@link DisabledSessionException} with an appropriate message explaining why
session creation has been disabled.
@return a new DisabledSessionException with appropriate no creation message
@since 1.2 | getName | java | theonedev/onedev | server-core/src/main/java/org/apache/shiro/web/servlet/ShiroHttpServletRequest.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/shiro/web/servlet/ShiroHttpServletRequest.java | MIT |
public int hashCode() {
return object.hashCode();
} | Constructs and returns a {@link DisabledSessionException} with an appropriate message explaining why
session creation has been disabled.
@return a new DisabledSessionException with appropriate no creation message
@since 1.2 | hashCode | java | theonedev/onedev | server-core/src/main/java/org/apache/shiro/web/servlet/ShiroHttpServletRequest.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/shiro/web/servlet/ShiroHttpServletRequest.java | MIT |
public boolean equals(Object o) {
if (o instanceof ObjectPrincipal) {
ObjectPrincipal op = (ObjectPrincipal) o;
return getObject().equals(op.getObject());
}
return false;
} | Constructs and returns a {@link DisabledSessionException} with an appropriate message explaining why
session creation has been disabled.
@return a new DisabledSessionException with appropriate no creation message
@since 1.2 | equals | java | theonedev/onedev | server-core/src/main/java/org/apache/shiro/web/servlet/ShiroHttpServletRequest.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/shiro/web/servlet/ShiroHttpServletRequest.java | MIT |
public String toString() {
return object.toString();
} | Constructs and returns a {@link DisabledSessionException} with an appropriate message explaining why
session creation has been disabled.
@return a new DisabledSessionException with appropriate no creation message
@since 1.2 | toString | java | theonedev/onedev | server-core/src/main/java/org/apache/shiro/web/servlet/ShiroHttpServletRequest.java | https://github.com/theonedev/onedev/blob/master/server-core/src/main/java/org/apache/shiro/web/servlet/ShiroHttpServletRequest.java | MIT |
@Override
public boolean compare(Component component, Object b)
{
final Object a = component.getDefaultModelObject();
if (a == null && b == null)
{
return true;
}
if (a == null || b == null)
{
return false;
}
return a.equals(b);
} | Basic model IModelComparator implementation for normal object models | compare | 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 int data_start()
{
return getFlag(FLAG_MODEL_SET) ? 1 : 0;
} | The object that holds the component state.
<p>
What's stored here depends on what attributes are set on component. Data can contains
combination of following attributes:
<ul>
<li>Model (indicated by {@link #FLAG_MODEL_SET})
<li>MetaDataEntry (optionally {@link MetaDataEntry}[] if more metadata entries are present) *
<l... | data_start | 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 int data_length()
{
if (data == null)
{
return 0;
}
else if (data instanceof Object[] && !(data instanceof MetaDataEntry<?>[]))
{
return ((Object[])data).length;
}
else
{
return 1;
}
} | The object that holds the component state.
<p>
What's stored here depends on what attributes are set on component. Data can contains
combination of following attributes:
<ul>
<li>Model (indicated by {@link #FLAG_MODEL_SET})
<li>MetaDataEntry (optionally {@link MetaDataEntry}[] if more metadata entries are present) *
<l... | data_length | 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 Object data_get(int index)
{
if (data == null)
{
return null;
}
else if (data instanceof Object[] && !(data instanceof MetaDataEntry<?>[]))
{
Object[] array = (Object[])data;
return index < array.length ? array[index] : null;
}
else if (index == 0)
{
return data;
}
else
{
ret... | The object that holds the component state.
<p>
What's stored here depends on what attributes are set on component. Data can contains
combination of following attributes:
<ul>
<li>Model (indicated by {@link #FLAG_MODEL_SET})
<li>MetaDataEntry (optionally {@link MetaDataEntry}[] if more metadata entries are present) *
<l... | data_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 |
final void data_set(int index, Object object)
{
if (index > data_length() - 1)
{
throw new IndexOutOfBoundsException("can not set data at " + index +
" when data_length() is " + data_length());
}
else if (index == 0 && !(data instanceof Object[] && !(data instanceof MetaDataEntry<?>[])))
{
data = o... | The object that holds the component state.
<p>
What's stored here depends on what attributes are set on component. Data can contains
combination of following attributes:
<ul>
<li>Model (indicated by {@link #FLAG_MODEL_SET})
<li>MetaDataEntry (optionally {@link MetaDataEntry}[] if more metadata entries are present) *
<l... | data_set | 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 data_add(Object object)
{
data_insert(-1, object);
} | The object that holds the component state.
<p>
What's stored here depends on what attributes are set on component. Data can contains
combination of following attributes:
<ul>
<li>Model (indicated by {@link #FLAG_MODEL_SET})
<li>MetaDataEntry (optionally {@link MetaDataEntry}[] if more metadata entries are present) *
<l... | data_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 |
final void data_insert(int position, Object object)
{
int currentLength = data_length();
if (position == -1)
{
position = currentLength;
}
if (position > currentLength)
{
throw new IndexOutOfBoundsException("can not insert data at " + position +
" when data_length() is " + currentLength);
}
i... | The object that holds the component state.
<p>
What's stored here depends on what attributes are set on component. Data can contains
combination of following attributes:
<ul>
<li>Model (indicated by {@link #FLAG_MODEL_SET})
<li>MetaDataEntry (optionally {@link MetaDataEntry}[] if more metadata entries are present) *
<l... | data_insert | 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 data_remove(int position)
{
int currentLength = data_length();
if (position > currentLength - 1)
{
throw new IndexOutOfBoundsException();
}
else if (currentLength == 1)
{
data = null;
}
else if (currentLength == 2)
{
Object[] current = (Object[])data;
if (position == 0)
{
... | The object that holds the component state.
<p>
What's stored here depends on what attributes are set on component. Data can contains
combination of following attributes:
<ul>
<li>Model (indicated by {@link #FLAG_MODEL_SET})
<li>MetaDataEntry (optionally {@link MetaDataEntry}[] if more metadata entries are present) *
<l... | data_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 IMarkupFragment getMarkup()
{
// Markup already determined or preset?
if (markup != null)
{
return markup;
}
// No parent, than check associated markup files
if (parent == null)
{
// Must be a MarkupContainer to have associated markup file
if (this instanceof MarkupContainer)
{
Ma... | Get the Markup associated with the Component. If not subclassed, the parent container is
asked to return the markup of this child component.
<p/>
Components like Panel and Border should return the "calling" markup fragment, e.g.
<code><span wicket:id="myPanel">body</span></code>. You may use
Panel/Border/En... | getMarkup | 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 String getMarkupIdFromMarkup()
{
ComponentTag tag = getMarkupTag();
if (tag != null)
{
String id = tag.getAttribute("id");
if (Strings.isEmpty(id) == false)
{
return id.trim();
}
}
return null;
} | @return The 'id' attribute from the associated markup tag | getMarkupIdFromMarkup | 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 setMarkup(final IMarkupFragment markup)
{
this.markup = markup;
return this;
} | Set the markup for the component. Note that the component's markup variable is transient and
thus must only be used for one render cycle. E.g. auto-component are using it. You may also
it if you subclassed getMarkup().
@param markup | setMarkup | 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 onInitialize()
{
setRequestFlag(RFLAG_INITIALIZE_SUPER_CALL_VERIFIED, true);
} | This method is meant to be used as an alternative to initialize components. Usually the
component's constructor is used for this task, but sometimes a component cannot be
initialized in isolation, it may need to access its parent component or its markup in order
to fully initialize. This method is invoked once per comp... | onInitialize | 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 boolean isInitialized()
{
return getFlag(FLAG_INITIALIZED);
} | Checks if the component has been initialized - {@link #onInitialize()} has been called
@return {@code true} if component has been initialized | isInitialized | 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 void internalInitialize()
{
fireInitialize();
} | THIS METHOD IS NOT PART OF THE PUBLIC API, DO NOT CALL IT
Used to call {@link #onInitialize()} | internalInitialize | 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 afterRender()
{
try
{
setFlag(FLAG_AFTER_RENDERING, true);
// always detach children because components can be attached
// independently of their parents
onAfterRenderChildren();
onAfterRender();
getApplication().getComponentOnAfterRenderListeners().onAfterRender(this);
if ... | Called on every component after the page is rendered. It will call onAfterRender for it self
and its children. | afterRender | 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 beforeRender()
{
ComponentContext.push(new ComponentContext(this));
try {
if (this instanceof IFeedback)
{
// this component is a feedback. Feedback must be initialized last, so that
// they can collect messages from other components
List<Component> feedbacks = getRequestCycle()... | Called for every component when the page is getting to be rendered. it will call
{@link #configure()} and {@link #onBeforeRender()} for this component and all the child
components | beforeRender | 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 component(Component feedback, IVisit<Void> visit)
{
feedback.beforeRender();
// don't need to go deeper,
// as the feedback will visit its children on its own
visit.dontGoDeeper();
} | Called for every component when the page is getting to be rendered. it will call
{@link #configure()} and {@link #onBeforeRender()} for this component and all the child
components | component | 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 configure()
{
if (!getRequestFlag(RFLAG_CONFIGURED))
{
clearEnabledInHierarchyCache();
clearVisibleInHierarchyCache();
onConfigure();
for (Behavior behavior : getBehaviors())
{
if (isBehaviorAccepted(behavior))
{
behavior.onConfigure(this);
}
}
// check auth... | Triggers {@link #onConfigure()} to be invoked on this component if it has not already during
this request.
<p>
This method should be invoked before any calls to {@link #isVisible()} or
{@link #isEnabled()}. Usually this method will be called by the framework before the
component is rendered and so users should not need... | configure | 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 continueToOriginalDestination()
{
RestartResponseAtInterceptPageException.continueToOriginalDestination();
} | Redirects to any intercept page previously specified by a call to {@link #redirectToInterceptPage(Page)}.
The redirect is done by throwing an exception. If there is no intercept page no exception
will be thrown and the program flow will continue uninterrupted.
Example:
<pre>
add(new Link("login")
{
protect... | continueToOriginalDestination | 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 clearOriginalDestination()
{
RestartResponseAtInterceptPageException.clearOriginalDestination();
} | Clears any data about previously intercepted page. | clearOriginalDestination | 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 debug(final Serializable message)
{
getFeedbackMessages().debug(this, message);
addStateChange();
} | Registers a debug feedback message for this component
@param message
The feedback message | debug | 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 internalOnRemove()
{
setFlag(FLAG_REMOVING_FROM_HIERARCHY, true);
onRemove();
setFlag(FLAG_REMOVED, true);
if (getFlag(FLAG_REMOVING_FROM_HIERARCHY))
{
throw new IllegalStateException(Component.class.getName() +
" has not been properly removed from hierachy. Something in the hierarchy of " ... | Signals this Component that it is removed from the Component hierarchy. | internalOnRemove | 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 final void detach()
{
try
{
setFlag(FLAG_DETACHING, true);
onDetach();
if (getFlag(FLAG_DETACHING))
{
throw new IllegalStateException(Component.class.getName() +
" has not been properly detached. Something in the hierarchy of " +
getClass().getName() +
" has not ... | Detaches the component. This is called at the end of the request for all the pages that are
touched in that request. | detach | 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 detachFeedback()
{
FeedbackMessages feedback = getMetaData(FEEDBACK_KEY);
if (feedback != null)
{
feedback.clear(getApplication().getApplicationSettings()
.getFeedbackMessageCleanupFilter());
if (feedback.isEmpty())
{
setMetaData(FEEDBACK_KEY, null);
}
else
{
feedback.... | Detaches the component. This is called at the end of the request for all the pages that are
touched in that request. | detachFeedback | 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 internalDetach()
{
markup = null;
} | Removes the cached markup at the end of the request. For the next request it will be get
either from the parent's markup or from {@link MarkupCache}. | internalDetach | 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 error(final Serializable message)
{
getFeedbackMessages().error(this, message);
addStateChange();
} | Registers an error feedback message for this component
@param message
The feedback message | error | 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 fatal(final Serializable message)
{
getFeedbackMessages().fatal(this, message);
addStateChange();
} | Registers a fatal feedback message for this component
@param message
The feedback message | fatal | 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 <Z> Z findParent(final Class<Z> c)
{
// Start with immediate parent
MarkupContainer current = parent;
// Walk up containment hierarchy
while (current != null)
{
// Is current an instance of this class?
if (c.isInstance(current))
{
return c.cast(current);
}
// Check parent
... | Finds the first container parent of this component of the given class.
@param <Z>
type of parent
@param c
MarkupContainer class to search for
@return First container parent that is an instance of the given class, or null if none can be
found | findParent | 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 MarkupContainer findParentWithAssociatedMarkup()
{
MarkupContainer container = parent;
while (container != null)
{
if (container.getAssociatedMarkup() != null)
{
return container;
}
container = container.getParent();
}
// This should never happen since Page always has associated... | @return The nearest markup container with associated markup | findParentWithAssociatedMarkup | 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 Application getApplication()
{
return Application.get();
} | Gets interface to application that this component is a part of.
@return The application associated with the session that this component is in.
@see Application | getApplication | 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 String getClassRelativePath()
{
return getClass().getName() + PATH_SEPARATOR + getPageRelativePath();
} | @return A path of the form [page-class-name]:[page-relative-path]
@see Component#getPageRelativePath() | getClassRelativePath | 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")
@Override
public <C> IConverter<C> getConverter(Class<C> type) {
IConverter<?> converter = createConverter(type);
if (converter != null) {
return (IConverter<C>) converter;
}
return getApplication().getConverterLocator().getConverter(type);
} | Get the converter that should be used by this component, delegates to
{@link #createConverter(Class)} and then to the application's
{@link IConverterLocator}.
@param type
The type to convert to
@return The converter that should be used by this component | getConverter | 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 IConverter<?> createConverter(Class<?> type) {
return null;
} | Factory method for converters to be used by this component,
returns {@code null} by default.
@param type
The type to convert to
@return a converter to be used by this component | createConverter | 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 getEscapeModelStrings()
{
return getFlag(FLAG_ESCAPE_MODEL_STRINGS);
} | Gets whether model strings should be escaped.
@return Returns whether model strings should be escaped | getEscapeModelStrings | 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 getId()
{
return id;
} | Gets the id of this component.
@return The id of this component | getId | 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 IModel<?> getInnermostModel()
{
return getInnermostModel(getDefaultModel());
} | @return Innermost model for this component | 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 Locale getLocale()
{
if (parent != null)
{
return parent.getLocale();
}
return getSession().getLocale();
} | Gets the locale for this component. By default, it searches its parents for a locale. If no
parents (it's a recursive search) returns a locale, it gets one from the session.
@return The locale to be used for this component
@see Session#getLocale() | getLocale | 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 Localizer getLocalizer()
{
return getApplication().getResourceSettings().getLocalizer();
} | Convenience method to provide easy access to the localizer object within any component.
@return The localizer object | getLocalizer | 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 ComponentTag getMarkupTag()
{
IMarkupFragment markup = getMarkup();
if (markup != null)
{
for (int i = 0; i < markup.size(); i++)
{
MarkupElement elem = markup.get(i);
if (elem instanceof ComponentTag)
{
return (ComponentTag)elem;
}
}
}
return null;
} | Get the first component tag in the associated markup
@return first component tag | getMarkupTag | 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 ValueMap getMarkupAttributes()
{
ComponentTag tag = getMarkupTag();
if (tag != null)
{
ValueMap attrs = new ValueMap(tag.getAttributes());
attrs.makeImmutable();
return attrs;
}
return ValueMap.EMPTY_MAP;
} | THIS IS WICKET INTERNAL ONLY. DO NOT USE IT.
Get a copy of the markup's attributes which are associated with the component.
<p>
Modifications to the map returned don't change the tags attributes. It is just a copy.
<p>
Note: The component must have been added (directly or indirectly) to a container with an
associated ... | getMarkupAttributes | 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 getMarkupId(boolean createIfDoesNotExist)
{
IMarkupIdGenerator markupIdGenerator = getApplication().getMarkupSettings().getMarkupIdGenerator();
String markupId = markupIdGenerator.generateMarkupId(this, createIfDoesNotExist);
return markupId;
} | Retrieves id by which this component is represented within the markup. This is either the id
attribute set explicitly via a call to {@link #setMarkupId(String)}, id attribute defined in
the markup, or an automatically generated id - in that order.
<p>
If no id is set and <code>createIfDoesNotExist</code> is false, this... | getMarkupId | 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 getMarkupId()
{
return getMarkupId(true);
} | Retrieves id by which this component is represented within the markup. This is either the id
attribute set explicitly via a call to {@link #setMarkupId(String)}, id attribute defined in
the markup, or an automatically generated id - in that order.
<p>
If no explicit id is set this function will generate an id value tha... | getMarkupId | 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> M getMetaData(final MetaDataKey<M> key)
{
return key.get(getMetaData());
} | Gets metadata for this component using the given key.
@param <M>
The type of the metadata.
@param key
The key for the data
@return The metadata or null of no metadata was found for the given key
@see MetaDataKey | getMetaData | 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 MetaDataEntry<?>[] getMetaData()
{
MetaDataEntry<?>[] metaData = null;
// index where we should expect the entry
int index = getFlag(FLAG_MODEL_SET) ? 1 : 0;
int length = data_length();
if (index < length)
{
Object object = data_get(index);
if (object instanceof MetaDataEntry<?>[])
{
... | Gets the meta data entries for this component as an array of {@link MetaDataEntry} objects.
@return the meta data entries for this component | getMetaData | 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 IModel<?> getDefaultModel()
{
IModel<?> model = getModelImpl();
// If model is null
if (model == null)
{
// give subclass a chance to lazy-init model
model = initModel();
setModelImpl(model);
}
return model;
} | Gets the model. It returns the object that wraps the backing model.
@return The model | getDefaultModel | 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 Object getDefaultModelObject()
{
final IModel<?> model = getDefaultModel();
if (model != null)
{
try
{
// Get model value for this component.
return model.getObject();
}
catch (Exception ex)
{
// wrap the exception so that it brings info about the component
WicketRunti... | Gets the backing model object. Unlike getDefaultModel().getObject(), this method returns null
for a null model.
@return The backing model object | getDefaultModelObject | 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 String getDefaultModelObjectAsString()
{
return getDefaultModelObjectAsString(getDefaultModelObject());
} | Gets a model object as a string. Depending on the "escape model strings" flag of the
component, the string is either HTML escaped or not. "HTML escaped" meaning that only HTML
sensitive chars are escaped but not all none-ascii chars. Proper HTML encoding should be used
instead. In case you really need a fully escaped m... | getDefaultModelObjectAsString | 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({ "rawtypes", "unchecked" })
public final String getDefaultModelObjectAsString(final Object modelObject)
{
if (modelObject != null)
{
// Get converter
final Class<?> objectClass = modelObject.getClass();
final IConverter converter = getConverter(objectClass);
// Model string from p... | Gets a model object as a string. Depending on the "escape model strings" flag of the
component, the string is either HTML escaped or not. "HTML escaped" meaning that only HTML
sensitive chars are escaped but not all none-ascii chars. Proper HTML encoding should be used
instead. In case you really need a fully escaped m... | getDefaultModelObjectAsString | 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 getOutputMarkupId()
{
return getFlag(FLAG_OUTPUT_MARKUP_ID);
} | Gets whether or not component will output id attribute into the markup. id attribute will be
set to the value returned from {@link Component#getMarkupId()}.
@return whether or not component will output id attribute into the markup | getOutputMarkupId | 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 getOutputMarkupPlaceholderTag()
{
return getFlag(FLAG_PLACEHOLDER);
} | Gets whether or not an invisible component will render a placeholder tag.
@return true if a placeholder tag should be rendered | getOutputMarkupPlaceholderTag | 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 final Page getPage()
{
// Search for nearest Page
final Page page = findPage();
// If no Page was found
if (page == null)
{
// Give up with a nice exception
throw new WicketRuntimeException("No Page found for component " + this);
}
return page;
} | Gets the page holding this component.
@return The page holding this component
@throws WicketRuntimeException
Thrown if component is not yet attached to a Page.
@see #findPage() | getPage | 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 final String getPageRelativePath()
{
return Strings.afterFirstPathComponent(getPath(), PATH_SEPARATOR);
} | Gets the path to this component relative to its containing page, i.e. without leading page
id.
@return The path to this component relative to the page it is in | getPageRelativePath | 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 final MarkupContainer getParent()
{
return parent;
} | Gets any parent container, or null if there is none.
@return Any parent container, or null if there is none | getParent | 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 String getPath()
{
final PrependingStringBuffer buffer = new PrependingStringBuffer(32);
for (Component c = this; c != null; c = c.getParent())
{
if (buffer.length() > 0)
{
buffer.prepend(PATH_SEPARATOR);
}
buffer.prepend(c.getId());
}
return buffer.toString();
} | Gets this component's path.
@return Colon separated path to this component in the component hierarchy | getPath | 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 getRenderBodyOnly()
{
return getFlag(FLAG_RENDER_BODY_ONLY);
} | 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.
@return If true, the component tag will not be printed | getRenderBodyOnly | 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 Request getRequest()
{
RequestCycle requestCycle = getRequestCycle();
if (requestCycle == null)
{
// Happens often with WicketTester when one forgets to call
// createRequestCycle()
throw new WicketRuntimeException("No RequestCycle is currently set!");
}
return requestCycle.getRequest()... | @return The request for this component's active request cycle | getRequest | 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 RequestCycle getRequestCycle()
{
return RequestCycle.get();
} | Gets the active request cycle for this component
@return The request cycle | getRequestCycle | 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 Response getResponse()
{
return getRequestCycle().getResponse();
} | @return The response for this component's active request cycle | getResponse | 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 Session getSession()
{
return Session.get();
} | Gets the current Session object.
@return The Session that this component is in | getSession | 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 long getSizeInBytes()
{
final MarkupContainer originalParent = parent;
parent = null;
long size = 0;
try
{
size = WicketObjects.sizeof(this);
}
catch (Exception e)
{
log.error("Exception getting size for component " + this, e);
}
parent = originalParent;
return size;
} | @return Size of this Component in bytes. Returns {@code 0} - if the size cannot be calculated for some reason | getSizeInBytes | 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 String getString(final String key)
{
return getString(key, null);
} | @param key
Key of string resource in property file
@return The String
@see Localizer | getString | 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 String getString(final String key, final IModel<?> model)
{
return getLocalizer().getString(key, this, model);
} | @param key
The resource key
@param model
The model
@return The formatted string
@see Localizer | getString | 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 String getString(final String key, final IModel<?> model, final String defaultValue)
{
return getLocalizer().getString(key, this, model, defaultValue);
} | @param key
The resource key
@param model
The model
@param defaultValue
A default value if the string cannot be found
@return The formatted string
@see Localizer | getString | 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 getVariation()
{
if (parent != null)
{
return parent.getVariation();
}
return null;
} | Gets the variation string of this component that will be used to look up markup for this
component. Subclasses can override this method to define by an instance what markup variation
should be picked up. By default it will return null or the value of a parent.
@return The variation of this component. | getVariation | 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 hasBeenRendered()
{
return getFlag(FLAG_HAS_BEEN_RENDERED);
} | Gets whether this component was rendered at least once.
@return true if the component has been rendered before, false if it is merely constructed | hasBeenRendered | 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 FeedbackMessages getFeedbackMessages()
{
FeedbackMessages messages = getMetaData(FEEDBACK_KEY);
if (messages == null)
{
messages = new FeedbackMessages();
setMetaData(FEEDBACK_KEY, messages);
}
return messages;
} | Gets feedback messages for this component. This method will instantiate a
{@link FeedbackMessages} instance and add it to the component metadata, even when called on a
component that has no feedback messages, to avoid the overhead use
{@link #hasFeedbackMessage()}
@return feedback messages instance | getFeedbackMessages | 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 hasErrorMessage()
{
FeedbackMessages messages = getMetaData(FEEDBACK_KEY);
if (messages == null)
{
return false;
}
return messages.hasMessage(FeedbackMessage.ERROR);
} | @return True if this component has an error message | hasErrorMessage | 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 hasFeedbackMessage()
{
FeedbackMessages messages = getMetaData(FEEDBACK_KEY);
if (messages == null)
{
return false;
}
return messages.size() > 0;
} | @return True if this component has some kind of feedback message | hasFeedbackMessage | 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 info(final Serializable message)
{
getFeedbackMessages().info(this, message);
addStateChange();
} | Registers an informational feedback message for this component
@param message
The feedback message | info | 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 success(final Serializable message)
{
getFeedbackMessages().success(this, message);
addStateChange();
} | Registers an success feedback message for this component
@param message
The feedback message | success | 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 isActionAuthorized(Action action)
{
IAuthorizationStrategy authorizationStrategy = getSession().getAuthorizationStrategy();
if (authorizationStrategy != null)
{
return authorizationStrategy.isActionAuthorized(this, action);
}
return true;
} | Authorizes an action for a component.
@param action
The action to authorize
@return True if the action is allowed
@throws AuthorizationException
Can be thrown by implementation if action is unauthorized | isActionAuthorized | 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 isEnableAllowed()
{
return isActionAuthorized(ENABLE);
} | @return true if this component is authorized to be enabled, false otherwise | isEnableAllowed | 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 isEnabled()
{
return getFlag(FLAG_ENABLED);
} | Gets 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.
@return Whether this component is enabled. | isEnabled | 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 isRenderAllowed()
{
return getFlag(FLAG_IS_RENDER_ALLOWED);
} | Checks the security strategy if the {@link Component#RENDER} action is allowed on this
component
@return ture if {@link Component#RENDER} action is allowed, false otherwise | isRenderAllowed | 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 isStateless()
{
if (
// the component is either invisible or disabled
(isVisibleInHierarchy() && isEnabledInHierarchy()) == false &&
// and it can't call listener interfaces
canCallListenerInterface(null) == false)
{
// then pretend the component is stateless
return true;
}
... | Returns if the component is stateless or not. It checks the stateless hint if that is false
it returns directly false. If that is still true it checks all its behaviors if they can be
stateless.
@return whether the component is stateless. | isStateless | 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 isVersioned()
{
// Is the component itself versioned?
if (!getFlag(FLAG_VERSIONED))
{
return false;
}
else
{
// If there's a parent and this component is versioned
if (parent != null)
{
// Check if the parent is unversioned. If any parent
// (recursively) is unversioned, ... | @return {@code true} if this component should notify its holding page about changes in its
state. If a {@link Page} is not versioned then it wont track changes in its
components and will use the same {@link Page#getPageId()} during its lifetime | isVersioned | 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 isVisible()
{
return getFlag(FLAG_VISIBLE);
} | Gets whether this component and any children are visible.
<p>
WARNING: this method can be called multiple times during a request. If you override this
method, it is a good idea to keep it cheap in terms of processing. Alternatively, you can
call {@link #setVisible(boolean)}.
<p>
@return True if component and any child... | isVisible | 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 isVisibleInHierarchy()
{
Component parent = getParent();
if (parent != null && !parent.isVisibleInHierarchy())
{
return false;
}
else
{
return determineVisibility();
}
} | Checks if the component itself and all its parents are visible.
@return true if the component and all its parents are visible. | isVisibleInHierarchy | 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 markRendering(boolean setRenderingFlag)
{
internalMarkRendering(setRenderingFlag);
} | THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT USE IT!
Sets the RENDERING flag and removes the PREPARED_FOR_RENDER flag on component and it's
children.
@param setRenderingFlag
if this is false only the PREPARED_FOR_RENDER flag is removed from component, the
RENDERING flag is not set.
... | markRendering | 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 modelChanged()
{
// Call user code
internalOnModelChanged();
onModelChanged();
} | Called to indicate that the model content for this component has been changed | modelChanged | 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 modelChanging()
{
checkHierarchyChange(this);
// Call user code
onModelChanging();
// Tell the page that our model changed
final Page page = findPage();
if (page != null)
{
page.componentModelChanging(this);
}
} | Called to indicate that the model content for this component is about to change | modelChanging | 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 void internalPrepareForRender(boolean setRenderingFlag)
{
beforeRender();
if (setRenderingFlag)
{
// only process feedback panel when we are about to be rendered.
// setRenderingFlag is false in case prepareForRender is called only to build component
// hierarchy (i.e. in BookmarkableListenerInt... | THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT USE IT!
<p>
Prepares the component and it's children for rendering. On whole page render this method must
be called on the page. On AJAX request, this method must be called on the updated component.
@param setRenderingFlag
Whether to set the rendering... | internalPrepareForRender | 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 prepareForRender()
{
internalPrepareForRender(true);
} | THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT USE IT!
Prepares the component and it's children for rendering. On whole page render this method must
be called on the page. On AJAX request, this method must be called on updated component. | prepareForRender | 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 redirectToInterceptPage(final Page page)
{
throw new RestartResponseAtInterceptPageException(page);
} | Redirects browser to an intermediate page such as a sign-in page. The current request's URL
is saved for future use by method {@link #continueToOriginalDestination()}; only use this method when
you plan to continue to the current URL at some later time; otherwise just set a new response page.
@param page
Th... | redirectToInterceptPage | 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 internalRender()
{
// Make sure there is a markup available for the Component
IMarkupFragment markup = getMarkup();
if (markup == null)
{
throw new MarkupNotFoundException("Markup not found for Component: " + toString());
}
// MarkupStream is an Iterator for the markup
MarkupStream marku... | Performs a render of this component as part of a Page level render process. | internalRender | 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 onException(final RuntimeException ex)
{
// Call each behaviors onException() to allow the
// behavior to clean up
for (Behavior behavior : getBehaviors())
{
if (isBehaviorAccepted(behavior))
{
try
{
behavior.onException(this, ex);
}
catch (Exception ex2)
{
log.... | Called when a runtime exception is caught during the render process
@param ex
The exception caught. | onException | 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 renderPlaceholderTag(final ComponentTag tag, final Response response)
{
String ns = Strings.isEmpty(tag.getNamespace()) ? null : tag.getNamespace() + ':';
response.write("<");
if (ns != null)
{
response.write(ns);
}
response.write(tag.getName());
response.write(" id=\"");
response.wr... | Renders a placeholder tag for the component when it is invisible and
{@link #setOutputMarkupPlaceholderTag(boolean)} has been called with <code>true</code>.
@param tag
component tag
@param response
response | renderPlaceholderTag | 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 String getAjaxRegionMarkupId()
{
String markupId = null;
for (Behavior behavior : getBehaviors())
{
if (behavior instanceof IAjaxRegionMarkupIdProvider && behavior.isEnabled(this))
{
markupId = ((IAjaxRegionMarkupIdProvider)behavior).getAjaxRegionMarkupId(this);
break;
}
}
if (m... | Returns the id of the markup region that will be updated via ajax. This can be different to
the markup id of the component if a {@link IAjaxRegionMarkupIdProvider} behavior has been
added.
@return the markup id of the region to be updated via ajax. | getAjaxRegionMarkupId | 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 boolean needToRenderTag(final ComponentTag openTag)
{
// If a open-close tag has been modified to be open-body-close then a
// synthetic close tag must be rendered.
boolean renderTag = (openTag != null && !(openTag instanceof WicketTag));
if (renderTag == false)
{
renderTag = !getApplication().get... | @param openTag
@return true, if the tag shall be rendered | needToRenderTag | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.