Example usage for org.apache.wicket.request.mapper.parameter PageParametersEncoder PageParametersEncoder

List of usage examples for org.apache.wicket.request.mapper.parameter PageParametersEncoder PageParametersEncoder

Introduction

In this page you can find the example usage for org.apache.wicket.request.mapper.parameter PageParametersEncoder PageParametersEncoder.

Prototype

public PageParametersEncoder() 

Source Link

Document

Construct.

Usage

From source file:codetroopers.wicket.web.routes.mapper.ParamCheckingPatternMapper.java

License:Apache License

public ParamCheckingPatternMapper(final String mountPath, final Class<? extends IRequestablePage> pageClass,
        final List<MountParameter> mountParameters) {
    this(mountPath, pageClass, new PageParametersEncoder(), mountParameters);
}

From source file:codetroopers.wicket.web.routes.mapper.ParamCheckingPatternMapper.java

License:Apache License

public ParamCheckingPatternMapper(final String mountPath,
        final ClassProvider<? extends IRequestablePage> pageClassProvider) {
    this(mountPath, pageClassProvider, new PageParametersEncoder(), null);
}

From source file:dk.teachus.frontend.TeachUsApplication.java

License:Apache License

private void mountPages() {
    mountPage("/signout", SignOutPage.class); //$NON-NLS-1$
    mountPage("/signedout", SignedOutPage.class); //$NON-NLS-1$
    mountPage("/calendar", PupilCalendarPage.class);
    mountPage("/calendar/teacher", TeacherCalendarPage.class);
    mountPage("/pupils", PupilsPage.class);
    mountPage("/teachers", TeachersPage.class);
    mountPage("/settings/profile", TeacherSettingsPage.class); //$NON-NLS-1$
    mountPage("/settings/welcomemail", WelcomeMailSettingsPage.class); //$NON-NLS-1$
    mountPage("/settings/invalidbookings", InvalidBookingsPage.class); //$NON-NLS-1$
    mountPage("/admins", AdminsPage.class);
    mountPage("/periods", PeriodsPage.class); //$NON-NLS-1$
    mountPage("/agenda", AgendaPage.class); //$NON-NLS-1$
    mountPage("/payment", PaymentPage.class); //$NON-NLS-1$
    mountPage("/stats/incomeperpupil", IncomePerPupilPage.class);
    mountPage("/stats/incomepermonth", IncomePerMonthPage.class); //$NON-NLS-1$
    mountPage("/stats/teacherssummary", TeachersSummaryPage.class); //$NON-NLS-1$
    mountPage("/stats/teacherslog", TeachersLogPage.class); //$NON-NLS-1$
    mountPage("/info", InfoPage.class); //$NON-NLS-1$
    mountPage("/globalsettings", ApplicationConfigurationPage.class); //$NON-NLS-1$
    mountPage("/messages", SentMessagesPage.class); //$NON-NLS-1$
    mountPage("/messages/create", CreateMessagePage.class); //$NON-NLS-1$

    mount(new ResourceMapper("/ical", IcalResource.RESOURCE, new PageParametersEncoder()));
}

From source file:fiftyfive.wicket.mapper.PatternMountedMapper.java

License:Apache License

/**
 * @see MountedMapper#MountedMapper(String, Class)
 *//*from w  w  w. ja  v a  2  s.c o m*/
public PatternMountedMapper(String mountPath, Class<? extends IRequestablePage> pageClass) {
    this(mountPath, pageClass, new PageParametersEncoder());
}

From source file:fiftyfive.wicket.mapper.PatternMountedMapper.java

License:Apache License

/**
 * @see MountedMapper#MountedMapper(String, ClassProvider)
 *//*from w w w.j a  v  a 2 s  .c om*/
public PatternMountedMapper(String mountPath, ClassProvider<? extends IRequestablePage> pageClassProvider) {
    this(mountPath, pageClassProvider, new PageParametersEncoder());
}

From source file:fiftyfive.wicket.resource.MergedResourceBuilder.java

License:Apache License

