[Yanel-commits] rev 32578 - public/yanel/trunk/src/realms/yanel-website/content

michi at wyona.com michi at wyona.com
Wed Feb 27 16:14:57 CET 2008


Author: michi
Date: 2008-02-27 16:14:56 +0100 (Wed, 27 Feb 2008)
New Revision: 32578

Modified:
   public/yanel/trunk/src/realms/yanel-website/content/95106ce8-a6db-4abe-bbc3-7b4b6d0fc855
Log:
clarified

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-02-27 14:32:38 UTC (rev 32577)
+++ public/yanel/trunk/src/realms/yanel-website/content/95106ce8-a6db-4abe-bbc3-7b4b6d0fc855	2008-02-27 15:14:56 UTC (rev 32578)
@@ -1,2 +1,7 @@
-<?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 date (images, javascript, css etc.) within your resource-type you can place it either in webapp/htdocs (global) or in your-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><tt>getResourcesHtdocs (Resource resource) </tt><br/><br/><tt>getGlobalHtdocs (Resource resource)</tt></p><p>for example:</p><p><tt>sb.append(&quot;&lt;script src=\&quot;&quot; + PathUtil.getGlobalHtdocs(this) + &quot;yanel-js/prototype.js\&quot; type=\&quot;text/javascript\&quot;&gt;&lt;/script&gt;&quot;);</tt></p><p>resp.</p><p><tt>sb.append(&quot;&lt;script src=\&q!
 uot;&quot; + PathUtil.getResourcesHtdocs(this)+ &quot;js/ajaxlookup.js\&quot; type=\&quot;text/javascript\&quot;&gt;&lt;/script&gt;&quot;);</tt><br/></p></body>
+<?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>getResourcesHtdocs(Resource resource) <br/></tt></p><p>for example:</p>
+<p><tt>sb.append(&quot;&lt;script src=\&quot;&quot; + PathUtil.getGlobalHtdocs(this) +
+&quot;yanel-js/prototype.js\&quot; type=\&quot;text/javascript\&quot;&gt;&lt;/script&gt;&quot;);</tt></p>
+<p>will generate:<tt><br/></tt></p>
+
+<p><tt>&lt;script src=&quot;REALM/yanel/yanel-js/prototype.js&quot; type=\&quot;text/javascript\&quot;&gt;&lt;/script&gt;</tt></p><p>whereas REALM denotes the path back to the realm root and &quot;yanel&quot; is the reserved prefix (configured within web.xml)<br/><br/><b>Global:</b> <tt><br/></tt></p><p><tt>getGlobalHtdocs(Resource resource)</tt></p><p>for example:<br/></p><p><tt>sb.append(&quot;&lt;script src=\&quot;&quot; + PathUtil.getResourcesHtdocs(this)+ &quot;js/ajaxlookup.js\&quot; type=\&quot;text/javascript\&quot;&gt;&lt;/script&gt;&quot;);</tt></p><p>will generate:<br/></p><p><tt>&lt;script src=&quot;REALM/yanel/resource-types/http://www.wyona.org/yanel/resource/1.0::tinymce/js/ajaxlookup.js&quot; type=\&quot;text/javascript\&quot;&gt;&lt;/script&gt;</tt></p></body>
 </html>
\ No newline at end of file



More information about the Yanel-commits mailing list