Package com.jada.util

Examples of com.jada.util.JSONEscapeObject.toHtmlString()


    ContentMaintActionForm form = (ContentMaintActionForm) actionForm;
    initSiteProfiles(form, adminBean.getSite());
    Content content = new Content();
    content = ContentDAO.load(site.getSiteId(), Format.getLong(form.getContentId()));
    JSONEscapeObject jsonResult = createJsonSelectedCategories(site.getSiteId(), content);
    String jsonString = jsonResult.toHtmlString();
    this.streamWebService(response, jsonString);
    return null;
  }
 
  public ActionForward addCategories(ActionMapping mapping,
View Full Code Here


    }
      JSONEscapeObject jsonResult = createJsonSelectedCategories(site.getSiteId(), content);
    jsonResult.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
    jsonResult.put("recUpdateBy", content.getRecUpdateBy());
    jsonResult.put("recUpdateDatetime", Format.getFullDatetime(content.getRecUpdateDatetime()));
    String jsonString = jsonResult.toHtmlString();
    streamWebService(response, jsonString);
    em.getTransaction().commit();
      return null;
  }
View Full Code Here

 
      JSONEscapeObject jsonResult = createJsonSelectedCategories(site.getSiteId(), content);
    jsonResult.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
    jsonResult.put("recUpdateBy", content.getRecUpdateBy());
    jsonResult.put("recUpdateDatetime", Format.getFullDatetime(content.getRecUpdateDatetime()));
    String jsonString = jsonResult.toHtmlString();
    streamWebService(response, jsonString);
    em.getTransaction().commit();
    return null;
  }
 
View Full Code Here

    em.flush();
   
    JSONEscapeObject jsonResult = createJsonSelectedMenus(site.getSiteId(), content, form.getSiteProfileClassId());
    jsonResult.put("recUpdateBy", content.getRecUpdateBy());
    jsonResult.put("recUpdateDatetime", Format.getFullDatetime(content.getRecUpdateDatetime()));
    String jsonString = jsonResult.toHtmlString();
    streamWebService(response, jsonString);
    em.getTransaction().commit();
    return null;
  }
 
View Full Code Here

    em.flush();
   
    JSONEscapeObject jsonResult = createJsonSelectedMenus(site.getSiteId(), content, form.getSiteProfileClassId());
    jsonResult.put("recUpdateBy", content.getRecUpdateBy());
    jsonResult.put("recUpdateDatetime", Format.getFullDatetime(content.getRecUpdateDatetime()));
    String jsonString = jsonResult.toHtmlString();
    streamWebService(response, jsonString);
    em.getTransaction().commit();
      return null;
  }
 
View Full Code Here

    ContentMaintActionForm form = (ContentMaintActionForm) actionForm;
    initSiteProfiles(form, adminBean.getSite());
    Content content = new Content();
    content = ContentDAO.load(site.getSiteId(), Format.getLong(form.getContentId()));
    JSONEscapeObject jsonResult = createJsonImages(site.getSiteId(), content, form);
    String jsonString = jsonResult.toHtmlString();
    streamWebService(response, jsonString);
        return null;
  }

  public ActionForward uploadImage(ActionMapping mapping,
View Full Code Here

    FormFile file = form.getFile();
    byte fileData[] = file.getFileData();
    if (Format.isNullOrEmpty(file.getFileName())) {
      jsonResult.put("status", Constants.WEBSERVICE_STATUS_FAILED);
      jsonResult.put("message", resources.getMessage("error.string.required"));
      streamWebService(response, jsonResult.toHtmlString());
          return null;
    }
   
    ImageScaler scaler = null;
    try {
View Full Code Here

      scaler.resize(600);
    }
    catch (OutOfMemoryError outOfMemoryError) {
      jsonResult.put("status", Constants.WEBSERVICE_STATUS_FAILED);
      jsonResult.put("message", resources.getMessage("content.error.image.size"));
      streamWebService(response, jsonResult.toHtmlString());
          return null;
    }
    catch (Throwable e) {
      jsonResult.put("status", Constants.WEBSERVICE_STATUS_FAILED);
      jsonResult.put("message", resources.getMessage("error.image.invalid"));
View Full Code Here

          return null;
    }
    catch (Throwable e) {
      jsonResult.put("status", Constants.WEBSERVICE_STATUS_FAILED);
      jsonResult.put("message", resources.getMessage("error.image.invalid"));
      streamWebService(response, jsonResult.toHtmlString());
          return null;
    }
   
    ContentLanguage contentLanguage = null;
    for (ContentLanguage language : content.getContentLanguages()) {
View Full Code Here

    }
   
    jsonResult = createJsonImages(site.getSiteId(), content, form);
    jsonResult.put("recUpdateBy", content.getRecUpdateBy());
    jsonResult.put("recUpdateDatetime", Format.getFullDatetime(content.getRecUpdateDatetime()));
    String jsonString = jsonResult.toHtmlString();
    streamWebService(response, jsonString);
        return null;
  }
 
  public JSONEscapeObject createJsonImages(String siteId, Content content, ContentMaintActionForm form) throws Exception {
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.