/**
 * Constructs and returns a special merged resource request mapper using the path and resources
 * options specified in this builder.//from ww w.  ja va 2 s  . c om
 * <p>
 * This method may only be called after all of the options have been set.
 * <p>
 * Use this method if your application has a complex configuration that requires you to deal
 * with request mappers directly (e.g. you need to wrap or combine them in clever ways).
 * Most applications will be better served by {@link #install install()}, which
 * handles creating the mapper and mounting it in one easy step.
 * 
 * @throws IllegalStateException if a path or resources have not been
 *         specified prior to calling this method.
 *
 * @since 3.0
 */
public IRequestMapper buildRequestMapper(final WebApplication app) {
    if (!this.frozen)
        assertRequiredOptionsAndFreeze();

    return new MergedResourceMapper(this.path, this.references, new PageParametersEncoder(),
            new IProvider<IResourceCachingStrategy>() {
                public IResourceCachingStrategy get() {
                    return app.getResourceSettings().getCachingStrategy();
                }
            });
}

From source file:kz.supershiny.web.wicket.TiresPageMapper.java

public TiresPageMapper(String mountPath, Class<? extends IRequestablePage> pageClass) {
    super(mountPath, pageClass, new PageParametersEncoder());
}

From source file:org.apache.openmeetings.web.room.SwfPanel.java

License:Apache License

public String getInitFunction(PageParameters pp) {
    String initStr = null;//  w w  w. j  a  va2 s .  c o  m
    StringValue type = pp.get(SWF);
    String swf = getFlashFile(type);
    if (!Strings.isEmpty(swf)) {
        String lbls = null;
        if (SWF_TYPE_NETWORK.equals(type.toString())) {
            lbls = getStringLabels("network.test.ms", "network.test.mb", "network.test.sec",
                    "network.test.click.play", "network.test.copy.log", "network.test.report",
                    "network.test.report.start", "network.test.report.error", "network.test.report.con.err",
                    "network.test.ping", "network.test.ping.avg", "network.test.ping.rcv",
                    "network.test.ping.lost", "network.test.ping.load", "network.test.port",
                    "network.test.port.avail", "network.test.port.stopped", "network.test.jitter",
                    "network.test.jitter.avg", "network.test.jitter.min", "network.test.jitter.max",
                    "network.test.dwn", "network.test.dwn.bytes", "network.test.dwn.time",
                    "network.test.dwn.speed", "network.test.upl", "network.test.upl.bytes",
                    "network.test.upl.time", "network.test.upl.speed");
        } else if (SWF_TYPE_SETTINGS.equals(type.toString())) {
            lbls = getStringLabels("448", "449", "450", "451", "758", "447", "52", "53", "1429", "1430", "775",
                    "452", "767", "764", "765", "918", "54", "761", "762", "144", "203", "642", "save.success");
        }
        initStr = String.format("var labels = %s; initSwf(%s);", lbls, new JSONObject()
                .put("src", swf + new PageParametersEncoder().encodePageParameters(pp)).toString());
    }
    return initStr;
}

From source file:org.apache.openmeetings.web.user.rooms.RoomPanel.java

License:Apache License

public RoomPanel(String id, PageParameters pp) {
    super(id);//ww  w  .ja va 2  s  .c o  m

    StringValue swfVal = pp.get("swf");
    String swf = (swfVal.isEmpty() ? getFlashFile() : swfVal.toString())
            + new PageParametersEncoder().encodePageParameters(pp);
    add(new Label("init", String.format("initSwf('%s');", swf)).setEscapeModelStrings(false));
}

From source file:org.hippoecm.frontend.plugins.login.LoginPlugin.java

License:Apache License

@Override
protected void onBeforeRender() {
    super.onBeforeRender();

    Request request = RequestCycle.get().getRequest();

    /**/*  w ww .ja  v  a2 s.co  m*/
     * Strip the first query parameter from URL if it is empty
     * Copied from {@link AbstractComponentMapper#removeMetaParameter}
     */
    Url urlCopy = new Url(request.getUrl());
    if (!urlCopy.getQueryParameters().isEmpty()
            && Strings.isEmpty(urlCopy.getQueryParameters().get(0).getValue())) {
        String pageComponentInfoCandidate = urlCopy.getQueryParameters().get(0).getName();
        if (PageComponentInfo.parse(pageComponentInfoCandidate) != null) {
            urlCopy.getQueryParameters().remove(0);
        }
    }

    parameters = new PageParametersEncoder().decodePageParameters(urlCopy);
}