Package com.jada.util

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


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


    ItemMaintActionForm form = (ItemMaintActionForm) actionForm;
    initSiteProfiles(form, adminBean.getSite());
    Item item = new Item();
    item = ItemDAO.load(site.getSiteId(), Format.getLong(form.getItemId()));
    JSONEscapeObject jsonResult = createJsonSelectedMenus(site.getSiteId(), item, form.getSiteProfileClassId());
    String jsonString = jsonResult.toHtmlString();
    streamWebService(response, jsonString);
        return null;
  }
 
  public ActionForward removeMenus(ActionMapping mapping,
View Full Code Here

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

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

    ItemMaintActionForm form = (ItemMaintActionForm) actionForm;
    initSiteProfiles(form, adminBean.getSite());
    Item item = new Item();
    item = ItemDAO.load(site.getSiteId(), Format.getLong(form.getItemId()));
    JSONEscapeObject jsonResult = createJsonImages(site.getSiteId(), item, form);
    String jsonString = jsonResult.toHtmlString();
    streamWebService(response, jsonString);
        return null;
  }
 
  public ActionForward uploadImage(ActionMapping mapping,
View Full Code Here

    byte fileData[] = file.getFileData();
    ActionMessages errors = validateUploadImage(form, file);
    if (errors.size() != 0) {
      jsonResult.put("status", Constants.WEBSERVICE_STATUS_FAILED);
      jsonResult.put("message", resources.getMessage("error.string.required"));
      streamWebService(response, jsonResult.toHtmlString());
    }
   
    ImageScaler scaler = null;
    try {
      scaler = new ImageScaler(fileData, file.getContentType());
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;
    }
   
    ItemLanguage itemLanguage = null;
    for (ItemLanguage language : item.getItemLanguages()) {
View Full Code Here

    em.flush();
    em.refresh(item);
    jsonResult = createJsonImages(site.getSiteId(), item, form);
    jsonResult.put("recUpdateBy", item.getRecUpdateBy());
    jsonResult.put("recUpdateDatetime", Format.getFullDatetime(item.getRecUpdateDatetime()));
    String jsonString = jsonResult.toHtmlString();
    streamWebService(response, jsonString);
        return null;
  }
 
  public JSONEscapeObject createJsonImages(String siteId, Item item, ItemMaintActionForm form) throws Exception {
View Full Code Here

    itemLanguage.setRecUpdateDatetime(new Date(System.currentTimeMillis()));
    em.persist(itemLanguage);
   
    JSONEscapeObject jsonResult = new JSONEscapeObject();
    jsonResult.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
    String jsonString = jsonResult.toHtmlString();
    streamWebService(response, jsonString);
    return null;
  }
 
  public ActionForward removeImages(ActionMapping mapping,
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.