]> source.dussan.org Git - gitblit.git/commitdiff
started resolving compile errors. no functional changes made. onle
authorMartin Spielmann <martin.spielmann@pingunaut.com>
Thu, 28 Jul 2016 15:26:16 +0000 (17:26 +0200)
committerMartin Spielmann <martin.spielmann@pingunaut.com>
Thu, 28 Jul 2016 15:26:16 +0000 (17:26 +0200)
replacements like PageParameters.put -> PageParameters.add

21 files changed:
src/main/java/com/gitblit/models/Menu.java
src/main/java/com/gitblit/wicket/GitBlitWebSession.java
src/main/java/com/gitblit/wicket/GitblitRedirectException.java
src/main/java/com/gitblit/wicket/Html5DateField.java
src/main/java/com/gitblit/wicket/MarkupProcessor.java
src/main/java/com/gitblit/wicket/SessionlessForm.java
src/main/java/com/gitblit/wicket/WicketUtils.java
src/main/java/com/gitblit/wicket/charting/Flotr2Charts.java
src/main/java/com/gitblit/wicket/freemarker/FreemarkerPanel.java
src/main/java/com/gitblit/wicket/ng/NgController.java
src/main/java/com/gitblit/wicket/pages/ActivityPage.java
src/main/java/com/gitblit/wicket/pages/LuceneSearchPage.java
src/main/java/com/gitblit/wicket/pages/MyTicketsPage.java
src/main/java/com/gitblit/wicket/pages/PatchPage.java
src/main/java/com/gitblit/wicket/pages/RawPage.java
src/main/java/com/gitblit/wicket/pages/RootPage.java
src/main/java/com/gitblit/wicket/pages/SessionPage.java
src/main/java/com/gitblit/wicket/pages/TicketPage.java
src/main/java/com/gitblit/wicket/pages/TicketsPage.java
src/main/java/com/gitblit/wicket/panels/BooleanChoiceOption.java
src/main/java/com/gitblit/wicket/panels/ShockWaveComponent.java

