Пример #1
0
 public static Combo getYesNoInstance(
     String fieldName, String label, int colspan, PageState pageState) {
   CodeValueList cvl = new CodeValueList();
   cvl.add("", "");
   cvl.add(Fields.TRUE, I18n.get(Fields.TRUE));
   cvl.add(Fields.FALSE, I18n.get(Fields.FALSE));
   String col = colspan > 0 ? " colspan=\"" + colspan + "\" " : "";
   Combo c = new Combo(fieldName, "</td><td " + col + ">", null, 3, cvl, null);
   c.label = label;
   return c;
 }
Пример #2
0
  public void configureNeedingPageContext(PageContext pageContext) {

    // here insert from i18n
    SortedMap<String, I18n.I18nEntry> i18nGS = I18n.getEntriesForApplication("QA");
    for (String code : i18nGS.keySet()) {
      if (JSP.ex(code) && code.startsWith("GLOBALSETTINGS_")) {
        ApplicationState.applicationSettings.put(
            code.substring("GLOBALSETTINGS_".length()), i18nGS.get(code).getLabel("QA", "it"));
      }
    }

    try {
      pageContext.include("/applications/QA/settings/badges.jsp");
    } catch (Throwable e) {
      Tracer.platformLogger.error(e);
    }
  }