First simple and not very efficient implementation of res.skinpath,

which can contain one singel directoy in which to look for skins.
The skin resolution looks like this now:

 1) res.skinpath (directory)
 2) nodemanagers (internal HopObjects marked as skinmanagers)
 3) application directory
This commit is contained in:
hns 2002-03-19 19:26:07 +00:00
parent c56befd4d4
commit c6b7f10d11

View file

@ -209,6 +209,7 @@ public class RequestEvaluator implements Runnable {
req.data = reqData; req.data = reqData;
resData.setData (res.getResponseData()); resData.setData (res.getResponseData());
res.data = resData; res.data = resData;
res.skinpath = app.getProperty ("skinpath");
try { try {
@ -832,7 +833,18 @@ public class RequestEvaluator implements Runnable {
if (skin != null) { if (skin != null) {
return skin; return skin;
} }
// Skin skin = null; // check for skin path
if (res.skinpath != null) {
File f = new File (res.skinpath, proto.getName());
f = new File (f, skinname+".skin");
if (f.exists ()) {
SkinFile sf = new SkinFile (f, skinname, proto);
skin = sf.getSkin ();
if (skin != null)
return skin;
}
}
// check for Helma-internal skinmanager nodes
if (skinmanagers == null) if (skinmanagers == null)
getSkinManagers (); getSkinManagers ();
do { do {