Package org.apache.openmeetings.persistence.beans.lang

Examples of org.apache.openmeetings.persistence.beans.lang.Fieldlanguagesvalues


    target.appendJavaScript("labelsInit();");
  }

  @Override
  protected void onSaveSubmit(AjaxRequestTarget target, Form<?> form) {
    Fieldlanguagesvalues flv = getModelObject();
    Fieldvalues fv = flv.getFieldvalues();
    Application.getBean(FieldValueDao.class).update(fv, WebSession.getUserId());
   
    flv.setFieldvalues(fv);
    Application.getBean(FieldLanguagesValuesDao.class)
      .update(flv, WebSession.getUserId());
    hideNewRecord();
    target.add(panel.listContainer);
    target.appendJavaScript("labelsInit();");
View Full Code Here


    super(id);
    FieldLanguageDao langDao = Application
        .getBean(FieldLanguageDao.class);
    language = langDao.getFieldLanguageById(1L);

    Fieldlanguagesvalues flv = new Fieldlanguagesvalues();
    flv.setLanguage_id(language.getLanguage_id());
    final LabelsForm form = new LabelsForm("form", this, flv);
    form.showNewRecord();
    add(form);

    final SearchableDataView<Fieldvalues> dataView = new SearchableDataView<Fieldvalues>(
View Full Code Here

    if (fv == null) {
      fv = fieldManager.addFieldById(fieldName, fieldvalues_id);
    }

    Fieldlanguagesvalues flv = fieldManager.getFieldByIdAndLanguage(
        fieldvalues_id, language_id);

    if (flv == null) {
      fieldManager.addFieldValueByFieldAndLanguage(fv,
          language_id, value);
    } else {
      flv.setValue(value);
      flv.setUpdatetime(new java.util.Date());
      fieldManager.updateFieldValueByFieldAndLanguage(flv);
    }
  }
View Full Code Here

      ErrorValue eValues = errorManagement.getErrorValuesById(-1
          * errorid);
      if (eValues != null) {
        log.debug("eValues.getFieldvalues_id() = " + eValues.getFieldvalues_id());
        log.debug("eValues.getErrorType() = " + errorManagement.getErrorType(eValues.getErrortype_id()));
        Fieldlanguagesvalues errorValue = fieldManager
            .getFieldByIdAndLanguage(eValues.getFieldvalues_id(),
                language_id);
        Fieldlanguagesvalues typeValue = fieldManager
            .getFieldByIdAndLanguage(errorManagement.getErrorType(eValues.getErrortype_id())
                .getFieldvalues_id(), language_id);
        if (errorValue != null) {
          return new ErrorResult(errorid, errorValue.getValue(),
              typeValue.getValue());
        }
      }
    } else {
      return new ErrorResult(errorid,
          "Error ... please check your input", "Error");
View Full Code Here

      Element itemObject = i.next();
      Long fieldvalues_id = Long.valueOf(
          itemObject.attribute("id").getText()).longValue();
      String fieldName = itemObject.attribute("name").getText();
      String value = itemObject.element("value").getText();
      Fieldlanguagesvalues fValue = new Fieldlanguagesvalues();
      fValue.setFieldvalues_id(fieldvalues_id);
      fValue.setValue(value);
      Fieldvalues fLabel = new Fieldvalues();
      fLabel.setName(fieldName);
      fValue.setFieldvalues(fLabel);
     
      labelsArray.put(fieldvalues_id, fValue);
    }

    return labelsArray;
