Thursday, October 21, 2010

An image directory shared across projects?

Okay here's the story:

1. I have a widget, HelpWidget, in a common jar, "common-widgets", and
used by many other web projects
2. The HelpWidget includes an Anchor that points to an html file
"help.html", also stored in common-widgets.
3. A ClientBundle is used to make "help.html" loadable from other web
app projects:


public interface HelpBundle extends ClientBundle {
...
@Source("help.html")
public DataResource helpPage();
}

public class HelpWidget extends Widget {
...
String url = StylesBundle.INSTANCE.helpPage().getUrl();
Anchor helpAnchor = new Anchor("Help",url);
...
}

So far so good. but... help.html has img tags for screenshots with
relative paths like "/images/screenshot1.png." I tried putting the
images folder at the same level help.html but this doesn't work - the
image urls don't resolve. Also it's already weird to have an html
file along with java files in the package that holds HelpBundle.
Putting a folder with images there seems even odder.

So how can I deliver a directory of images for which such help.html
img hrefs will work no matter which war is making use of HelpWidget?

Many thanks for any suggestions you can provide. My backup solution
is to just make a new web project that does nothing but contain the
help files.

thanks,
-mike

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate