[Yanel-commits] rev 37262 -
public/yanel/trunk/src/realms/yanel-website/content
michi at wyona.com
michi at wyona.com
Fri Jun 27 11:16:04 CEST 2008
Author: michi
Date: 2008-06-27 11:16:04 +0200 (Fri, 27 Jun 2008)
New Revision: 37262
Modified:
public/yanel/trunk/src/realms/yanel-website/content/95106ce8-a6db-4abe-bbc3-7b4b6d0fc855
Log:
docu fixed
Modified: public/yanel/trunk/src/realms/yanel-website/content/95106ce8-a6db-4abe-bbc3-7b4b6d0fc855
===================================================================
--- public/yanel/trunk/src/realms/yanel-website/content/95106ce8-a6db-4abe-bbc3-7b4b6d0fc855 2008-06-27 09:04:29 UTC (rev 37261)
+++ public/yanel/trunk/src/realms/yanel-website/content/95106ce8-a6db-4abe-bbc3-7b4b6d0fc855 2008-06-27 09:16:04 UTC (rev 37262)
@@ -1,9 +1,18 @@
-<?xml version="1.0"?><html xmlns="http://www.w3.org/1999/xhtml"><head> <title>Created from template ...</title> <link rel="neutron-introspection" type="application/neutron+xml" href="?yanel.resource.usecase=introspection"/></head><body> <h1>Access global and resource type specific data from a resource type</h1><p>If you need to access global or resource type specific data (e.g. images, javascript, css etc.) from within your resource-type, then you can place it either in webapps/yanel/htdocs (global) or in MY-RESOURCE_TYPE/htdocs (resource type specific).</p><p>To access the data there are two helper methods in <tt>org.wyona.yanel.core.util.PathUtil</tt>:</p><p><b>Resource type specific:</b><tt><br/></tt></p><p><tt>getResourcesHtdocsPath</tt><tt>(Resource resource) <br/></tt></p><p>for example:</p>
-<p><tt>sb.append("<script src=\"" + PathUtil.getResourcesHtdocsPath(this) +
+<?xml version="1.0"?><html xmlns="http://www.w3.org/1999/xhtml"><head> <title>Created from template ...</title> <link rel="neutron-introspection" type="application/neutron+xml" href="?yanel.resource.usecase=introspection"/></head><body> <h1>Access global and resource type specific data from a resource type</h1><p>If you need to access global or resource type specific data (e.g. images, javascript, css etc.) from within your resource-type, then you can place it either in webapps/yanel/htdocs (global) or in MY-RESOURCE_TYPE/htdocs (resource type specific).</p><p>To access the data there are two helper methods in <tt>org.wyona.yanel.core.util.PathUtil</tt>:</p><p><b>Resource type specific:</b><tt><br/></tt></p><p><tt>getResourcesHtdocsPathURLencoded</tt><tt>(Resource resource) <br/></tt></p><p>for example:</p>
+<p><tt>sb.append("<script src=\"" + PathUtil.getResourcesHtdocsPathURLencoded(this) +
"js/ajaxlookup.js\" type=\"text/javascript\"></script>");</tt></p>
<p>will generate:</p><p><tt><script
-src="BACK2REALM/yanel/resource-types/http://www.wyona.org/yanel/resource/1.0::tinymce/js/ajaxlookup.js"
+src="BACK2REALM/yanel/resource-types/http%3a%2f%2fwww.wyona.org%2fyanel%2fresource%2f1.0%3a%3atinymce/js/ajaxlookup.js"
type=\"text/javascript\"></script></tt></p>
-<p>whereas BACK2REALM denotes the path back to the realm root and "yanel" is the reserved prefix (configured within web.xml)<br/><br/><b>Global:</b> <tt><br/></tt></p><p><tt>getGlobalHtdocsPath(Resource resource)</tt></p><p>for example:<br/></p><p><tt>sb.append("<script src=\"" + PathUtil.getGlobalHtdocsPath(this) +
+<p>whereas BACK2REALM denotes the path back to the realm root and "yanel" is the reserved prefix (configured within web.xml) and
+for example the file js/ajaxlookup.js is located at MY-RESOURCE_TYPE/htdocs/js/ajaxlookup.js (and for example the file RESERVED_PREFIX/js/ajaxlookup.js would be located at MY-RESOURCE_TYPE/yanel-htdocs/js/ajaxlookup.js)
+
+
+<br/><br/>
+(Please note that the method getResourcesHtdocsPath(Resource) is deprecated!)
+
+<br/><br/>
+
+<b>Global:</b> <tt><br/></tt></p><p><tt>getGlobalHtdocsPath(Resource resource)</tt></p><p>for example:<br/></p><p><tt>sb.append("<script src=\"" + PathUtil.getGlobalHtdocsPath(this) +
"yanel-js/prototype.js\" type=\"text/javascript\"></script>");</tt></p><p>will generate:<br/></p><p><tt><script src="BACK2REALM/yanel/yanel-js/prototype.js" type=\"text/javascript\"></script></tt></p></body>
-</html>
\ No newline at end of file
+</html>
More information about the Yanel-commits
mailing list