org.apache.wicket.ajax
Class AjaxNewWindowNotifyingBehavior

java.lang.Object
  extended by org.apache.wicket.behavior.Behavior
      extended by org.apache.wicket.behavior.AbstractAjaxBehavior
          extended by org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
              extended by org.apache.wicket.ajax.AjaxNewWindowNotifyingBehavior
All Implemented Interfaces:
Serializable, IBehaviorListener, IComponentAwareEventSink, IRequestListener, IComponentAwareHeaderContributor, IClusterable

public abstract class AjaxNewWindowNotifyingBehavior
extends AbstractDefaultAjaxBehavior

An Ajax behavior that notifies when a new browser window/tab is opened with url to a page instance which is already opened in another window/tab in the same user session. Note: this behavior may be assigned only to an instance of a WebPage class.

Since:
6.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
INDICATOR
 
Fields inherited from interface org.apache.wicket.behavior.IBehaviorListener
INTERFACE
 
Constructor Summary
AjaxNewWindowNotifyingBehavior()
          Constructor.
AjaxNewWindowNotifyingBehavior(String windowName)
          Constructor.
 
Method Summary
protected  void onBind()
          Subclasses should call super.onBind()
protected abstract  void onNewWindow(AjaxRequestTarget target)
          A callback method when a new window/tab is opened for a page instance which is already opened in another window/tab.
 void renderHead(Component component, IHeaderResponse response)
          Render to the web response whatever the component wants to contribute to the head section.
protected  void respond(AjaxRequestTarget target)
           
protected  void updateAjaxAttributes(AjaxRequestAttributes attributes)
          Gives a chance to the specializations to modify the attributes.
 
Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
findIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, getChannel, getFailureScript, getPreconditionScript, getSuccessScript, onRequest, postprocessConfiguration, renderAjaxAttributes, renderAjaxAttributes
 
Methods inherited from class org.apache.wicket.behavior.AbstractAjaxBehavior
afterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onComponentTag, onUnbind, unbind
 
Methods inherited from class org.apache.wicket.behavior.Behavior
beforeRender, canCallListenerInterface, detach, getStatelessHint, isEnabled, isTemporary, onConfigure, onEvent, onException, onRemove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AjaxNewWindowNotifyingBehavior

public AjaxNewWindowNotifyingBehavior()
Constructor.


AjaxNewWindowNotifyingBehavior

public AjaxNewWindowNotifyingBehavior(String windowName)
Constructor.

Parameters:
windowName - the custom name to use for the page's window
Method Detail

onBind

protected final void onBind()
Description copied from class: AbstractDefaultAjaxBehavior
Subclasses should call super.onBind()

Overrides:
onBind in class AbstractDefaultAjaxBehavior
See Also:
AbstractAjaxBehavior.onBind()

updateAjaxAttributes

protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
Description copied from class: AbstractDefaultAjaxBehavior
Gives a chance to the specializations to modify the attributes.

Overrides:
updateAjaxAttributes in class AbstractDefaultAjaxBehavior

renderHead

public void renderHead(Component component,
                       IHeaderResponse response)
Description copied from class: Behavior
Render to the web response whatever the component wants to contribute to the head section.

Specified by:
renderHead in interface IComponentAwareHeaderContributor
Overrides:
renderHead in class AbstractDefaultAjaxBehavior
Parameters:
component - component which is contributing to the response. This parameter is here to give the component as the context for component-awares implementing this interface
response - Response object
See Also:
Behavior.renderHead(Component, org.apache.wicket.markup.head.IHeaderResponse)

respond

protected void respond(AjaxRequestTarget target)
Specified by:
respond in class AbstractDefaultAjaxBehavior
Parameters:
target - The AJAX target

onNewWindow

protected abstract void onNewWindow(AjaxRequestTarget target)
A callback method when a new window/tab is opened for a page instance which is already opened in another window/tab.

Parameters:
target - the current ajax request handler


Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.