Ejemplo n.º 1
0
 // Create an HTML page containing the form for configuring the file.
 private String getScriptPage(int pipe, int stage, File file) {
   String template = "/DAEditor.html";
   String page = FileUtil.getText(Cache.getInstance().getFile(template));
   String table = makeList();
   Properties props = new Properties();
   props.setProperty("closebox", "/icons/home.png");
   props.setProperty("home", home);
   props.setProperty("context", "/" + context);
   props.setProperty("profilespath", "/profiles");
   props.setProperty("profilepath", "/profile");
   props.setProperty("scriptpath", "/script");
   props.setProperty("scriptfile", file.getAbsolutePath().replaceAll("\\\\", "/"));
   props.setProperty("pipe", "" + pipe);
   props.setProperty("stage", "" + stage);
   page = StringUtil.replace(page, props);
   return page;
 }
Ejemplo n.º 2
0
 // Create an HTML page containing the list of script files.
 private String getListPage() {
   String template = "/DAList.html";
   String page = FileUtil.getText(Cache.getInstance().getFile(template));
   String table = makeList();
   Properties props = new Properties();
   props.setProperty("home", home);
   props.setProperty("table", table);
   props.setProperty("homeicon", "");
   if (!home.equals("")) {
     props.setProperty(
         "homeicon",
         "<img src=\"/icons/home.png\" onclick=\"window.open('"
             + home
             + "','_self');\" title=\"Return to the home page\" style=\"margin:2\"/>");
   }
   page = StringUtil.replace(page, props);
   return page;
 }