java - Where to put resources for ClientBundle in GWT? -
i want keep static resources out of class tree, have them in src/main/resources
tree. though should found using same path java class, like:
package my.path.to;
class resourcebundle extends clientbundle { @source("src/main/resources/my/path/to/resourcebundle/myicon.png") imageresource myicon(); }
do have write @source
path reference them? or can somehow tell clientbundle
in same dir java class, in resources?
by default in same directory java class. typically put graphics in sub package of resorces package. keeps java clean , separated , don't have absolute path. believe ../ relative path works if wanted way seems more clean me put images in sub package of resources.
com.vf.client.resources
com.vf.client.resources.images
com.vf.client.resources.css
/** * draggable cursor icon. * * <br /> * example * * <img src="images/cursordragarrowsmall.png" /> * @return imageresource */ @source("images/cursordragarrowsmall.png") imageresource cursordragarrowsmall();
Comments
Post a Comment