Juergen Donnerstag wrote:
seems like last-mod time should be construction time of the object, not
null.
it is null, because the watcher implementation checks that value. If
it is null, if will tell you that this resource can not be watched
(like jar entries).
you're correct.
but actually, i was just thinking about this in the shower...
i think there should be a setter to set a lastModified field on the object. then someone could retrieve a dated string resource from some other location (like a database) and set the last modified value on the string resource. the lastModified() method would simply return this field, and the field would default to null as you suggest.
the docs are wrong on File/UrlResource (i'll fix in a second). it should always be the mime type. my point is that wicket.util.resource is a generic package that should know nothing about html. so a better default is not to give a mime sub-type. i forget if this is "text/text" or just "text".
also, since wicket.util is generic, it seems like this:
this(string, "text/html");
should be
this(string, "text");
Im not sure. it seems not be treated consistently currenlty.
from IResource
* @return The mime type of this resource, such as "image/jpeg" or
* "text/html"
from File/UrlResource
* @return The extension of this resource, such as "jpeg" or "html"
from URLConnection.getFileNameMap().getContentTypeFor()
Gets the MIME type for the specified file name. and this is how we use it
response.setContentType(resource.getContentType());
so it really should be the MIME type.
and usages that care about the subtype html should use the two arg
constructor.
yes, ok understood.
i suppose i might be a little purist though, so i didn't make the change. up to you, juergen! ;-)
okay, i keep getting distracted by wicket... i gotta get back to my other stuff!! ;-)
jon
------------------------------------------------------- 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
------------------------------------------------------- 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
