/** * * @param link * @return Url */ public Url urlFor(final AjaxLink<?> link) { AbstractAjaxBehavior behavior = WicketTesterHelper.findAjaxEventBehavior(link, "click"); Url url = Url.parse(behavior.getCallbackUrl().toString(), Charset.forName(request.getCharacterEncoding())); return transform(url); }
/** * * @param link * @return Url */ public Url urlFor(final AjaxLink<?> link) { AbstractAjaxBehavior behavior = WicketTesterHelper.findAjaxEventBehavior(link, "click"); Url url = Url.parse(behavior.getCallbackUrl().toString(), Charset.forName(request.getCharacterEncoding())); return transform(url); }
/** * Starts a page, a shared resource or a {@link IRequestListener} depending on what the * {@link IRequestMapper}s resolve for the passed url. * * @param _url * the url to resolve and execute */ public void executeUrl(final String _url) { Url url = Url.parse(_url, Charset.forName(request.getCharacterEncoding())); transform(url); getRequest().setUrl(url); processRequest(); }
/** * Starts a page, a shared resource or a {@link IRequestListener} depending on what the * {@link IRequestMapper}s resolve for the passed url. * * @param _url * the url to resolve and execute */ public void executeUrl(final String _url) { Url url = Url.parse(_url, Charset.forName(request.getCharacterEncoding())); transform(url); getRequest().setUrl(url); processRequest(); }
/** * Submits the {@link Form} in the last rendered {@link Page}. * <p> * <strong>Note</strong>: Form request parameters have to be set explicitely. * * @param path * path to component */ public void submitForm(String path) { Form<?> form = (Form<?>)getComponentFromLastRenderedPage(path); Url url = Url.parse( form.getRootForm() .urlForListener(new PageParameters()) .toString(), Charset.forName(request.getCharacterEncoding())); // make url absolute transform(url); request.setUrl(url); processRequest(); }
/** * Submits the {@link Form} in the last rendered {@link Page}. * <p> * <strong>Note</strong>: Form request parameters have to be set explicitely. * * @param path * path to component */ public void submitForm(String path) { Form<?> form = (Form<?>)getComponentFromLastRenderedPage(path); Url url = Url.parse(form.getRootForm().urlForListener(new PageParameters()).toString(), Charset.forName(request.getCharacterEncoding())); // make url absolute transform(url); request.setUrl(url); processRequest(); }
Charset.forName(request.getCharacterEncoding())); transform(url); request.setUrl(url);
Charset.forName(request.getCharacterEncoding())); transform(url); request.setUrl(url);
Charset.forName(request.getCharacterEncoding()));
Url url = Url.parse(_url, Charset.forName(request.getCharacterEncoding())); request.setUrl(url); request.setMethod(method);
Charset.forName(request.getCharacterEncoding()));