/** * @see #getStringIgnoreSettings(String, Component, IModel, Locale, String, String) * * @param key * The key to obtain the resource for * @param component * The component to get the resource for (optional) * @param model * The model to use for substitutions in the strings (optional) * @param defaultValue * The default value (optional) * @return The string resource */ public String getStringIgnoreSettings(final String key, final Component component, final IModel<?> model, final String defaultValue) { return getStringIgnoreSettings(key, component, model, null, null, defaultValue); }
/** * @see #getStringIgnoreSettings(String, Component, IModel, Locale, String, String) * * @param key * The key to obtain the resource for * @param component * The component to get the resource for (optional) * @param model * The model to use for substitutions in the strings (optional) * @param defaultValue * The default value (optional) * @return The string resource */ public String getStringIgnoreSettings(final String key, final Component component, final IModel<?> model, final String defaultValue) { return getStringIgnoreSettings(key, component, model, null, null, defaultValue); }
@Override public String loadStringResource(final Component component, String key, final Locale locale, final String style, final String variation) { if (key.contains(",")) { key = key.substring(0, key.lastIndexOf(',')); return resourceSettings.getLocalizer().getStringIgnoreSettings(key, component, null, locale, style, variation); } return null; } });
/** * Returns the display value for the null value. The default behavior is to look the value up by * using the key from <code>getNullValidKey()</code>. * * @return The value to display for null */ protected String getNullValidDisplayValue() { String option = getLocalizer().getStringIgnoreSettings(getNullValidKey(), this, null, null); if (Strings.isEmpty(option)) { option = getLocalizer().getString("nullValid", this, ""); } return option; }
/** * Returns the display value if null is not valid but is selected. The default behavior is to * look the value up by using the key from <code>getNullKey()</code>. * * @return The value to display if null is not value but selected, e.g. "Choose One" */ protected String getNullKeyDisplayValue() { String option = getLocalizer().getStringIgnoreSettings(getNullKey(), this, null, null); if (Strings.isEmpty(option)) { option = getLocalizer().getString("null", this, CHOOSE_ONE); } return option; }
/** * Returns the display value for the null value. The default behavior is to look the value up by * using the key from <code>getNullValidKey()</code>. * * @return The value to display for null */ protected String getNullValidDisplayValue() { String option = getLocalizer().getStringIgnoreSettings(getNullValidKey(), this, null, null); if (Strings.isEmpty(option)) { option = getLocalizer().getString("nullValid", this, ""); } return option; }
/** * Returns the display value if null is not valid but is selected. The default behavior is to * look the value up by using the key from <code>getNullKey()</code>. * * @return The value to display if null is not value but selected, e.g. "Choose One" */ protected String getNullKeyDisplayValue() { String option = getLocalizer().getStringIgnoreSettings(getNullKey(), this, null, null); if (Strings.isEmpty(option)) { option = getLocalizer().getString("null", this, CHOOSE_ONE); } return option; }
String value = getStringIgnoreSettings(key, component, model, null); if ((value == null) && (defaultValue != null))
String value = getStringIgnoreSettings(key, component, model, locale, style, null);
String value = getStringIgnoreSettings(key, component, model, locale, style, null);
String option = getLocalizer().getStringIgnoreSettings(getNullValidKey(), this, null, null); if (Strings.isEmpty(option)) String option = getLocalizer().getStringIgnoreSettings(getNullKey(), this, null, null);