Access global and resource type specific data from a resource type

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).

To access the data there are two helper methods in org.wyona.yanel.core.util.PathUtil.

getResourcesHtdocs (Resource resource)

getGlobalHtdocs (Resource resource)

for example:

sb.append("<script src=\"" + PathUtil.getGlobalHtdocs(this) + "yanel-js/prototype.js\" type=\"text/javascript\"></script>");

resp.

sb.append("<script src=\"" + PathUtil.getResourcesHtdocs(this)+ "js/ajaxlookup.js\" type=\"text/javascript\"></script>");



Your comments are much appreciated

Is the content of this page unclear or you think it could be improved? Please add a comment and we will try to improve it accordingly.