Eelco Hillenius wrote:
It is great that the cachability of images is solved. Solved nice too! I refactored the tree a bit, to use these images, so the last thing to wait for to make the tree really stand on its own, is to have the CSS issue solved (oh, and I have to come up with better CSS names as well).
i'm working on CSS. if we can't get it done for 1.0, maybe tree should wait for 1.1.
there are other things that depend on css a bit which i think ought to move to contrib until 1.1.
in particular, the sortable headers stuff depends on css. but more importantly, it's going to
depend on a really nice wicket hibernate sub-framework because you want HQL sorting
to integrate beautifully with column headers... we're just not going to accomplish all this
in the next couple weeks. so i think we ought to back off a bit on css and hibernate
related components.
there's nothing that says we can't make 1.1 a far quicker release cycle...
let's do css and hibernate once and do it right!
However, there's a slight problem with those images still. Look at Image:
protected IResource getResource()
{
if (resourcePath.indexOf("..") != -1 || resourcePath.indexOf("/") != -1)
{
throw new WicketRuntimeException("Source for image resource cannot contain a path");
}
final String path = Classes.packageName(getPage().getClass()) + "." + resourcePath;
return Resource.locate
(
getApplicationSettings().getSourcePath(),
getPage().getClass().getClassLoader(),
path,
style,
locale,
null
);
}
As there is getPage().getClass(), it will allways look for resources relative to the package where the current page is in, which is not right I think. For one thing, I had to hack a bit for the tree to be able to include images from the same package as where the tree is in.
ugh. right.
i need to think about this one a bit...
one thing that pops in my head is that this logic doesn't belong in getResource(). it might instead call a method getResourcePath(String resourcePath), passing in the resourcePath from the src tag.
but i think there's more to it...
Any idea's how this should be solved best? I though about getParent().getClass(), but that would be very unpredictable.
Btw, has any work been done to set the cache headers of those application/ session scoped resources?
nope. that would be a good idea. when should a shared "dynamic" image expire? maybe use a good default and give the user control here?
Eelco
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Wicket-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Wicket-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop
