Author: ehillenius Date: Mon Jul 16 13:12:13 2007 New Revision: 556718 URL: http://svn.apache.org/viewvc?view=rev&rev=556718 Log: + javadoc warning about dynamic resources
Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/DynamicWebResource.java Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/DynamicWebResource.java URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/DynamicWebResource.java?view=diff&rev=556718&r1=556717&r2=556718 ============================================================================== --- incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/DynamicWebResource.java (original) +++ incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/DynamicWebResource.java Mon Jul 16 13:12:13 2007 @@ -30,6 +30,13 @@ /** * An WebResource subclass for dynamic resources (resources created * programmatically). + * <p> + * This class caches the generated resource in memory, and is thus very useful + * for things you generate dynamically, but reuse for a while after that. If you + * need resources that stream directly and are not cached, extend + * [EMAIL PROTECTED] WebResource} directly and implement + * [EMAIL PROTECTED] WebResource#getResourceStream()} yourself. + * </p> * * @author Jonathan Locke * @author Johan Compagner @@ -88,24 +95,25 @@ /** The filename that will be set as the Content-Disposition header. */ private final String filename; - + /** * Creates a dynamic resource. */ public DynamicWebResource() { - this(null,null); + this(null, null); } /** * Creates a dynamic resource. * - * @param filename - * The filename that will be set as the Content-Disposition header. + * @param filename + * The filename that will be set as the Content-Disposition + * header. */ public DynamicWebResource(String filename) { - this(null,filename); + this(null, filename); } /** @@ -116,15 +124,17 @@ */ public DynamicWebResource(Locale locale) { - this(locale,null); + this(locale, null); } + /** * Creates a dynamic resource from for the given locale * * @param locale * The locale of this resource - * @param filename - * The filename that will be set as the Content-Disposition header. + * @param filename + * The filename that will be set as the Content-Disposition + * header. */ public DynamicWebResource(Locale locale, String filename) { @@ -139,11 +149,12 @@ protected void setHeaders(WebResponse response) { super.setHeaders(response); - if(filename != null) + if (filename != null) { response.setAttachmentHeader(filename); } - } + } + /** * Returns the resource locale. *