[seam-dev] WebResource
Pete Muir
pmuir at redhat.com
Fri Oct 3 06:22:30 EDT 2008
If they are static you don't need any sort of store. Just package
stuff in ui/src/main/resources/org/jboss/seam/ui/resource/
On 3 Oct 2008, at 08:11, Nicklas Karlsson wrote:
> Hi,
>
> Working on the s:debug tag and loading of css/js/image resources I
> noticed WebResource, how is it used? Are you just supposed to put your
> stuff
> in subpackages of org.jboss.seam.ui.resource?
>
> I notice that there are a few custom implementations of
> AbstractResource but since all I'd like to do is serve static
> resources from a JAR file, would
> it be a good idea if there would be some sort of general
> WebResourceStore (in the same manner as there is a GraphicImageStore)
> and the WebResource
> would use the WebResourceStore in the same manner as
> GraphicImageResource uses GraphicImageStore (although that one seems
> to be used for one-time-fetches)?
>
> I could then e.g. in my tag encode do
>
> Check that resources are not already added
> Get byte[] from resource
> ResourceWrapper wrapper = new ResourceWrapper(bytedata, mimetype);
> WebResourceStore.instance().put(wrapper, stringhandle)
>
> and then have the resources available in session scope...
>
> ---
> Nik
> _______________________________________________
> seam-dev mailing list
> seam-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/seam-dev
More information about the seam-dev
mailing list