Package org.openqreg.util

Examples of org.openqreg.util.LanguageHandler


   */
  @Override
  public String createHTML(ElementParameter elemParam) {

    StringBuffer buffer = new StringBuffer();
    LanguageHandler lang = LanguageHandler.getInstance();
    String alt = lang.getTranslation(elemParam.getLangId(), getDescriptionID());

    if (logger.isDebugEnabled()) {
      logger.log(Level.DEBUG, "Generating ImageMapArea " + getName());
    }

View Full Code Here


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

    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(", 'date'");
    // 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("', ");
    if (null != getMin() && !"".equals(getMin())) {
      out.append(getMin());
    } else {
View Full Code Here

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

    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(", 'notcompletedate'");
    // 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("', ");
    if (null != getMin() && !"".equals(getMin())) {
      out.append(getMin());
    } else {
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(", 'textarea'");
    // 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

   *            is used to get presentation information
   * @return Returns the a pice of HTML containing the variable
   */
  @Override
  public String createHTML(ElementParameter elemParam) {
    LanguageHandler lang = LanguageHandler.getInstance();
   
    StringBuffer out = new StringBuffer().append("<span id=\"").append(
        getName()).append("\"");
    if (!"".equals(getStylesheet())) {
      out.append(" class=\"" + getStylesheet() + "\"");
    }
    //scripts
    for(ScriptBean vsBean : scripts.values()) {
      out.append(" ");
      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#createJournalHTML(se.ucr.element.ElementParameter)
   */
  @Override
  public String createJournalHTML(ElementParameter elemParam) {
    StringBuffer out = new StringBuffer();
    LanguageHandler lang = LanguageHandler.getInstance();
    if (isPrintJournal()) {
      out.append("<span id=\"").append(getName()).append("\" class=\"")
          .append(getStylesheet()).append("\">").append(
              lang.getTranslation(elemParam.getLangId(),
                  getDescriptionID())).append("</span> ");
    }
    return out.toString();
  }
View Full Code Here

   * @see se.ucr.element.StandardVariable#createHTML(se.ucr.bean.User)
   *
   */
  @Override public String createHTML(ElementParameter elemParam) {
    StringBuffer out = new StringBuffer();
    LanguageHandler lang = LanguageHandler.getInstance();
   
    out.append("<img id=\"");
    out.append(this.getName());
    out.append("\"");
    if (!"".equals(getStylesheet())) {
      out.append(" class=\"" + getStylesheet() + "\" ");
    }
    out.append(" src=\"");
    out.append(src);
    out.append("\" ");
    if (lang.hasTranslation(elemParam.getLangId(), getDescriptionID())) {
      out.append("alt=\"");
      out.append(lang.getTranslation(elemParam.getLangId(),
          getDescriptionID()));
      out.append("\"");
    }
    out.append(" width=\"");
    out.append(width);
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(", 'image'");
    // 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

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

    buffer.append("<IMG ID= \"")
    .append(this.getName())
    .append("\" ")
    .append("SRC=\"").append(src).append("\" BORDER='0' ");
    if(lang.hasTranslation(elemParam.getLangId(),getDescriptionID())){
      buffer.append("ALT=\"")
      .append(lang.getTranslation(elemParam.getLangId(), getDescriptionID()))
      .append("\" ");
    }
    buffer.append("WIDTH=\"")
    .append(width).append("\" HEIGHT=\"").append(height)
    .append("\"/>");
View Full Code Here

   *         nessecary javascripts
   */
  @Override
  public String createHTML(ElementParameter elemParam) {
    StringBuffer out = new StringBuffer();
    LanguageHandler lang = LanguageHandler.getInstance();
    String langID = elemParam.getLangId();

    out.append("<select" + getMultiple() + getVisibleRows());
    if (!"".equals(getStylesheet())) {
      out.append(" class=\"" + getStylesheet() + "\" ");
    }
    out.append(" id=\"" + getName() + "\" ");
    // scripts
    for (ScriptBean vsBean : scripts.values()) {
      out.append(vsBean.getScriptname() + "=\"" + vsBean.getScriptvalue()
          + "\" ");
    }
    out.append("> ");
    out.append(nl);

    if (null != lang.getNoMatchFoundMessage()) {
      String listOptionString = lang.getIntervalListTranslationValue(
          langID, getListBoxId() + "_L", elemParam.getCalendar(),
          elemParam.getUser().getListboxmode(), elemParam.getFetch()
              .getValueAsString(this.name));
      // only write to out if we have option rows...
      if (!lang.getNoMatchFoundMessage().equals(listOptionString)) {
        out.append(listOptionString);
      }
    }
    out.append("</select>");
    if (mandatory) {
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.