index 0f2efa2659af4d6a457a08e77b6991819d08c96a..7fb46ddc7076ff7301c5e27a2d26a7ebfe3e13e6 100644 (file)
@@ -108,8 +108,9 @@ public class Menu {
                                isSelected = false;
                        } else {
                                parameters = new PageParameters(params);
-                               if (parameters.containsKey(parameter)) {
-                                       isSelected = params.getString(parameter).equals(value);
+//                             if (parameters.containsKey(parameter)) {
+                               if (!parameters.get(parameter).isEmpty()) {
+                                       isSelected = params.get(parameter).toString().equals(value);
                                        // set the new selection value
                                        setParameter(parameter, value);
                                } else {
@@ -125,7 +126,7 @@ public class Menu {
                                if (StringUtils.isEmpty(value)) {
                                        this.parameters.remove(parameter);
                                } else {
-                                       this.parameters.put(parameter, value);
+                                       this.parameters.add(parameter, value);
                                }
                        }
                }
index 59dfc98753bf39f44b433de2b043ccab9a4680e8..7adbd359a97c8309f0485c7a368d7ee0945b887c 100644 (file)
@@ -21,12 +21,12 @@ import java.util.TimeZone;
 import java.util.concurrent.atomic.AtomicBoolean;\r
 \r
 import org.apache.wicket.Page;\r
+import org.apache.wicket.request.Request;\r
+import org.apache.wicket.request.cycle.RequestCycle;\r
 import org.apache.wicket.request.mapper.parameter.PageParameters;\r
 import org.apache.wicket.RedirectToUrlException;\r
-import org.apache.wicket.Request;\r
 import org.apache.wicket.Session;\r
 import org.apache.wicket.protocol.http.RequestUtils;\r
-import org.apache.wicket.protocol.http.WebRequestCycle;\r
 import org.apache.wicket.protocol.http.WebSession;\r
 import org.apache.wicket.protocol.http.request.WebClientInfo;\r
 \r
@@ -64,10 +64,10 @@ public final class GitBlitWebSession extends WebSession {
         */\r
        public void cacheRequest(Class<? extends Page> pageClass) {\r
                // build absolute url with correctly encoded parameters?!\r
-               Request req = WebRequestCycle.get().getRequest();\r
+               Request req = RequestCycle.get().getRequest();\r
                Map<String, ?> params = req.getRequestParameters().getParameters();\r
                PageParameters pageParams = new PageParameters(params);\r
-               String relativeUrl = WebRequestCycle.get().urlFor(pageClass, pageParams).toString();\r
+               String relativeUrl = RequestCycle.get().urlFor(pageClass, pageParams).toString();\r
                requestUrl = RequestUtils.toAbsolutePath(relativeUrl);\r
                if (isTemporary())\r
                {\r
index a8f9b29b7722442ec2a1548877d9717a33ddcd33..23ac7efa0c38d2cf0fafb9c5fb63a1f486fd7652 100644 (file)
@@ -17,8 +17,8 @@ package com.gitblit.wicket;
 
 import org.apache.wicket.AbstractRestartResponseException;
 import org.apache.wicket.Page;
+import org.apache.wicket.request.cycle.RequestCycle;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
-import org.apache.wicket.RequestCycle;
 import org.apache.wicket.protocol.http.RequestUtils;
 import org.apache.wicket.request.target.basic.RedirectRequestTarget;
 
index 927ee46ee2811a8bfc28ca240e15a4defd26d1b8..66b273dd39bb1f41024abd2443ef9176c873a8b9 100644 (file)
@@ -10,7 +10,7 @@ import org.apache.wicket.markup.html.form.TextField;
 import org.apache.wicket.markup.html.form.AbstractTextComponent.ITextFormatProvider;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.util.convert.IConverter;
-import org.apache.wicket.util.convert.converters.DateConverter;
+import org.apache.wicket.util.convert.converter.DateConverter;
 
 public class Html5DateField extends TextField<Date> implements ITextFormatProvider {
 
index b20320499db908f2a91d6e99162b33711303db82..7826a3b2e2535b8688af5d5a69e88cc5c5c39668 100644 (file)
@@ -30,7 +30,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.wicket.Page;
-import org.apache.wicket.RequestCycle;
+import org.apache.wicket.request.cycle.RequestCycle;
 import org.eclipse.jgit.lib.Repository;
 import org.eclipse.jgit.revwalk.RevCommit;
 import org.eclipse.mylyn.wikitext.confluence.core.ConfluenceLanguage;
index 207513d3dec90c6f0fe9553a594209af4243891a..0d66ebe8c801bfced4dd821bf04dc6d9ac224ec5 100644 (file)
@@ -23,8 +23,8 @@ import org.apache.wicket.markup.ComponentTag;
 import org.apache.wicket.markup.MarkupStream;
 import org.apache.wicket.markup.html.form.StatelessForm;
 import org.apache.wicket.protocol.http.RequestUtils;
-import org.apache.wicket.protocol.http.WicketURLDecoder;
-import org.apache.wicket.protocol.http.request.WebRequestCodingStrategy;
+//import org.apache.wicket.protocol.http.WicketURLDecoder;
+//import org.apache.wicket.protocol.http.request.WebRequestCodingStrategy;
 import org.apache.wicket.util.string.AppendingStringBuffer;
 import org.apache.wicket.util.string.Strings;
 import org.slf4j.Logger;
@@ -100,7 +100,7 @@ public class SessionlessForm<T> extends StatelessForm<T> {
         *            The open tag for the body
         */
        @Override
-       protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag)
+       public void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag)
        {
                // render the hidden bookmarkable page field
                AppendingStringBuffer buffer = new AppendingStringBuffer(HIDDEN_DIV_START);
index 13d02e603a27ef57f1f67753c97710198394ca75..9a778291903f82b4c16fc296b89829dd24842ae2 100644 (file)
@@ -26,19 +26,18 @@ import java.util.TimeZone;
 \r
 import javax.servlet.http.HttpServletRequest;\r
 \r
+import org.apache.wicket.AttributeModifier;\r
 import org.apache.wicket.Component;\r
+import org.apache.wicket.request.Request;\r
+import org.apache.wicket.request.http.WebRequest;\r
 import org.apache.wicket.request.mapper.parameter.PageParameters;\r
-import org.apache.wicket.Request;\r
+import org.apache.wicket.request.resource.ContextRelativeResource;\r
 import org.apache.wicket.behavior.AttributeAppender;\r
 import org.apache.wicket.behavior.HeaderContributor;\r
-import org.apache.wicket.behavior.SimpleAttributeModifier;\r
 import org.apache.wicket.markup.html.IHeaderContributor;\r
-import org.apache.wicket.markup.html.IHeaderResponse;\r
 import org.apache.wicket.markup.html.basic.Label;\r
 import org.apache.wicket.markup.html.image.ContextImage;\r
 import org.apache.wicket.model.Model;\r
-import org.apache.wicket.protocol.http.WebRequest;\r
-import org.apache.wicket.resource.ContextRelativeResource;\r
 import org.eclipse.jgit.diff.DiffEntry.ChangeType;\r
 \r
 import com.gitblit.Constants;\r
@@ -56,7 +55,7 @@ import com.gitblit.utils.TimeUtils;
 public class WicketUtils {\r
 \r
        public static void setCssClass(Component container, String value) {\r
-               container.add(new SimpleAttributeModifier("class", value));\r
+               container.add(new AttributeModifier("class", value));\r
        }\r
 \r
        public static void addCssClass(Component container, String value) {\r
@@ -64,21 +63,21 @@ public class WicketUtils {
        }\r
 \r
        public static void setCssStyle(Component container, String value) {\r
-               container.add(new SimpleAttributeModifier("style", value));\r
+               container.add(new AttributeModifier("style", value));\r
        }\r
 \r
        public static void setCssBackground(Component container, String value) {\r
                String background = MessageFormat.format("background-color:{0};",\r
                                StringUtils.getColor(value));\r
-               container.add(new SimpleAttributeModifier("style", background));\r
+               container.add(new AttributeModifier("style", background));\r
        }\r
 \r
        public static Component setHtmlTooltip(Component container, String value) {\r
-               return container.add(new SimpleAttributeModifier("title", value));\r
+               return container.add(new AttributeModifier("title", value));\r
        }\r
 \r
        public static void setInputPlaceholder(Component container, String value) {\r
-               container.add(new SimpleAttributeModifier("placeholder", value));\r
+               container.add(new AttributeModifier("placeholder", value));\r
        }\r
 \r
        public static void setChangeTypeCssClass(Component container, ChangeType type) {\r
@@ -506,11 +505,11 @@ public class WicketUtils {
        }\r
 \r
        public static String getProjectName(PageParameters params) {\r
-               return params.getString("p", "");\r
+               return params.get("p").toString("");\r
        }\r
 \r
        public static String getRepositoryName(PageParameters params) {\r
-               return params.getString("r", "");\r
+               return params.get("r").toString("");\r
        }\r
 \r
        public static String getObject(PageParameters params) {\r
@@ -540,7 +539,7 @@ public class WicketUtils {
 \r
        public static int getPage(PageParameters params) {\r
                // index from 1\r
-               return params.getInt("pg", 1);\r
+               return params.get("pg").toInt(1);\r
        }\r
 \r
        public static String getRegEx(PageParameters params) {\r
@@ -576,7 +575,7 @@ public class WicketUtils {
        }\r
 \r
        public static String getNameParameter(PageParameters params) {\r
-               return params.getString("n", "");\r
+               return params.get("n").toString("");\r
        }\r
 \r
        public static Label createDateLabel(String wicketId, Date date, TimeZone timeZone, TimeUtils timeUtils) {\r
index 7a8adcf21642183dbb0a7cebf5fb971a97b3cd67..62bec93416e4852f2477d0b8e462309d0f70ba6e 100644 (file)
@@ -17,8 +17,12 @@ package com.gitblit.wicket.charting;
 
 import javax.servlet.ServletContext;
 
-import org.apache.wicket.markup.html.IHeaderResponse;
+import org.apache.wicket.markup.head.IHeaderResponse;
+import org.apache.wicket.markup.head.JavaScriptHeaderItem;
+import org.apache.wicket.markup.head.OnDomReadyHeaderItem;
 import org.apache.wicket.protocol.http.WebApplication;
+import org.apache.wicket.request.resource.ContextRelativeResource;
+import org.apache.wicket.request.resource.ContextRelativeResourceReference;
 
 /**
  * Concrete class for Flotr2 charts
@@ -37,14 +41,14 @@ public class Flotr2Charts extends Charts {
                ServletContext servletContext = WebApplication.get().getServletContext();
                String contextPath = servletContext.getContextPath();
 
-               response.renderJavascriptReference(contextPath + "/bootstrap/js/jquery.js");
-               response.renderJavascriptReference(contextPath + "/flotr2/flotr2.min.js");
-               response.renderCSSReference(contextPath + "/flotr2/flotr2.custom.css");
+               response.render(JavaScriptHeaderItem.forReference(new ContextRelativeResourceReference(contextPath + "/bootstrap/js/jquery.js", false)));
+               response.render(JavaScriptHeaderItem.forReference(new ContextRelativeResourceReference(contextPath + "/flotr2/flotr2.min.js", false)));
+               response.render(JavaScriptHeaderItem.forReference(new ContextRelativeResourceReference(contextPath + "/flotr2/flotr2.custom.css", false)));
 
                // prepare draw chart function
                StringBuilder sb = new StringBuilder();
 
-               line(sb, "$( document ).ready(function() {");
+//             line(sb, "$( document ).ready(function() {");
                line(sb, "try {");
                // add charts to header
                for (Chart chart : charts) {
@@ -57,8 +61,8 @@ public class Flotr2Charts extends Charts {
                line(sb, "  }");
                line(sb, "}");
                // end draw chart function
-               line(sb, "});");
-               response.renderJavascript(sb.toString(), null);
+//             line(sb, "});");
+               response.render(OnDomReadyHeaderItem.forScript(sb.toString()));
        }
 
        @Override
index aaf1a1351abbbdf52184e656a3b7e0d41eca3dc0..f5d1726d738cb1667d2d7a4fad8ff799a39b5357 100644 (file)
@@ -120,7 +120,7 @@ public class FreemarkerPanel extends Panel
         *      MarkupStream, org.apache.wicket.markup.ComponentTag)\r
         */\r
        @Override\r
-       protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag)\r
+       public void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag)\r
        {\r
                if (!Strings.isEmpty(stackTraceAsString))\r
                {\r
index 19e419a02f388bda5831e149b8c756196a93f0af..ea15dcf2efb76501a312d6dbce207dc560d02158 100644 (file)
@@ -19,9 +19,10 @@ import java.text.MessageFormat;
 import java.util.HashMap;\r
 import java.util.Map;\r
 \r
-import org.apache.wicket.ResourceReference;\r
+import org.apache.wicket.markup.head.IHeaderResponse;\r
+import org.apache.wicket.markup.head.JavaScriptHeaderItem;\r
 import org.apache.wicket.markup.html.IHeaderContributor;\r
-import org.apache.wicket.markup.html.IHeaderResponse;\r
+import org.apache.wicket.request.resource.PackageResourceReference;\r
 \r
 import com.google.gson.Gson;\r
 import com.google.gson.GsonBuilder;\r
@@ -54,7 +55,7 @@ public class NgController implements IHeaderContributor {
        @Override\r
        public void renderHead(IHeaderResponse response) {\r
                // add Google AngularJS reference\r
-               response.renderJavascriptReference(new ResourceReference(NgController.class, "angular.js"));\r
+               response.render(JavaScriptHeaderItem.forReference(new PackageResourceReference(NgController.class, "angular.js")));\r
 \r
                Gson gson = new GsonBuilder().create();\r
 \r
@@ -69,7 +70,7 @@ public class NgController implements IHeaderContributor {
                }\r
                line(sb, "}");\r
 \r
-               response.renderJavascript(sb.toString(), null);\r
+               response.render(JavaScriptHeaderItem.forScript(sb.toString(), "angularController"));\r
        }\r
 \r
        private void line(StringBuilder sb, String line) {\r
index 3e71e4d2079a0063a60eef42d0b48748d132f052..af4e39f78704c9387dacb2e8cfffab67044c87df 100644 (file)
@@ -141,8 +141,8 @@ public class ActivityPage extends RootPage {
 \r
                PageParameters currentParameters = getPageParameters();\r
                int daysBack = app().settings().getInteger(Keys.web.activityDuration, 7);\r
-               if (currentParameters != null && !currentParameters.containsKey("db")) {\r
-                       currentParameters.put("db", daysBack);\r
+               if (currentParameters != null && currentParameters.get("db").isEmpty()) {\r
+                       currentParameters.add("db", daysBack);\r
                }\r
 \r
                // preserve time filter options on repository choices\r
index 90661a6c708e24b784b4a0729e622491c114e616..357b5036e74754335515193faf0fa9d85a3db253 100644 (file)
@@ -88,19 +88,19 @@ public class LuceneSearchPage extends RootPage {
 \r
                        page = WicketUtils.getPage(params);\r
 \r
-                       if (params.containsKey("repositories")) {\r
-                               String value = params.getString("repositories", "");\r
+                       if (!params.get("repositories").isEmpty()) {\r
+                               String value = params.get("repositories").toString("");\r
                                List<String> list = StringUtils.getStringsFromValue(value);\r
                                repositories.addAll(list);\r
                        }\r
 \r
-                       allRepos = params.getAsBoolean("allrepos", false);
+                       allRepos = params.get("allrepos").toBoolean(false);
                        if (allRepos) {\r
                                repositories.addAll(availableRepositories);\r
                        }\r
 \r
-                       if (params.containsKey("query")) {\r
-                               query = params.getString("query", "");\r
+                       if (!params.get("query").isEmpty()) {\r
+                               query = params.get("query").toString("");\r
                        } else {\r
                                String value = WicketUtils.getSearchString(params);\r
                                String type = WicketUtils.getSearchType(params);\r
@@ -153,9 +153,9 @@ public class LuceneSearchPage extends RootPage {
                                        return;\r
                                }\r
                                PageParameters params = new PageParameters();\r
-                               params.put("repositories", StringUtils.flattenStrings(repositoriesModel.getObject()));\r
-                               params.put("query", queryModel.getObject());\r
-                               params.put("allrepos", allreposModel.getObject());\r
+                               params.add("repositories", StringUtils.flattenStrings(repositoriesModel.getObject()));\r
+                               params.add("query", queryModel.getObject());\r
+                               params.add("allrepos", allreposModel.getObject());\r
                                LuceneSearchPage page = new LuceneSearchPage(params);\r
                                setResponsePage(page);\r
                        }\r
@@ -249,8 +249,8 @@ public class LuceneSearchPage extends RootPage {
                add(resultsView.setVisible(results.size() > 0));\r
 \r
                PageParameters pagerParams = new PageParameters();\r
-               pagerParams.put("repositories", StringUtils.flattenStrings(repositoriesModel.getObject()));\r
-               pagerParams.put("query", queryModel.getObject());\r
+               pagerParams.add("repositories", StringUtils.flattenStrings(repositoriesModel.getObject()));\r
+               pagerParams.add("query", queryModel.getObject());\r
 \r
                boolean showPager = false;\r
                int totalPages = 0;\r
index f9940cc576803a555ef7d1ef3b991c576a0cf087..a8fcb8a6166ba1a3d36a069771dd4638701ed22f 100644 (file)
@@ -74,13 +74,13 @@ public class MyTicketsPage extends RootPage {
         final String username = currentUser.getName();
 
         final String[] statiiParam = (params == null) ? TicketsUI.openStatii : params.getStringArray(Lucene.status.name());
-        final String assignedToParam = (params == null) ? "" : params.getString(Lucene.responsible.name(), null);
-        final String milestoneParam = (params == null) ? "" : params.getString(Lucene.milestone.name(), null);
-        final String queryParam = (params == null) ? null : params.getString("q", null);
-        final String searchParam = (params == null) ? "" : params.getString("s", null);
-        final String sortBy = (params == null) ? "" : Lucene.fromString(params.getString("sort", Lucene.created.name())).name();
-        final String repositoryId = (params == null) ? "" : params.getString(Lucene.rid.name(), null);
-        final boolean desc = (params == null) ? true : !"asc".equals(params.getString("direction", "desc"));
+        final String assignedToParam = (params == null) ? "" : params.get(Lucene.responsible.name()).toString();
+        final String milestoneParam = (params == null) ? "" : params.get(Lucene.milestone.name()).toString();
+        final String queryParam = (params == null) ? null : params.get("q").toString();
+        final String searchParam = (params == null) ? "" : params.get("s").toString();
+        final String sortBy = (params == null) ? "" : Lucene.fromString(params.get("sort").toString(Lucene.created.name())).name();
+        final String repositoryId = (params == null) ? "" : params.get(Lucene.rid.name()).toString();
+        final boolean desc = (params == null) ? true : !"asc".equals(params.get("direction").toString("desc"));
 
 
         // add the user title panel
index 05a5c952b2a505176bf15ed59ae3234d155b3347..384885ad1bb6aa0bcf1a2f9fbb914298155e1b24 100644 (file)
@@ -36,7 +36,7 @@ public class PatchPage extends SessionPage {
        public PatchPage(final PageParameters params) {\r
                super(params);\r
 \r
-               if (!params.containsKey("r")) {\r
+               if (params.get("r").isEmpty()) {\r
                        error(getString("gb.repositoryNotSpecified"));\r
                        redirectToInterceptPage(new RepositoriesPage());\r
                }\r
index ebbf4b12b349d0438706d635b95ca5f36b3e3bcd..2faa418520c1dc55b12f5d11ec3a56b029c5ed47 100644 (file)
@@ -24,11 +24,10 @@ import java.util.Map;
 \r
 import javax.servlet.http.HttpServletResponse;\r
 \r
-import org.apache.wicket.IRequestTarget;\r
+import org.apache.wicket.request.cycle.RequestCycle;\r
+import org.apache.wicket.request.http.WebRequest;\r
+import org.apache.wicket.request.http.WebResponse;\r
 import org.apache.wicket.request.mapper.parameter.PageParameters;\r
-import org.apache.wicket.RequestCycle;\r
-import org.apache.wicket.protocol.http.WebRequest;\r
-import org.apache.wicket.protocol.http.WebResponse;\r
 import org.apache.wicket.protocol.http.servlet.AbortWithWebErrorCodeException;\r
 import org.eclipse.jgit.lib.Repository;\r
 import org.eclipse.jgit.revwalk.RevCommit;\r
@@ -52,7 +51,7 @@ public class RawPage extends SessionPage {
        public RawPage(final PageParameters params) {\r
                super(params);\r
 \r
-               if (!params.containsKey("r")) {\r
+               if (params.get("r").isEmpty()) {\r
                        error(getString("gb.repositoryNotSpecified"));\r
                        redirectToInterceptPage(new RepositoriesPage());\r
                }\r
index 480ecf83985167297f63cd12ea472d99547ff256..9a28a1f7b4f5ed8d0df125966c166470f7388d89 100644 (file)
@@ -35,11 +35,13 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.wicket.MarkupContainer;
+import org.apache.wicket.request.cycle.RequestCycle;
+import org.apache.wicket.request.http.WebRequest;
+import org.apache.wicket.request.http.WebResponse;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
-import org.apache.wicket.RequestCycle;
 import org.apache.wicket.behavior.HeaderContributor;
+import org.apache.wicket.markup.head.IHeaderResponse;
 import org.apache.wicket.markup.html.IHeaderContributor;
-import org.apache.wicket.markup.html.IHeaderResponse;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.form.TextField;
 import org.apache.wicket.markup.html.link.BookmarkablePageLink;
@@ -49,8 +51,6 @@ import org.apache.wicket.markup.repeater.data.DataView;
 import org.apache.wicket.markup.repeater.data.ListDataProvider;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.Model;
-import org.apache.wicket.protocol.http.WebRequest;
-import org.apache.wicket.protocol.http.WebResponse;
 
 import com.gitblit.Constants;
 import com.gitblit.Constants.AuthenticationType;
@@ -393,8 +393,8 @@ public abstract class RootPage extends BasePage {
                        clonedParams = new PageParameters(params);
                }
 
-               if (!clonedParams.containsKey("db")) {
-                       clonedParams.put("db",  daysBack);
+               if (clonedParams.get("db").isEmpty()) {
+                       clonedParams.add("db",  daysBack);
                }
 
                List<MenuItem> items = new ArrayList<MenuItem>();
@@ -434,7 +434,7 @@ public abstract class RootPage extends BasePage {
                String set = WicketUtils.getSet(params);
                String regex = WicketUtils.getRegEx(params);
                String team = WicketUtils.getTeam(params);
-               int daysBack = params.getInt("db", 0);
+               int daysBack = params.get("db").toInt(0);
                int maxDaysBack = app().settings().getInteger(Keys.web.activityDurationMaximum, 30);
 
                List<RepositoryModel> availableModels = getRepositoryModels();
index 7dd0d06d8924262d09abc5519d06e96da507ce8d..b4cf0db38a33bb0f4d72aec58663e81ae993b2b8 100644 (file)
@@ -18,10 +18,10 @@ package com.gitblit.wicket.pages;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.wicket.request.http.WebRequest;
+import org.apache.wicket.request.http.WebResponse;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
 import org.apache.wicket.markup.html.WebPage;
-import org.apache.wicket.protocol.http.WebRequest;
-import org.apache.wicket.protocol.http.WebResponse;
 
 import com.gitblit.Constants;
 import com.gitblit.Constants.AuthenticationType;
index c1e1cd89902e1be99f104f8faed2c7941558af2a..9de3100dd9af2563831a3f07d8fdb2dce33ea9a4 100644 (file)
@@ -265,7 +265,7 @@ public class TicketPage extends RepositoryPage {
                        } else {\r
                                milestoneParameters = WicketUtils.newRepositoryParameter(repositoryName);\r
                        }\r
-                       milestoneParameters.put(Lucene.milestone.name(), ticket.milestone);\r
+                       milestoneParameters.add(Lucene.milestone.name(), ticket.milestone);\r
                        int progress = 0;\r
                        int open = 0;\r
                        int closed = 0;\r
index bc4009bef73485c86e8cae2677c47c437b4cb51f..f99464af088a67bd55eaf3cb9c98b1de5f354c75 100644 (file)
@@ -24,9 +24,9 @@ import java.util.List;
 import java.util.Set;\r
 import java.util.TreeSet;\r
 \r
+import org.apache.wicket.AttributeModifier;\r
 import org.apache.wicket.Component;\r
 import org.apache.wicket.request.mapper.parameter.PageParameters;\r
-import org.apache.wicket.behavior.SimpleAttributeModifier;\r
 import org.apache.wicket.markup.html.basic.Label;\r
 import org.apache.wicket.markup.html.link.BookmarkablePageLink;\r
 import org.apache.wicket.markup.html.panel.Fragment;\r
@@ -367,7 +367,7 @@ public class TicketsPage extends RepositoryPage {
                                                tq.color = StringUtils.getColor(tq.name);\r
                                        }\r
                                        String background = MessageFormat.format("background-color:{0};", tq.color);\r
-                                       swatch.add(new SimpleAttributeModifier("style", background));\r
+                                       swatch.add(new AttributeModifier("style", background));\r
                                        item.add(swatch);\r
                                        if (activeQuery.contains(tq.query)) {\r
                                                // selected\r
@@ -377,7 +377,7 @@ public class TicketsPage extends RepositoryPage {
                                                Label checked = new Label("checked");\r
                                                WicketUtils.setCssClass(checked, "iconic-o-x");\r
                                                item.add(checked);\r
-                                               item.add(new SimpleAttributeModifier("style", background));\r
+                                               item.add(new AttributeModifier("style", background));\r
                                        } else {\r
                                                // unselected\r
                                                String q = QueryBuilder.q(queryParam).toSubquery().and(tq.query).build();\r
index 98a700b763a5848aacb678fea2b19223149535a1..9de3aa1781b09181752dceae12ef973d96757606 100644 (file)
@@ -68,7 +68,7 @@ public class BooleanChoiceOption<T> extends BasePanel {
                        @Override\r
                        protected void onUpdate(AjaxRequestTarget target) {\r
                                choice.setEnabled(checkbox.getModelObject());\r
-                               target.addComponent(choice);\r
+                               target.add(choice);\r
                                if (!choice.isEnabled()) {\r
                                        choice.setModelObject(null);\r
                                }\r
index 78822c6df233bce0bc6ab38a51fe6e91a664fa89..416337f4eb1872114efb514fbff7e9e4f1b19759 100644 (file)
@@ -22,9 +22,9 @@ import java.util.HashMap;
 import java.util.List;\r
 import java.util.Map;\r
 \r
-import org.apache.wicket.Response;\r
 import org.apache.wicket.markup.ComponentTag;\r
 import org.apache.wicket.markup.MarkupStream;\r
+import org.apache.wicket.request.Response;\r
 import org.apache.wicket.util.value.IValueMap;\r
 \r
 /**\r