Package org.openqreg.util

Examples of org.openqreg.util.LanguageHandler


    }
  }

  protected void addTexts(AjaxWidgetListAnswer arla, String langId,
      Collection<String> textIds) {
    LanguageHandler lang = LanguageHandler.getInstance();
    for (String textId : textIds) {
      arla.setText(textId, lang.getTranslation(langId, textId));
    }
  }
View Full Code Here


    }
  }

  protected void addListBoxTexts(AjaxWidgetListAnswer arla, String langId,
      Collection<String> listBoxTextIds) {
    LanguageHandler lang = LanguageHandler.getInstance();
    for (String textId : listBoxTextIds) {
      TreeMap<Integer, ListOption> tr = lang.getListBoxTree(langId,
          textId);
      Collection<ListOption> loCol = Collections
          .synchronizedList(new ArrayList<ListOption>());
      if (null != tr) {
        loCol = tr.values();
View Full Code Here

      Collection<String> textIds) {
    if (textIds == null) {
      // nothing to loop over nothing to add...
      return;
    }
    LanguageHandler lang = LanguageHandler.getInstance();
    for (String textId : textIds) {
      awa.setText(textId, lang.getTranslation(langId, textId));
    }
  }
View Full Code Here

      Collection<String> listBoxTextIds) {
    if (listBoxTextIds == null) {
      // nothing to loop over nothing to add...
      return;
    }
    LanguageHandler lang = LanguageHandler.getInstance();
    for (String textId : listBoxTextIds) {
      TreeMap<Integer, ListOption> tr = lang.getListBoxTree(langId,
          textId);
      Collection<ListOption> loCol = Collections
          .synchronizedList(new ArrayList<ListOption>());
      if (null != tr) {
        loCol = tr.values();
View Full Code Here

   *      se.ucr.util.FetchData)
   */
  @Override
  public String createJournalHTML(ElementParameter elemParam) {
    StringBuffer out = new StringBuffer();
    LanguageHandler lang = LanguageHandler.getInstance();

    InputObjectTexts obj = lang.getInputObjectTexts(elemParam.getLangId(), getName(), getName());
    Map<Integer, ListOption> listOptions = obj.getListOptions();
    out.append("<table id='").append(this.getName()).append("'>");
   
    if (listOptions != null) {

View Full Code Here

  }

  @Override
  public String createJS(ElementParameter elemParam) {
    StringBuffer out = new StringBuffer();
    LanguageHandler lang = LanguageHandler.getInstance();

    String langID = elemParam.getLangId();

    out.append("inputAttributes['");
    out.append(name);
    out.append("'] = new Input('");
    // id
    out.append(name);
    out.append("'");

    //dataId
    out.append(", '");
    out.append(dataId);
    out.append("'");
   
    // subType
    out.append(", 'text'");
    // mandatory
    out.append(", false");
    // dado
    out.append(", false");
    // description
    out.append(", '");
    out.append(lang.getTranslation(langID, getDescriptionID()));
    // helptext
    out.append("', '");
    out.append(lang.getTranslation(langID, getHelpTextID()));
    // min
    out.append("', null");
    // max
    out.append(", null");
    // wMin
View Full Code Here

   * @return A string with the helptext
   * @since platform 2.2
   */
  public String getHelpText(String langId) {
    StringBuffer buf = new StringBuffer();
    LanguageHandler lang = LanguageHandler.getInstance();

    buf.append("<b>");
    buf.append(lang.getTranslation(langId, getDescriptionID()));
    buf.append("</b><br/><br/>");
    buf.append(lang.getTranslation(langId, getHelpTextID()));
    return buf.toString();
  }
View Full Code Here

   * @return Returns the a pice of HTML containing the variable link. Link
   *         characteristics is set by stylesheet on the SPAN-tag
   */
  @Override
  public String createHTML(ElementParameter elemParam) {
    LanguageHandler lang = LanguageHandler.getInstance();
    StringBuffer out = new StringBuffer().append("<span ");
    out.append("class=\"" + getStylesheet() + "\" ");
    // scripts
    for (ScriptBean vsBean : scripts.values()) {
      out.append(vsBean.getScriptname() + "=\"" + vsBean.getScriptvalue()
          + "\" ");
    }
    out.append(">");
    out.append(
        lang.getTranslation(elemParam.getLangId(),
            getDescriptionID())).append("</span>");
    return out.toString();
  }
View Full Code Here

   * @see se.ucr.element.StandardVariable#createJS(se.ucr.element.ElementParameter)
   */
  @Override
  public String createJS(ElementParameter elemParam) {
    StringBuffer out = new StringBuffer();
    LanguageHandler lang = LanguageHandler.getInstance();
    String langID = elemParam.getLangId();

    out.append("inputAttributes['");
    out.append(name);
    out.append("'] = new Input('");
    // id
    out.append(name);
    out.append("'");

    //dataId
    out.append(", '");
    out.append(dataId);
    out.append("'");
   
    // subType
    out.append(", 'text'");
    // mandatory
    out.append(", ");
    out.append(mandatory);
    // dado
    out.append(", ");
    out.append(disableOnDisableAll);
    // description
    out.append(", '");
    out.append(lang.getTranslation(langID, getDescriptionID()));
    // helptext
    out.append("', '");
    out.append(lang.getTranslation(langID, getHelpTextID()));
    // min
    out.append("', null");
    // max
    out.append(", null");
    // wMin
View Full Code Here

   * @return Returns the a pice of HTML containing the variable link
   */
  @Override
  public String createJournalHTML(ElementParameter elemParam) {
    StringBuffer out = new StringBuffer();
    LanguageHandler lang = LanguageHandler.getInstance();

    if (isPrintJournal()) {
      out.append("<span class=\"").append(getStylesheet())
//      .append(
//          "\" onClick=\"").append(getOnClick()).append("\"> ")
          .append(
              lang.getTranslation(elemParam.getLangId(),
                  getDescriptionID())).append("</span> ");
    }
    return out.toString();
  }
View Full Code Here

TOP

Related Classes of org.openqreg.util.LanguageHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.