Example usage for org.apache.wicket Localizer getStringIgnoreSettings

List of usage examples for org.apache.wicket Localizer getStringIgnoreSettings

Introduction

In this page you can find the example usage for org.apache.wicket Localizer getStringIgnoreSettings.

Prototype

public String getStringIgnoreSettings(final String key, final Component component, final IModel<?> model,
        Locale locale, String style, final String defaultValue) 

Source Link

Document

This is similar to #getString(String,Component,IModel,String) except that the resource settings are ignored.

Usage

From source file:org.apache.openmeetings.web.app.Application.java

License:Apache License

public static String getString(String key, final Locale loc, boolean noReplace) {
    if (!exists()) {
        ThreadContext.setApplication(Application.get(appName));
    }//from   ww w . j a v a2  s .com
    Localizer l = get().getResourceSettings().getLocalizer();
    String value = l.getStringIgnoreSettings(key, null, null, loc, null, "[Missing]");
    if (!noReplace && STRINGS_WITH_APP.contains(key)) {
        final MessageFormat format = new MessageFormat(value, loc);
        value = format.format(new Object[] { getBean(ConfigurationDao.class).getAppName() });
    }
    if (!noReplace && RuntimeConfigurationType.DEVELOPMENT == get().getConfigurationType()) {
        value += String.format(" [%s]", key);
    }
    return value;
}