some skin fixes

This commit is contained in:
hns 2001-01-11 16:28:02 +00:00
parent 4f34e0f73f
commit 28df583817
2 changed files with 10 additions and 4 deletions

View file

@ -15,13 +15,13 @@ import helma.objectmodel.INode;
* An EcmaScript object that makes stuff in a hashtable accessible as its properties * An EcmaScript object that makes stuff in a hashtable accessible as its properties
*/ */
public class ESRequestData extends ESObject { public class ESRequestData extends ESWrapper {
private Hashtable data; private Hashtable data;
private RequestEvaluator reval; private RequestEvaluator reval;
public ESRequestData (RequestEvaluator reval) { public ESRequestData (RequestEvaluator reval) {
super (null, reval.evaluator); super (new Object(), reval.evaluator);
this.reval = reval; this.reval = reval;
} }

View file

@ -111,6 +111,7 @@ public class Skin {
if (!escape && state == PARAMVALUE) { if (!escape && state == PARAMVALUE) {
if (quotechar == cnt[i]) { if (quotechar == cnt[i]) {
parameters.put (lastParamName, b.toString()); parameters.put (lastParamName, b.toString());
lastParamName = null;
b.setLength (0); b.setLength (0);
state = PARAMNAME; state = PARAMNAME;
quotechar = '\u0000'; quotechar = '\u0000';
@ -134,6 +135,7 @@ public class Skin {
state = PARAMNAME; state = PARAMNAME;
} else if (state == PARAMVALUE && quotechar == '\u0000') { } else if (state == PARAMVALUE && quotechar == '\u0000') {
parameters.put (lastParamName, b.toString()); parameters.put (lastParamName, b.toString());
lastParamName = null;
b.setLength (0); b.setLength (0);
state = PARAMNAME; state = PARAMNAME;
} else if (state == PARAMVALUE) } else if (state == PARAMVALUE)
@ -154,8 +156,12 @@ public class Skin {
escape = false; escape = false;
} }
} }
if (lastParamName != null && b.length() > 0) if (b.length() > 0) {
parameters.put (lastParamName, b.toString()); if (lastParamName != null && b.length() > 0)
parameters.put (lastParamName, b.toString());
else if (state <= MACRO)
name = b.toString().trim();
}
} }