Package com.jada.util

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


      for (int i = 0; i < customAttribIds.length; i++) {
        CustomAttribute customAttribute = em.find(CustomAttribute.class, Format.getLong(customAttribIds[i]));
        category.getCustomAttributes().remove(customAttribute);
      }
    }
    streamWebService(response, jsonResult.toHtmlString());
    return null;
  }
 
  public ActionForward addCustomAttribute(ActionMapping mapping,
        ActionForm actionForm,
View Full Code Here


    if (!found) {
      category.getCustomAttributes().add(customAttribute);
      em.persist(category);
    }

    streamWebService(response, jsonResult.toHtmlString());
    return null;
  }

    public ActionMessages validate(CategoryMaintActionForm form, String siteId) throws Exception {
      ActionMessages errors = new ActionMessages();
View Full Code Here

    FormFile file = form.getFile();
    byte fileData[] = file.getFileData();
    if (file.getFileName().length() == 0) {
      json.put("status", Constants.WEBSERVICE_STATUS_FAILED);
      json.put("filename", resources.getMessage("error.string.required"));
      streamWebService(response, json.toHtmlString());
      return null;
    }
    ImageScaler scaler = new ImageScaler(fileData, file.getContentType());
    scaler.resize(600);
View Full Code Here

        em.persist(siteDomainLanguage);
        form.setSiteLogoContentTypeLang(siteDomainLanguage.getSiteLogoContentType());
        }
    
    json.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
    streamWebService(response, json.toHtmlString());
   
    return null;
  }

  public ActionForward removeImage(ActionMapping mapping,
View Full Code Here

    form.setSiteLogoContentType(siteDomainLanguage.getSiteLogoContentType());
    FormUtils.setFormDisplayMode(request, form, FormUtils.EDIT_MODE);
   
    JSONEscapeObject json = new JSONEscapeObject();
    json.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
    streamWebService(response, json.toHtmlString());
    return null;
  }
   
    public void copyProperties(SiteDomainMaintActionForm form, SiteDomain siteDomain, AdminBean adminBean) throws Exception {
      form.setSiteDomainDefault(false);
View Full Code Here

    filename += "/" + folder;
    File file = new File(filename);
    if (file.exists()) {
      JSONEscapeObject.put("status", "failed");
      JSONEscapeObject.put("message", "Folder already exist");
      return JSONEscapeObject.toHtmlString();
    }
    if (!file.mkdir()) {
      JSONEscapeObject.put("status", "failed");
      JSONEscapeObject.put("message", "Unable to create directory");
      return JSONEscapeObject.toHtmlString();
View Full Code Here

      return JSONEscapeObject.toHtmlString();
    }
    if (!file.mkdir()) {
      JSONEscapeObject.put("status", "failed");
      JSONEscapeObject.put("message", "Unable to create directory");
      return JSONEscapeObject.toHtmlString();
    }
    JSONEscapeObject.put("status", "success");
    result = JSONEscapeObject.toHtmlString();
    return result;
  }
View Full Code Here

      JSONEscapeObject.put("status", "failed");
      JSONEscapeObject.put("message", "Unable to create directory");
      return JSONEscapeObject.toHtmlString();
    }
    JSONEscapeObject.put("status", "success");
    result = JSONEscapeObject.toHtmlString();
    return result;
  }
 
  public String performRemove(HttpServletRequest request, String currentFolder) throws Exception {
    String result = null;
View Full Code Here

        filename += filenames[i];
        File file = new File(filename);
        if (!file.exists()) {
          JSONEscapeObject.put("status", "failed");
          JSONEscapeObject.put("message", "File " + filename + " does not exist");
          return JSONEscapeObject.toHtmlString();
        }
        removeFile(filename);
      }
    }
    JSONEscapeObject.put("status", "success");
View Full Code Here

        }
        removeFile(filename);
      }
    }
    JSONEscapeObject.put("status", "success");
    result = JSONEscapeObject.toHtmlString();
    return result;
  }
 
  public String performUpload(HttpServletRequest request, String currentFolder) throws Exception {
    String result = null;
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.