Package org.wicketstuff.urlfragment
Class UrlParametersReceivingBehavior
- java.lang.Object
-
- org.apache.wicket.behavior.Behavior
-
- org.apache.wicket.behavior.AbstractAjaxBehavior
-
- org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
-
- org.wicketstuff.urlfragment.UrlParametersReceivingBehavior
-
- All Implemented Interfaces:
Serializable,IComponentAwareEventSink,IRequestListener,IComponentAwareHeaderContributor,IClusterable
public abstract class UrlParametersReceivingBehavior extends AbstractDefaultAjaxBehavior
Reads URL fragment parameters. ThisBehaviorwill execute an AJAX call to itself with the URL query and fragment parameters.- Author:
- Martin Knopf
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static JavaScriptHeaderItemJS_REF-
Fields inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
INDICATOR
-
-
Constructor Summary
Constructors Constructor Description UrlParametersReceivingBehavior(Map<String,String> options, Component... components)Constructor that takes an array ofComponents which will be added to theAjaxRequestTargetfor you when the URL parameters come in.UrlParametersReceivingBehavior(Component... components)Constructor that takes an array ofComponents which will be added to theAjaxRequestTargetfor you when the URL parameters come in.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidonParameterArrival(IRequestParameters requestParameters, AjaxRequestTarget target)Hook for evaluating the request parameters when they come in.voidrenderHead(Component component, IHeaderResponse response)protected voidrespond(AjaxRequestTarget target)protected voidupdateAjaxAttributes(AjaxRequestAttributes attributes)-
Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
findIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, onBind, onMethodMismatch, 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, canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onConfigure, onEvent, onException, onRemove, onTag
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.wicket.IRequestListener
rendersPage
-
-
-
-
Field Detail
-
JS_REF
protected static final JavaScriptHeaderItem JS_REF
-
-
Constructor Detail
-
UrlParametersReceivingBehavior
public UrlParametersReceivingBehavior(Component... components)
Constructor that takes an array ofComponents which will be added to theAjaxRequestTargetfor you when the URL parameters come in.- Parameters:
components- the components you wish to add to the request target when the income of the URL fragment parameters is handled
-
UrlParametersReceivingBehavior
public UrlParametersReceivingBehavior(Map<String,String> options, Component... components)
Constructor that takes an array ofComponents which will be added to theAjaxRequestTargetfor you when the URL parameters come in.- Parameters:
options- JS options to customize the behaviorcomponents- the components you wish to add to the request target when the income of the URL fragment parameters is handled
-
-
Method Detail
-
renderHead
public void renderHead(Component component, IHeaderResponse response)
- Specified by:
renderHeadin interfaceIComponentAwareHeaderContributor- Overrides:
renderHeadin classAbstractDefaultAjaxBehavior
-
respond
protected void respond(AjaxRequestTarget target)
- Specified by:
respondin classAbstractDefaultAjaxBehavior
-
updateAjaxAttributes
protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
- Overrides:
updateAjaxAttributesin classAbstractDefaultAjaxBehavior
-
onParameterArrival
protected abstract void onParameterArrival(IRequestParameters requestParameters, AjaxRequestTarget target)
Hook for evaluating the request parameters when they come in.- Parameters:
requestParameters- use this to obtain the values of your URL fragment parameterstarget- use this like in any other ajax callback
-
-