|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.markup.html.WebMarkupContainer
org.apache.wicket.markup.html.panel.Panel
org.apache.wicket.extensions.ajax.markup.html.AjaxLazyLoadPanel
public abstract class AjaxLazyLoadPanel
A panel where you can lazy load another panel. This can be used if you have a panel/component that is pretty heavy in creation and you first want to show the user the page and then replace the panel when it is ready.
| Field Summary | |
|---|---|
static String |
LAZY_LOAD_COMPONENT_ID
The component id which will be used to load the lazily loaded component. |
| Fields inherited from class org.apache.wicket.markup.html.panel.Panel |
|---|
PANEL |
| Fields inherited from class org.apache.wicket.Component |
|---|
ENABLE, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER |
| Constructor Summary | |
|---|---|
AjaxLazyLoadPanel(String id)
Constructor |
|
AjaxLazyLoadPanel(String id,
IModel<?> model)
Constructor |
|
| Method Summary | |
|---|---|
abstract Component |
getLazyLoadComponent(String markupId)
|
Component |
getLoadingComponent(String markupId)
|
protected void |
handleCallbackScript(IHeaderResponse response,
CharSequence callbackScript,
Component component)
Allows subclasses to change the callback script if needed. |
protected void |
onBeforeRender()
Called just before a component is rendered. |
protected void |
onComponentLoaded(Component target,
AjaxRequestTarget component)
Called when the placeholder component is replaced with the lazy loaded one. |
protected void |
updateAjaxAttributes(AjaxRequestAttributes attributes)
|
| Methods inherited from class org.apache.wicket.markup.html.panel.Panel |
|---|
newMarkupSourcingStrategy |
| Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer |
|---|
getWebPage, getWebRequest, getWebResponse, getWebSession |
| Methods inherited from class org.apache.wicket.MarkupContainer |
|---|
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onComponentTagBody, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String LAZY_LOAD_COMPONENT_ID
| Constructor Detail |
|---|
public AjaxLazyLoadPanel(String id)
id -
public AjaxLazyLoadPanel(String id,
IModel<?> model)
id - model - | Method Detail |
|---|
protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
protected void handleCallbackScript(IHeaderResponse response,
CharSequence callbackScript,
Component component)
response - the current response that writes to the headercallbackScript - the JavaScript to write in the headercomponent - the component which produced the callback scriptprotected void onBeforeRender()
Component
NOTE: If you override this, you *must* call super.onBeforeRender() within
your implementation.
Because this method is responsible for cascading Component.onBeforeRender() call to its
children it is strongly recommended that super call is made at the end of the override.
onBeforeRender in class ComponentComponent.onBeforeRender()public abstract Component getLazyLoadComponent(String markupId)
markupId - The components markupid.
protected void onComponentLoaded(Component target,
AjaxRequestTarget component)
target - The Ajax request handlercomponent - The lazy loaded component.public Component getLoadingComponent(String markupId)
markupId - The components markupid.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||