Author: almaw Date: Tue Jun 5 10:39:42 2007 New Revision: 544573 URL: http://svn.apache.org/viewvc?view=rev&rev=544573 Log: Default CSS.
Modified: incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/form/upload/UploadProgressBar.java Modified: incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/form/upload/UploadProgressBar.java URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/form/upload/UploadProgressBar.java?view=diff&rev=544573&r1=544572&r2=544573 ============================================================================== --- incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/form/upload/UploadProgressBar.java (original) +++ incubator/wicket/trunk/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/form/upload/UploadProgressBar.java Tue Jun 5 10:39:42 2007 @@ -64,9 +64,12 @@ } } - private static final ResourceReference JS_PROGRESSBAR = new ResourceReference( + private static final ResourceReference JS = new ResourceReference( UploadProgressBar.class, "progressbar.js"); + private static final ResourceReference CSS = new ResourceReference( + UploadProgressBar.class, "UploadProgressBar.css"); + private static final String RESOURCE_NAME = UploadProgressBar.class.getName(); private static final long serialVersionUID = 1L; @@ -82,7 +85,12 @@ form.setOutputMarkupId(true); setRenderBodyOnly(true); - add(HeaderContributor.forJavaScript(JS_PROGRESSBAR)); + add(HeaderContributor.forJavaScript(JS)); + ResourceReference css = getCss(); + if (css != null) + { + add(HeaderContributor.forCss(css)); + } final WebMarkupContainer barDiv = new WebMarkupContainer("bar"); barDiv.setOutputMarkupId(true); @@ -112,6 +120,16 @@ + getPage().urlFor(ref) + "'); wupb.start(def); return false;"; } })); + } + + /** + * Override this to provide your own CSS, or return null to avoid including the default. + * + * @return ResourceReference for your CSS. + */ + protected ResourceReference getCss() + { + return CSS; } }