Package org.openqreg.util

Examples of org.openqreg.util.LanguageHandler


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

    out.append("<span class=\"PF");
    out.append(getStylesheet()).append("\">");
    out.append(lang.getTranslation(elemParam.getLangId(),
        getDescriptionID()));
    out.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(", 'time'");
    // 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

   *            is used to get presentation information
   * @return Returns the a pice of HTML containing the variable
   */
  @Override
  public String createPaperFormHTML(ElementParameter elemParam) {
    LanguageHandler lang = LanguageHandler.getInstance();
    StringBuffer out = new StringBuffer().append("<span id=\"").append(
        getName()).append("\" class=\"PF").append(getStylesheet())
        .append(" ")
        .append(getStylesheet())
        .append("\">").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(", 'number'");
    // 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(", '").append(getSubType()).append("'");
    // 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

   *         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);
    String listOptionString = "";
    if (null != lang.getNoMatchFoundMessage()) {
      Object obj = elemParam.getFetch().getTreeMap().get(this.name);
      ArrayList<String> valueArrList = new ArrayList<String>();
      String[] valueArr = null;
     
      //check if obj is an array, that is, if more than one value is chosen in the multiselect
      if(obj != null && obj.getClass().isArray()){
        valueArr = (String[]) elemParam.getFetch().getTreeMap().get(this.name);
        for(int i=0; i<valueArr.length; i++){
          valueArrList.add(valueArr[i]);
        }
        listOptionString = lang.getIntervalListTranslationValue(langID, getListBoxId()
            + "_L", elemParam.getCalendar(), elemParam
            .getUser().getListboxmode(), valueArrList);
             
      }else{
        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

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

    String checked = " checked";
    // iterates over listoptions
    for(ListOption radioObject : obj.getListOptions().values()) {
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(", 'radio'");
    // 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 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());
View Full Code Here

   *         nessecary javascripts
   */
  @Override
  public String createPaperFormHTML(ElementParameter elemParam) {
    StringBuffer out = new StringBuffer();
    LanguageHandler lang = LanguageHandler.getInstance();
   
    String helpText = "<b>" + lang.getTranslation(elemParam.getLangId(), getDescriptionID()) + "</b><br/><br/>"
        + lang.getTranslation(elemParam.getLangId(), getHelpTextID());

    InputObjectTexts obj = lang.getInputObjectTexts(elemParam.getLangId(), getName(), getName());

    String checked = " checked";
    out.append("<span onmouseover=\"showHelpBox('" + helpText + "')\">\n ");
    //iterates over listoptions
    for(ListOption radioObject : obj.getListOptions().values()) {
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.