You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2013/11/20 13:51:49 UTC
git commit: WICKET-5420 Make UploadProgressBar easier to extend
Updated Branches:
refs/heads/wicket-6.x 5a73fe98b -> f803e1d21
WICKET-5420 Make UploadProgressBar easier to extend
Change the type of the bar and status components to MarkupContainer so they can have children if needed
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/f803e1d2
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/f803e1d2
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/f803e1d2
Branch: refs/heads/wicket-6.x
Commit: f803e1d21084ce2d9de31fc16b901cf8510c6d66
Parents: 5a73fe9
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Wed Nov 20 14:51:01 2013 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Wed Nov 20 14:51:01 2013 +0200
----------------------------------------------------------------------
.../html/form/upload/UploadProgressBar.java | 23 ++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/f803e1d2/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/form/upload/UploadProgressBar.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/form/upload/UploadProgressBar.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/form/upload/UploadProgressBar.java
index e69582d..0240319 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/form/upload/UploadProgressBar.java
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/form/upload/UploadProgressBar.java
@@ -21,6 +21,7 @@ import java.util.Formatter;
import org.apache.wicket.Application;
import org.apache.wicket.Component;
import org.apache.wicket.IInitializer;
+import org.apache.wicket.MarkupContainer;
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.markup.head.CssHeaderItem;
import org.apache.wicket.markup.head.IHeaderResponse;
@@ -114,9 +115,9 @@ public class UploadProgressBar extends Panel
private final Form<?> form;
- private Component statusDiv;
+ private MarkupContainer statusDiv;
- private Component barDiv;
+ private MarkupContainer barDiv;
private final FileUploadField uploadField;
@@ -175,14 +176,28 @@ public class UploadProgressBar extends Panel
add(statusDiv);
}
- protected Component newStatusComponent(String id)
+ /**
+ * Creates a component for the status text
+ *
+ * @param id
+ * The component id
+ * @return the status component
+ */
+ protected MarkupContainer newStatusComponent(String id)
{
WebMarkupContainer status = new WebMarkupContainer(id);
status.setOutputMarkupId(true);
return status;
}
- protected Component newBarComponent(String id)
+ /**
+ * Creates a component for the bar
+ *
+ * @param id
+ * The component id
+ * @return the bar component
+ */
+ protected MarkupContainer newBarComponent(String id)
{
WebMarkupContainer bar = new WebMarkupContainer(id);
bar.setOutputMarkupId(true);