/** * Gets the url that references this handler. * * @param onlyTargetActivePage * if true the callback to this behavior will be ignore if the page is not the last * one the user accessed * * @return the url that references this handler */ public CharSequence getCallbackUrl(final boolean onlyTargetActivePage) { if (getComponent() == null) { throw new IllegalArgumentException( "Behavior must be bound to a component to create the URL"); } final RequestListenerInterface rli; if (onlyTargetActivePage) { rli = IActivePageBehaviorListener.INTERFACE; } else { rli = IBehaviorListener.INTERFACE; } return getComponent().urlFor(this, rli); }
/** * Gets the url that references this handler. * * @param onlyTargetActivePage * if true the callback to this behavior will be ignore if the page is not the last * one the user accessed * * @return the url that references this handler */ public CharSequence getCallbackUrl(final boolean onlyTargetActivePage) { if (getComponent() == null) { throw new IllegalArgumentException( "Behavior must be bound to a component to create the URL"); } final RequestListenerInterface rli; if (onlyTargetActivePage) { rli = IActivePageBehaviorListener.INTERFACE; } else { rli = IBehaviorListener.INTERFACE; } return getComponent().urlFor(this, rli); }
/** * Gets the url that references this handler. * * @return the url that references this handler */ public CharSequence getCallbackUrl() { Component component = getComponent(); if (component == null) { throw new IllegalArgumentException( "Behavior must be bound to a component to create the URL"); } PageParameters parameters = new PageParameters(); PageParameters pageParameters = component.getPage().getPageParameters(); List<INamedParameters.NamedPair> allNamedInPath = pageParameters.getAllNamedByType(INamedParameters.Type.PATH); for (INamedParameters.NamedPair namedPair : allNamedInPath) { parameters.add(namedPair.getKey(), namedPair.getValue(), INamedParameters.Type.PATH); } return getComponent().urlForListener(this, parameters); }
/** * Gets the url that references this handler. * * @return the url that references this handler */ public CharSequence getCallbackUrl() { Component component = getComponent(); if (component == null) { throw new IllegalArgumentException( "Behavior must be bound to a component to create the URL"); } PageParameters parameters = new PageParameters(); PageParameters pageParameters = component.getPage().getPageParameters(); List<INamedParameters.NamedPair> allNamedInPath = pageParameters.getAllNamedByType(INamedParameters.Type.PATH); for (INamedParameters.NamedPair namedPair : allNamedInPath) { parameters.add(namedPair.getKey(), namedPair.getValue(), INamedParameters.Type.PATH); } return getComponent().urlForListener(this, parameters); }