View Full Code Here

      String verification_url) {
    try {

      super.init();

      Fieldlanguagesvalues labelid507 = fieldManager
          .getFieldByIdAndLanguage(new Long(507), default_lang_id);
      Fieldlanguagesvalues labelid508 = fieldManager
          .getFieldByIdAndLanguage(new Long(508), default_lang_id);
      Fieldlanguagesvalues labelid509 = fieldManager
          .getFieldByIdAndLanguage(new Long(509), default_lang_id);
      Fieldlanguagesvalues labelid510 = fieldManager
          .getFieldByIdAndLanguage(new Long(510), default_lang_id);
      Fieldlanguagesvalues labelid667 = fieldManager
          .getFieldByIdAndLanguage(new Long(667), default_lang_id);
      Fieldlanguagesvalues labelid668 = fieldManager
          .getFieldByIdAndLanguage(new Long(668), default_lang_id);

      /* lets make a Context and put data into it */
      VelocityContext context = new VelocityContext();

      context.put("username", username);
      context.put("userpass", userpass);
      context.put("mail", email);
      context.put("verification_url", verification_url);
      context.put("labelid506", fieldManager.getString(506L, default_lang_id));
      context.put("labelid507", labelid507.getValue());
      context.put("labelid508", labelid508.getValue());
      context.put("labelid509", labelid509.getValue());
      context.put("labelid510", labelid510.getValue());
      context.put("labelid511", fieldManager.getString(511L, default_lang_id));
      context.put("labelid667", labelid667.getValue());
      context.put("labelid668", labelid668.getValue());

      /* lets render a template */

      StringWriter w = new StringWriter();
      Velocity.mergeTemplate(templateNameVerification, "UTF-8", context,
View Full Code Here

      String email, Long default_lang_id) {
    try {
     
      super.init();

      Fieldlanguagesvalues labelid507 = fieldManager
          .getFieldByIdAndLanguage(new Long(507), default_lang_id);
      Fieldlanguagesvalues labelid508 = fieldManager
          .getFieldByIdAndLanguage(new Long(508), default_lang_id);
      Fieldlanguagesvalues labelid509 = fieldManager
          .getFieldByIdAndLanguage(new Long(509), default_lang_id);
      Fieldlanguagesvalues labelid510 = fieldManager
          .getFieldByIdAndLanguage(new Long(510), default_lang_id);

      /* lets make a Context and put data into it */
      VelocityContext context = new VelocityContext();

      context.put("username", username);
      context.put("userpass", userpass);
      context.put("mail", email);
      context.put("labelid506", fieldManager.getString(506L, default_lang_id));
      context.put("labelid507", labelid507.getValue());
      context.put("labelid508", labelid508.getValue());
      context.put("labelid509", labelid509.getValue());
      context.put("labelid510", labelid510.getValue());
      context.put("labelid511", fieldManager.getString(511L, default_lang_id));

      /* lets render a template */

      StringWriter w = new StringWriter();
View Full Code Here

      }

      // log.error("result: "+langFieldIdIsInited+" "+id+" "+name+" "+value);

      if (flvMap.containsKey(id)) {
        Fieldlanguagesvalues flv = flvMap.get(id);
        flv.setUpdatetime(new Date());
        flv.setValue(value);
      } else {
        Fieldvalues fv = null;
        // Only do that for the first field-set
        if (!fieldCache.containsKey(id)) {
          fv = fieldManager.addFieldById(name, id);
          fieldCache.put(id, fv);
        } else {
          fv = fieldCache.get(id);
        }
        Fieldlanguagesvalues flv = new Fieldlanguagesvalues();
        flv.setStarttime(new Date());
        flv.setValue(value);
        flv.setLanguage_id(lang.getLanguage_id());
        flv.setFieldvalues(fv);
        flv.setDeleted(false);
        flvMap.put(id, flv);
      }
    }
    lang.setLanguageValues(flvMap.values());
    fieldLanguageDaoImpl.updateLanguage(lang);
View Full Code Here

      String invitation_link, Long default_lang_id, Date dStart, Date dEnd) {
    try {

      super.init();

      Fieldlanguagesvalues labelid501 = fieldManager
          .getFieldByIdAndLanguage(new Long(501), default_lang_id);
      Fieldlanguagesvalues labelid502 = fieldManager
          .getFieldByIdAndLanguage(new Long(502), default_lang_id);
      Fieldlanguagesvalues labelid503 = fieldManager
          .getFieldByIdAndLanguage(new Long(503), default_lang_id);
      Fieldlanguagesvalues labelid504 = fieldManager
          .getFieldByIdAndLanguage(new Long(504), default_lang_id);
      Fieldlanguagesvalues labelid505 = fieldManager
          .getFieldByIdAndLanguage(new Long(505), default_lang_id);
      // Fieldlanguagesvalues labelid570 =
      // fieldmanagment.getFieldByIdAndLanguage(new Long(570),
      // default_lang_id);
      // Fieldlanguagesvalues labelid571 =
      // fieldmanagment.getFieldByIdAndLanguage(new Long(571),
      // default_lang_id);

      /* lets make a Context and put data into it */
      VelocityContext context = new VelocityContext();

      context.put("user", user);
      context.put("message", message);
      context.put("invitation_link", invitation_link);
      context.put("invitation_link2", invitation_link);

      context.put("labelid500", fieldManager.getString(500L, default_lang_id));
      context.put("labelid501", labelid501.getValue());
      context.put("labelid502", labelid502.getValue());
      context.put("labelid503", labelid503.getValue());
      context.put("labelid504", labelid504.getValue());
      context.put("labelid505", labelid505.getValue());
      context.put("APP_NAME", configurationDao.getAppName());


      /* lets render a template */
      StringWriter w = new StringWriter();
View Full Code Here

    try {

      super.init();

      Fieldlanguagesvalues labelid623 = fieldManager
          .getFieldByIdAndLanguage(new Long(623), default_lang_id);
      Fieldlanguagesvalues labelid624 = fieldManager
          .getFieldByIdAndLanguage(new Long(624), default_lang_id);
      Fieldlanguagesvalues labelid625 = fieldManager
          .getFieldByIdAndLanguage(new Long(625), default_lang_id);
      Fieldlanguagesvalues labelid626 = fieldManager
          .getFieldByIdAndLanguage(new Long(626), default_lang_id);
      Fieldlanguagesvalues labelid627 = fieldManager
          .getFieldByIdAndLanguage(new Long(627), default_lang_id);

      /* lets make a Context and put data into it */
      VelocityContext context = new VelocityContext();

      context.put("user", user);
      context.put("message", message);
      context.put("invitation_link", invitation_link);
      context.put("invitation_link2", invitation_link);
      context.put("labelid500", fieldManager.getString(622L, default_lang_id));
      context.put("labelid501", labelid623.getValue());
      context.put("labelid502", labelid624.getValue());
      context.put("labelid503", labelid625.getValue());
      context.put("labelid504", labelid626.getValue());
      context.put("labelid505", labelid627.getValue());
      context.put("APP_NAME", configurationDao.getAppName());

      /* lets render a template */
      StringWriter w = new StringWriter();
      Velocity.mergeTemplate(templateName, "UTF-8", context, w);
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.persistence.beans.lang.Fieldlanguagesvalues

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.