Example usage for org.apache.wicket.ajax AjaxClientInfoBehavior AjaxClientInfoBehavior

List of usage examples for org.apache.wicket.ajax AjaxClientInfoBehavior AjaxClientInfoBehavior

Introduction

In this page you can find the example usage for org.apache.wicket.ajax AjaxClientInfoBehavior AjaxClientInfoBehavior.

Prototype

public AjaxClientInfoBehavior() 

Source Link

Document

Constructor.

Usage

From source file:org.apache.openmeetings.web.pages.auth.SignInDialog.java

License:Apache License

public SignInDialog(String id) {
    super(id, Application.getString(108));
    add(form = new SignInForm("signin"));
    add(new AjaxClientInfoBehavior());
}

From source file:org.apache.openmeetings.web.pages.install.InstallWizardPage.java

License:Apache License

public InstallWizardPage() {
    if (Application.isInstalled()) {
        throw new RestartResponseException(Application.get().getHomePage());
    }/*from  w ww  . j a v  a 2  s  . c  o  m*/
    add(wizard = new InstallWizard("wizard", getString("install.wizard.install.header")));
    // This code is required to detect time zone offset
    add(new AjaxClientInfoBehavior() {
        private static final long serialVersionUID = 1L;

        @Override
        protected void onClientInfo(AjaxRequestTarget target, WebClientInfo clientInfo) {
            super.onClientInfo(target, clientInfo);
            wizard.initTzDropDown();
            wizard.open(target);
        }
    });
}

From source file:org.bosik.diacomp.web.frontend.wicket.pages.master.MasterPage.java

License:Open Source License

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

    try {/*from  w  w  w. ja va2  s.  co  m*/
        String userName = userInfoService.getCurrentUserName();
        add(new Menu("menu", Model.of(getMenu(true, userName))));
        add(new AjaxClientInfoBehavior() {
            private static final long serialVersionUID = -4339758661303499417L;

            @Override
            protected void onClientInfo(AjaxRequestTarget target, WebClientInfo info) {
                super.onClientInfo(target, info);
            }
        });
    } catch (NotAuthorizedException e) {
        add(new Menu("menu", Model.of(getMenu(false, ""))));
    }

    add(new Label("pageTitle", getString("res.appTitle")));

    String buildTime = Config.get(Config.KEY_BUILD_TIME);
    String buildCommit = Config.get(Config.KEY_BUILD_COMMIT);
    String timeZone = getTimeZone().getDisplayName();
    String info = String.format("%s %s / %s", buildTime, buildCommit, timeZone);
    add(new Label("textVersion", info));
    add(new Label("textYear", new SimpleDateFormat("yyyy").format(new Date()) + "."));
}