Examples of FetchData


Examples of org.openqreg.util.FetchData

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

    InputObjectTexts obj = lang.getInputObjectTexts(elemParam.getLangId(), getName(), getName());
    FetchData fetch = elemParam.getFetch();
    for(ListOption radioOption : obj.getListOptions().values()) {
      if (fetch.containsValue(this.getName()) && radioOption.getValue().equals(fetch.getValueAsString(this.getName()))) {
        out.append("<span class=\"").append(getStylesheet()).append("\">");
        out.append(radioOption.getValue().trim());
        out.append("</span>");
      }
    }
View Full Code Here

Examples of org.openqreg.util.FetchData

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

    StringBuffer out = new StringBuffer();
    FetchData fetch = elemParam.getFetch();
    // if this variable exists in fetch and it is not empty print the value
    if (fetch.containsValue(this.getName())
        && !"".equals(fetch.getValueAsString(this.getName()))) {
      out.append("<span class=\"").append(getStylesheet()).append("\">");
      out.append(fetch.getValueAsString(this.getName()));
      out.append("</span>");
    }

    return out.toString();
  }
View Full Code Here

Examples of org.openqreg.util.FetchData

    }
    if (warningMax.equals("")) {
      warningMax = max;
    }
    StringBuffer out = new StringBuffer();
    FetchData fetch = elemParam.getFetch();
    // if this variable exists in fetch and it is not empty print the value
    if (fetch.containsValue(this.getName())
        && !"".equals(fetch.getValueAsString(this.getName()))) {
      // print value with stylesheet
      out.append("<span class=\"PF");
      out.append(getStylesheet()).append("\">");
      out.append(fetch.getValueAsString(this.getName()));
      out.append("</span>");

    } else {
      out
          .append("<IMG src=\"images/smallrectangle.gif\" height=\"25\" width=\"20\"/>");
View Full Code Here

Examples of org.openqreg.util.FetchData

   * @see se.ucr.element.StandardVariable#createJournalHTML(se.ucr.element.ElementParameter)
   */
  @Override
  public String createJournalHTML(ElementParameter elemParam) {
    StringBuffer out = new StringBuffer();
    FetchData fetch = elemParam.getFetch();
    // if this variable exists in fetch and it is not empty print the value
    if (fetch.containsValue(this.getName())
        && !"".equals(fetch.getValueAsString(this.getName()))) {
      // print value with stylesheet
      out.append("<span");
      if (getStylesheet() != null && getStylesheet().length() != 0) {
        out.append(" class=\"").append(getStylesheet()).append("\"");
      }
      out.append(">");

      String value;
      try {
        value = fetch.getValueAsString(this.getName());

        // change to br for linebreaks
        value = value.replaceAll("%0D%0A", "<br/>");

        // decode the rest
        value = URLDecoder.decode(value, "iso-8859-1");

      } catch (UnsupportedEncodingException uee) {
        Logger.getLogger(TextAreaVariable.class).log(Level.WARN,
            "Unable to decode value", uee);
        value = fetch.getValueAsString(this.getName()).replaceAll(
            "%0D%0A", "<br/>");
      }
      out.append(value);
      out.append("</span>");

View Full Code Here

Examples of org.openqreg.util.FetchData

   *         URLDecoder
   */
  @Override
  public String createPaperFormHTML(ElementParameter elemParam) {
    StringBuffer out = new StringBuffer();
    FetchData fetch = elemParam.getFetch();
    // if this variable exists in fetch and it is not empty print the value
    if (fetch.containsValue(this.getName())
        && !"".equals(fetch.getValueAsString(this.getName()))) {
      // print value with stylesheet
      out.append("<span class=\"PF");
      out.append(getStylesheet() + " " + getStylesheet());
      out.append("\">");
      String value;
      try {
        value = fetch.getValueAsString(this.getName());

        // change to br for linebreaks
        value = value.replaceAll("%0D%0A", "<br/>");

        // decode the rest
        value = URLDecoder.decode(value, "UTF-8");

      } catch (UnsupportedEncodingException uee) {
        Logger.getLogger(TextAreaVariable.class).log(Level.WARN,
            "Unable to decode value", uee);
        value = fetch.getValueAsString(this.getName()).replaceAll(
            "%0D%0A", "<br/>");
      }
      out.append(value);
      out.append("</span>");

View Full Code Here

Examples of org.openqreg.util.FetchData

    InputObjectTexts obj = lang.getInputObjectTexts(elemParam.getLangId(),
        getName(), getListBoxId());
    Map<Integer, ListOption> listOptions = obj.getListOptions();

    if (listOptions != null) {
      FetchData fetch = elemParam.getFetch();

      for (ListOption listOption : listOptions.values()) {
        if (fetch.containsValue(this.getListBoxId())) {
          if (listOption.getValue().equals(
              fetch.getValueAsString(this.getName()))
              || listOptions.size() == 1) {
            out.append("<span id=\"").append(getListBoxId())
                .append("\" name=\"").append(getListBoxId())
                .append("\">");
            out.append(listOption.getText());
View Full Code Here

Examples of org.openqreg.util.FetchData

    User user = null;

    String langId = null;

    FetchData fetch = null;
    // checks that we are active and so on....

    // Try to get the Dispatcher from the application scope
    disp = Dispatcher.getInstance();
    if (disp != null) {
View Full Code Here

Examples of org.openqreg.util.FetchData

   *         nessecary javascripts
   */
  @Override
  public String createPaperFormHTML(ElementParameter elemParam) {
    StringBuffer out = new StringBuffer();
    FetchData fetch = elemParam.getFetch();
    // if this variable exists in fetch and it is not empty print the value
    if (fetch.containsValue(this.getName())
        && !"".equals(fetch.getValueAsString(this.getName()))) {
      // print value with stylesheet
      out.append("<span class=\"PF");
      out.append(getStylesheet() + " " + getStylesheet());
      out.append("\">");
      out.append(fetch.getValueAsString(this.getName()));
      out.append("</span>");

    } else {
      out.append("<br/>________________________________________________");
    }
View Full Code Here

Examples of org.openqreg.util.FetchData

  }
 
  @Override
  public String createJournalHTML(ElementParameter elemParam) {
    StringBuffer out = new StringBuffer();
    FetchData fetch = elemParam.getFetch();
    // if this variable exists in fetch and it is not empty print the value
    if (fetch.containsValue(this.getName())
        && !"".equals(fetch.getValueAsString(this.getName()))) {
      out.append("<span class=\"").append(getStylesheet()).append("\">");
      out.append(fetch.getValueAsString(this.getName()));
      out.append("</span>");
    // else, print out 'Ok�nt' if the _MISS checkbox is checked
    } else if (fetch.containsValue(this.getName() + "_MISS")
        && "1".equals(fetch.getValueAsString(this.getName() + "_MISS"))) {
      LanguageHandler lang = LanguageHandler.getInstance();
      String langID = elemParam.getLangId();
      out.append("<span class=\"").append(getStylesheet()).append("\">");
      out.append(lang.getTranslation(langID, "CHECKBOXMISSCHECK_D"));
      out.append("</span>");
View Full Code Here

Examples of org.openqreg.util.FetchData

  }
 
  @Override
  public String createPaperFormHTML(ElementParameter elemParam) {
    StringBuffer out = new StringBuffer();
    FetchData fetch = elemParam.getFetch();
    // if this variable exists in fetch and it is not empty print the value
    if (fetch.containsValue(this.getName())
        && !"".equals(fetch.getValueAsString(this.getName()))) {
      out.append("<span class=\"").append(getStylesheet()).append("\">");
      out.append(fetch.getValueAsString(this.getName()));
      out.append("</span>");
    // else, print out 'Ok�nt' if the _MISS checkbox is checked
    } else if (fetch.containsValue(this.getName() + "_MISS")
        && "1".equals(fetch.getValueAsString(this.getName() + "_MISS"))) {
      LanguageHandler lang = LanguageHandler.getInstance();
      String langID = elemParam.getLangId();
      out.append("<span class=\"").append(getStylesheet()).append("\">");
      out.append(lang.getTranslation(langID, "CHECKBOXMISSCHECK_D"));
      out.append("</span>");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.