diff --git a/TODO b/TODO
index 322a2be..2b719c6 100644
--- a/TODO
+++ b/TODO
@@ -6,3 +6,8 @@ datas.setAttribute ("
", "class", "border-color: red;")
content too.
+20070213, cpm:
+add a option to do not have to extract the body, to optimize.
+
+20070215, cpm:
+add management of Presenter (String html) with Presenter (String fileName)
diff --git a/src/xid/Presenter.java b/src/xid/Presenter.java
index d07c965..947ddca 100644
--- a/src/xid/Presenter.java
+++ b/src/xid/Presenter.java
@@ -12,14 +12,21 @@ import org.w3c.dom.*;
*/
public class Presenter
{
- static protected org.apache.log4j.Logger log;
static final public char INDEX_SEPARATOR = '_';
+ static protected org.apache.log4j.Logger log;
static
{
log = org.apache.log4j.Logger.getLogger (Presenter.class.getName ());
}
+ static protected String staticRootPath;
+ static
+ {
+ staticRootPath = null;
+ }
+
+
protected String webappPath;
protected String sourceFileName;
protected long sourceFileTime;
@@ -30,19 +37,37 @@ public class Presenter
*/
public Presenter ()
{
- this.webappPath = null;
+ this.webappPath = Presenter.staticRootPath;
this.sourceFileName = null;
this.sourceFileTime = 0;
this.doc = null;
}
+ /*
+ *
+ */
+ public Presenter (String fileName)
+ {
+ this.webappPath = Presenter.staticRootPath;
+ this.sourceFileName = fileName;
+ this.sourceFileTime = 0;
+ this.doc = null;
+ }
+
/*
*
*/
public Presenter (String webappPath, String fileName)
{
- this.webappPath = webappPath;
+ if ((webappPath == null) || (webappPath.equals ("")))
+ {
+ this.webappPath = Presenter.staticRootPath;
+ }
+ else
+ {
+ this.webappPath = webappPath;
+ }
this.sourceFileName = fileName;
this.sourceFileTime = 0;
this.doc = null;
@@ -62,6 +87,22 @@ public class Presenter
return (result);
}
+ /*
+ *
+ */
+ public void setWebappPath (String path)
+ {
+ this.webappPath = path;
+ }
+
+ /*
+ *
+ */
+ static public void setStaticRootPath (String path)
+ {
+ Presenter.staticRootPath = path;
+ }
+
/*
*