[GitHub] wicket pull request #283: Wicket-6563 page store implementation

2018-12-13 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/283#discussion_r241308791
  
--- Diff: 
wicket-core/src/main/java/org/apache/wicket/DefaultPageManagerProvider.java ---
@@ -167,6 +168,10 @@ protected IPageStore newPersistentStore()
Bytes maxSizePerSession = storeSettings.getMaxSizePerSession();
File fileStoreFolder = storeSettings.getFileStoreFolder();
 
-   return new DiskPageStore(application.getName(), 
fileStoreFolder, maxSizePerSession, getSerializer());
+   if (storeSettings.isEncrypted()) {
--- End diff --

Well the delegation could be done by a default implementation (for example 
as long as you return a store to delegate to). But I think you are right - the 
store configuration is rather static and because of this the stack is more 
verbose and not worth the effort to make it that configurable.


---


[GitHub] wicket pull request #283: Wicket-6563 page store implementation

2018-12-07 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/283#discussion_r239994141
  
--- Diff: 
wicket-core/src/main/java/org/apache/wicket/pageStore/disk/NestedFolders.java 
---
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.pageStore.disk;
+
+import java.io.File;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.wicket.util.file.Files;
+import org.apache.wicket.util.lang.Args;
+
+/**
+ * Helps creating nested folders.
+ * 
+ * @author svenmeier
+ */
+public class NestedFolders
+{
+   private final File base;
+   
+   /**
+* Create folders in the given base folder.
+* 
+* @param base base has to be a folder
+*/
+   public NestedFolders(File base) {
+   this.base = Args.notNull(base, "base");
+   }
+   
+   public File getBase()
+   {
+   return base;
+   }
+   
+   /**
+* Get a nested folder for the given name.
+* 
+* @param name name 
+* @param create
+* @return
+*/
+   public File get(String name, final boolean create) {
+   name = name.replace('*', '_');
+   name = name.replace('/', '_');
--- End diff --

What about \ in windows?


---


[GitHub] wicket pull request #283: Wicket-6563 page store implementation

2018-12-07 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/283#discussion_r239994086
  
--- Diff: 
wicket-core/src/main/java/org/apache/wicket/DefaultPageManagerProvider.java ---
@@ -167,6 +168,10 @@ protected IPageStore newPersistentStore()
Bytes maxSizePerSession = storeSettings.getMaxSizePerSession();
File fileStoreFolder = storeSettings.getFileStoreFolder();
 
-   return new DiskPageStore(application.getName(), 
fileStoreFolder, maxSizePerSession, getSerializer());
+   if (storeSettings.isEncrypted()) {
--- End diff --

Maybe it would be nice to not make the chain configurable by a field in 
general but to have something more spring like. (Like in case of spring Filters)

They implemented it with a List in which you can add filter at various 
places and they delegate to each other. You can add new filters in between like 
filters.add(0,new MyFilter(...));

WDYT?


---


[GitHub] wicket issue #272: Document role based authorization for packages

2018-08-08 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/272
  
This PR has been merged.


---


[GitHub] wicket issue #288: Fix JavaDoc warnings in wicket-util

2018-08-03 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/288
  
This PR has been merged.

Thanks a lot for the changes!


---


[GitHub] wicket issue #284: Adds missing @Override annotations

2018-07-31 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/284
  
This PR has been merged.

Thanks a lot for the changes!


---


[GitHub] wicket issue #285: Improve some logging statements

2018-07-31 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/285
  
This PR has been merged and can be closed.

Thanks a lot for the changes!


---


[GitHub] wicket issue #275: [WICKET-6544] mobile browser detection is improved (with ...

2018-07-17 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/275
  
Hey @solomax - sadly I am totally busy right now, but I try my best to 
change this. 


---


[GitHub] wicket issue #283: Wicket-6563 page store implementation

2018-07-16 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/283
  
A lot of changes there and we should carefully test this, but I like the 
idea to unify PageStore / DataStore! 👍 


---


[GitHub] wicket issue #275: [WICKET-6544] mobile browser detection is improved (with ...

2018-06-26 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/275
  
Due to the vote that Wicket is going to drop the support of Browser 
detection I am closing this branch right now.

@solomax - yes why not a wicketstuff module. 👍 

/closed




---


[GitHub] wicket pull request #275: [WICKET-6544] mobile browser detection is improved...

2018-06-26 Thread klopfdreh
Github user klopfdreh closed the pull request at:

https://github.com/apache/wicket/pull/275


---


[GitHub] wicket issue #275: [WICKET-6544] mobile browser detection is improved (with ...

2018-04-26 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/275
  
To create UserAgentAnalyzer takes rather a long time. Maybe we are able to 
find a way to resolve the bottleneck, but my concerns to implement the browser 
detection in such a bad way like it was before also still hold.

Also when I see the benchmarks I would consider to just inform about the 
bottleneck and keep it that way, or to turn it gatherExtendedInfo() off if 
0.011ms are to much.


---


[GitHub] wicket pull request #275: [WICKET-6544] mobile browser detection is improved...

2018-04-26 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/275#discussion_r184343253
  
--- Diff: 
wicket-core/src/main/java/org/apache/wicket/protocol/http/request/WebClientInfo.java
 ---
@@ -133,24 +140,99 @@ public final String getUserAgent()
}
 
/**
-* returns the user agent string (lower case).
+* Initializes the {@link WebClientInfo} user agent detection. This can 
be overridden to choose
+* a different detection as YAUAA 
(https://github.com/nielsbasjes/yauaa) - if you do so, you
+* might exclude the maven dependency from your project in favor of a 
different framework.
+*/
--- End diff --

Ok, then keep the dependency and just override it. We have to adjust the 
documentation here.


---


[GitHub] wicket issue #269: [WICKET-6544] mobile browser detection is improved

2018-04-25 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/269
  
Close this one in favour of the mentioned one? 
(https://github.com/apache/wicket/pull/275)


---


[GitHub] wicket issue #275: [WICKET-6544] mobile browser detection is improved (with ...

2018-04-25 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/275
  
What about merging this? Or do we proceed with this PR after the release 
@bitstorm ?


---


[GitHub] wicket issue #275: [WICKET-6544] mobile browser detection is improved (with ...

2018-04-20 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/275
  
I send you an invitation to the repo in which the branch of the PR is 
located. just push to it and merge if you are done. I think we are on a good 
way with this integration.


---


[GitHub] wicket issue #275: [WICKET-6544] mobile browser detection is improved (with ...

2018-04-20 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/275
  
Hi @solomax - thanks a lot for the review. Because I am not able to work on 
it currently I am going to grant you access to my repo for further commits. Is 
this ok for you?



---


[GitHub] wicket pull request #275: [WICKET-6544] mobile browser detection is improved...

2018-04-13 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/275#discussion_r181303063
  
--- Diff: 
wicket-core/src/test/java/org/apache/wicket/protocol/http/request/WebClientInfoTest.java
 ---
@@ -59,9 +58,52 @@ public void before()
}

/**
-* Test IE 6.x user-agent strings
+* Test check check all user agents
 */
@Test
+   public void testBrowsersAndVersionsOfUserAgents() {
+   // Internet Explorers
--- End diff --

Hehe me too 😄 - no hurry, because I think this is going to be released 
in a further version.


---


[GitHub] wicket pull request #275: [WICKET-6544] mobile browser detection is improved...

2018-04-13 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/275#discussion_r181296712
  
--- Diff: 
wicket-core/src/test/java/org/apache/wicket/protocol/http/request/WebClientInfoTest.java
 ---
@@ -59,9 +58,52 @@ public void before()
}

/**
-* Test IE 6.x user-agent strings
+* Test check check all user agents
 */
@Test
+   public void testBrowsersAndVersionsOfUserAgents() {
+   // Internet Explorers
--- End diff --

May you have any other good idea to keep the tests individual.

Just send a patch to me if something would fit the requirement and I am 
going to integrate it.


---


[GitHub] wicket pull request #275: [WICKET-6544] mobile browser detection is improved...

2018-04-13 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/275#discussion_r181295733
  
--- Diff: 
wicket-core/src/test/java/org/apache/wicket/protocol/http/request/WebClientInfoTest.java
 ---
@@ -59,9 +58,52 @@ public void before()
}

/**
-* Test IE 6.x user-agent strings
+* Test check check all user agents
 */
@Test
+   public void testBrowsersAndVersionsOfUserAgents() {
+   // Internet Explorers
--- End diff --

Yes that is true, but I think if you change the code / the browser 
detection you are going to investigate why the test is failing and fix the 
integration as long as every test is back working again.

@BeforeClass is not working, because WicketTestCase and at this stage no 
Application is attached to the main thread.


---


[GitHub] wicket pull request #275: [WICKET-6544] mobile browser detection is improved...

2018-04-13 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/275#discussion_r181293718
  
--- Diff: 
wicket-core/src/test/java/org/apache/wicket/protocol/http/request/WebClientInfoTest.java
 ---
@@ -59,9 +58,52 @@ public void before()
}

/**
-* Test IE 6.x user-agent strings
+* Test check check all user agents
 */
@Test
+   public void testBrowsersAndVersionsOfUserAgents() {
+   // Internet Explorers
--- End diff --

You will see if something fails in the test results btw.


---


[GitHub] wicket pull request #275: [WICKET-6544] mobile browser detection is improved...

2018-04-13 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/275#discussion_r181293658
  
--- Diff: 
wicket-core/src/test/java/org/apache/wicket/protocol/http/request/WebClientInfoTest.java
 ---
@@ -59,9 +58,52 @@ public void before()
}

/**
-* Test IE 6.x user-agent strings
+* Test check check all user agents
 */
@Test
+   public void testBrowsersAndVersionsOfUserAgents() {
+   // Internet Explorers
--- End diff --

This might slow down the test execution because of the init of YAUAA - try 
it out.


---


[GitHub] wicket issue #275: [WICKET-6544] mobile browser detection is improved (with ...

2018-04-13 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/275
  
Following changes have been made:

* The init() method has been changed into gatherExtendedInfo() which is 
only be executed if 
org.apache.wicket.settings.RequestCycleSettings.setGatherExtendedBrowserInfo(boolean)
 is set to true
* MetaDataKey has been used to initialize YAUAA
* All browser specific methods have been moved into detectBrowserProperties
* gatherExtendedInfo / detectBrowserProperties are protected / public so 
that the user may override them


---


[GitHub] wicket pull request #275: [WICKET-6544] mobile browser detection is improved...

2018-04-12 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/275#discussion_r181286646
  
--- Diff: 
wicket-core/src/main/java/org/apache/wicket/protocol/http/request/WebClientInfo.java
 ---
@@ -46,14 +46,20 @@
 
/**
 * The user agent string from the User-Agent header, app. 
Theoretically, this might differ from
-* {@link 
org.apache.wicket.protocol.http.ClientProperties#isNavigatorJavaEnabled()} 
property, which is
-* not set until an actual reply from a browser (e.g. using {@link 
BrowserInfoPage} is set.
+* {@link 
org.apache.wicket.protocol.http.ClientProperties#isNavigatorJavaEnabled()} 
property,
+* which is not set until an actual reply from a browser (e.g. using 
{@link BrowserInfoPage} is
+* set.
 */
private final String userAgent;
 
/** Client properties object. */
private final ClientProperties properties;
 
+   private final static UserAgentAnalyzer UAA = 
UserAgentAnalyzer.newBuilder()
--- End diff --

The initialization is expensive, but the UserAgentAnalyzer is thread safe 
so it can be reused. Maybe we are able to use MetaDataKey


---


[GitHub] wicket pull request #275: [WICKET-6544] mobile browser detection is improved...

2018-04-12 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/275#discussion_r181286230
  
--- Diff: 
wicket-core/src/main/java/org/apache/wicket/protocol/http/request/WebClientInfo.java
 ---
@@ -193,165 +198,117 @@ protected String getRemoteAddr(RequestCycle 
requestCycle)
 */
private void init()
{
-   setInternetExplorerProperties();
-   setOperaProperties();
-   setMozillaProperties();
-   setKonquerorProperties();
-   setChromeProperties();
-   setEdgeProperties();
-   setSafariProperties();
+   nl.basjes.parse.useragent.UserAgent parsedUserAgent = 
UAA.parse(getUserAgent());
+   setInternetExplorerProperties(parsedUserAgent);
+   setKonquerorProperties(parsedUserAgent);
+   setMozillaProperties(parsedUserAgent);
+   setOperaProperties(parsedUserAgent);
+   setChromeProperties(parsedUserAgent);
+   setEdgeProperties(parsedUserAgent);
+   setSafariProperties(parsedUserAgent);
--- End diff --

Hi @solomax - yes indeed - it was due to the refactoring and those methods 
were present before - I just refactored them.


---


[GitHub] wicket issue #269: [WICKET-6544] mobile browser detection is improved

2018-04-12 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/269
  
See my suggestion over here: https://github.com/apache/wicket/pull/269


---


[GitHub] wicket issue #269: [WICKET-6544] mobile browser detection is improved

2018-04-05 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/269
  
In my opinion and because of such a big pool of browsers I would say yes.


---


[GitHub] wicket issue #269: [WICKET-6544] mobile browser detection is improved

2018-04-04 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/269
  
I also looked a bit around and stumbled over Apache DeviceMap which has 
been moved into the Attic and from the Attic 
(http://attic.apache.org/projects/devicemap.html) I followed the link to 
https://github.com/nielsbasjes/yauaa which seems to be maintained.

@kbachl - I understand your suggestion to remove it because of reliability, 
but I would keep the functionality with the hint that there might be some not 
supported browsers which is better than no detection.


---


[GitHub] wicket issue #273: WICKET-6321 Support Integrity and Crossorigin attributes

2018-04-01 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/273
  
Hi,

we are using a CORS enum for media tags already, maybe this is a good 
moment to use this class in there, too.

@svenmeier I just told that if there are more places I remember your 
suggestion 😄 

WDYT?


---


[GitHub] wicket pull request #268: Remove ArrayListStack in favour of ArrayDeque

2018-03-05 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/268#discussion_r172125436
  
--- Diff: wicket-core/src/main/java/org/apache/wicket/DequeueContext.java 
---
@@ -226,9 +227,9 @@ private DequeueTagAction canDequeueTag(ComponentTag 
open)
}
 
DequeueTagAction action;
-   for (int i = containers.size() - 1; i >= 0; i--)
+   for (MarkupContainer container : containers)
--- End diff --

Ah ok, thanks a lot for the explanation. Great changes 👍 


---


[GitHub] wicket pull request #268: Remove ArrayListStack in favour of ArrayDeque

2018-03-04 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/268#discussion_r172100972
  
--- Diff: wicket-core/src/main/java/org/apache/wicket/DequeueContext.java 
---
@@ -226,9 +227,9 @@ private DequeueTagAction canDequeueTag(ComponentTag 
open)
}
 
DequeueTagAction action;
-   for (int i = containers.size() - 1; i >= 0; i--)
+   for (MarkupContainer container : containers)
--- End diff --

Only small side note: Is the order of the for loop important in this case?

Before:
* Last container was taken, then one before last and so on...

Now:
* First is taken, then the second and so on...

The reason why I ask is that the loop was build to explicit iterate in the 
opposite direction.


---


[GitHub] wicket issue #267: Fix to use locale of the session

2018-02-17 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/267
  
Hi @try0 
The fix is integrated, now:

master - 
https://github.com/apache/wicket/commit/6c91b495738c597a9c89f624d6f675cd6eb1f609
wicket-7.x - 
https://github.com/apache/wicket/commit/7ba197c68508f2e15abf5e4bdda046cd4fa14087

Would you be so kind and close this PR?

kind regards and thanks.


---


[GitHub] wicket issue #255: Allow multipart submission of non modified FormData with ...

2018-01-19 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/255
  
Hi,

is this PR reflection a subset of changes of: 
https://github.com/apache/wicket/pull/256?

If yes we might consider to close this one and continue it in only one PR.

Thanks a lot for your PR @andruhon 👍 


---


[GitHub] wicket issue #257: [WICKET-6518] Log4j is replaced with slf4j-simple

2018-01-15 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/257
  
Much better! Now only the relevant things are available and if the user 
wants to go for logback he just can add it, but doesn't need to remove not used 
xmls if logback isn't used. 👍 


---


[GitHub] wicket pull request #253: WICKET-6498 deferred javascript

2018-01-02 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/253#discussion_r159287015
  
--- Diff: 
wicket-core/src/main/java/org/apache/wicket/markup/head/OnLoadHeaderItem.java 
---
@@ -86,8 +86,8 @@ public void render(Response response)
CharSequence js = getJavaScript();
if (Strings.isEmpty(js) == false)
{
-   JavaScriptUtils.writeJavaScript(response, 
"Wicket.Event.add(window, \"load\", " +
-   "function(event) { " + js + ";});");
+   JavaScriptUtils.writeJavaScript(response,
+   "var f = function() {" + js + ";};\nif 
('loaded' === document.readyState) f(); else window.addEventListener('load', 
f);");
--- End diff --

Here I suggest to change it to „complete“


---


[GitHub] wicket pull request #253: WICKET-6498 deferred javascript

2018-01-02 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/253#discussion_r159286873
  
--- Diff: 
wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
 ---
@@ -106,8 +107,7 @@ public void renderHead(final Component component, final 
IHeaderResponse response
RequestCycle requestCycle = component.getRequestCycle();
Url baseUrl = requestCycle.getUrlRenderer().getBaseUrl();
CharSequence ajaxBaseUrl = 
Strings.escapeMarkup(baseUrl.toString());
-   
response.render(JavaScriptHeaderItem.forScript("Wicket.Ajax.baseUrl=\"" + 
ajaxBaseUrl
-   + "\";", "wicket-ajax-base-url"));
--- End diff --

Ah this is only for the id attribute - so ignore this comment.


---


[GitHub] wicket pull request #253: WICKET-6498 deferred javascript

2018-01-02 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/253#discussion_r159286930
  
--- Diff: 
wicket-core/src/main/java/org/apache/wicket/resource/CoreLibrariesContributor.java
 ---
@@ -63,8 +64,7 @@ public static void contributeAjax(final Application 
application, final IHeaderRe
if (debugSettings.isAjaxDebugModeEnabled())
{

response.render(JavaScriptHeaderItem.forReference(jsLibrarySettings.getWicketAjaxDebugReference()));
-   
response.render(JavaScriptHeaderItem.forScript("Wicket.Ajax.DebugWindow.enabled=true;",
-   "wicket-ajax-debug-enable"));
--- End diff --

Also ignore this. :-)


---


[GitHub] wicket pull request #253: WICKET-6498 deferred javascript

2018-01-02 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/253#discussion_r159220270
  
--- Diff: 
wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
 ---
@@ -106,8 +107,7 @@ public void renderHead(final Component component, final 
IHeaderResponse response
RequestCycle requestCycle = component.getRequestCycle();
Url baseUrl = requestCycle.getUrlRenderer().getBaseUrl();
CharSequence ajaxBaseUrl = 
Strings.escapeMarkup(baseUrl.toString());
-   
response.render(JavaScriptHeaderItem.forScript("Wicket.Ajax.baseUrl=\"" + 
ajaxBaseUrl
-   + "\";", "wicket-ajax-base-url"));
--- End diff --

Mh I didn't look into the implementation but is wicket-ajax-base-url not 
used to be applied to the OnLoadHeaderItem, too. I could imagine that the 
information gets lost in this case.


---


[GitHub] wicket pull request #253: WICKET-6498 deferred javascript

2018-01-02 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/253#discussion_r159219467
  
--- Diff: 
wicket-core/src/main/java/org/apache/wicket/markup/head/OnLoadHeaderItem.java 
---
@@ -86,8 +86,8 @@ public void render(Response response)
CharSequence js = getJavaScript();
if (Strings.isEmpty(js) == false)
{
-   JavaScriptUtils.writeJavaScript(response, 
"Wicket.Event.add(window, \"load\", " +
-   "function(event) { " + js + ";});");
+   JavaScriptUtils.writeJavaScript(response,
+   "var f = function() {" + js + ";};\nif 
('loaded' === document.readyState) f(); else window.addEventListener('load', 
f);");
--- End diff --

Is loaded the correct state for sure?

https://developer.mozilla.org/de/docs/Web/API/Document/readyState

here "complete" is mentioned. I also remember that there were some other 
pitfalls with the readyState for some browsers.

This german site mentions that "loaded" is only available in IE.

https://wiki.selfhtml.org/wiki/JavaScript/DOM/Document/readyState


---


[GitHub] wicket pull request #253: WICKET-6498 deferred javascript

2018-01-02 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/253#discussion_r159220379
  
--- Diff: 
wicket-core/src/main/java/org/apache/wicket/resource/CoreLibrariesContributor.java
 ---
@@ -63,8 +64,7 @@ public static void contributeAjax(final Application 
application, final IHeaderRe
if (debugSettings.isAjaxDebugModeEnabled())
{

response.render(JavaScriptHeaderItem.forReference(jsLibrarySettings.getWicketAjaxDebugReference()));
-   
response.render(JavaScriptHeaderItem.forScript("Wicket.Ajax.DebugWindow.enabled=true;",
-   "wicket-ajax-debug-enable"));
--- End diff --

Same as wicket-ajax-base-url


---


[GitHub] wicket issue #242: WICKET-6490

2017-11-06 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/242
  
One little question left - what is this:

![screen shot 2017-11-07 at 8 46 39 
am](https://user-images.githubusercontent.com/980773/32482508-4e6bfe5c-c398-11e7-8b86-707a3218af0d.png)


---


[GitHub] wicket issue #242: WICKET-6490

2017-11-06 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/242
  
Very nice! 😸  - its working flawless with index.html! 👍 


---


[GitHub] wicket issue #242: WICKET-6490

2017-11-06 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/242
  
😄 - okay then I am going to test this and report back. Thanks @bitstorm 


---


[GitHub] wicket issue #242: WICKET-6490

2017-11-06 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/242
  
Maybe we can use the filter path for the link - WDYT?


---


[GitHub] wicket issue #242: WICKET-6490

2017-11-05 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/242
  
Hi @bitstorm ,

ah ok! So my question then would be if there is a way to get the „real“ 
root path somehow.

thanks a lot for clarification. 👍 


---


[GitHub] wicket issue #242: WICKET-6490

2017-11-04 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/242
  
If this is working like the external link I would be ok with it. I just 
want to achieve the examples working on each context root,


---


[GitHub] wicket issue #242: WICKET-6490

2017-11-04 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/242
  
Hi @bitstorm - sure 😄 - please look at your last commit - there was the 
external link removed which leads to an issue if the context root is not /


---


[GitHub] wicket pull request #242: WICKET-6490

2017-11-04 Thread klopfdreh
Github user klopfdreh closed the pull request at:

https://github.com/apache/wicket/pull/242


---


[GitHub] wicket issue #242: WICKET-6490

2017-11-04 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/242
  
Hi @bitstorm 

I just adjusted the resources management to also be available for other 
context roots then for / - when I start the examples using "StartExamples.java" 
I receive the following error - any idea?:

```java
org.apache.wicket.WicketRuntimeException: The component(s) below failed to 
render. Possible reasons could be that:
1) you have added a component in code but forgot to reference it in the 
markup (thus the component will never be rendered),
2) if your components were added in a parent container then make sure 
the markup for the child container includes them in .

1. [Component id = mainNavigation, page = 
org.apache.wicket.examples.homepage.HomePage, path = mainNavigation, type = 
org.apache.wicket.markup.html.basic.Label, isVisible = true, isVersioned = true]

at org.apache.wicket.Page.checkRendering(Page.java:662)
at org.apache.wicket.Page.onAfterRender(Page.java:805)
at org.apache.wicket.markup.html.WebPage.onAfterRender(WebPage.java:209)
at org.apache.wicket.Component.afterRender(Component.java:919)
at org.apache.wicket.Component.render(Component.java:2336)
at org.apache.wicket.Page.renderPage(Page.java:987)
at 
org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:124)
at 
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:236)
at 
org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:202)
at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:912)
at 
org.apache.wicket.request.RequestHandlerExecutor.execute(RequestHandlerExecutor.java:65)
at 
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:283)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:253)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:221)
at 
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:262)
at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:204)
at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:286)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1629)
at 
org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:206)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at 
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
at 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
at 
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
at 
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
at 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
at 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
at 
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Server.java:561)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:334)
at 
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
at 
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:104)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
at 
org.eclipse.jetty.util.thread.ReservedThre

[GitHub] wicket issue #242: WICKET-6490

2017-11-04 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/242
  
https://user-images.githubusercontent.com/980773/32403623-21b641b6-c13f-11e7-9d83-9434157af58b.png;>



---


[GitHub] wicket pull request #242: WICKET-6490

2017-11-03 Thread klopfdreh
GitHub user klopfdreh opened a pull request:

https://github.com/apache/wicket/pull/242

WICKET-6490

* Changed resource management

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/klopfdreh/wicket WICKET-6490

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/wicket/pull/242.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #242


commit ee282c9353d4290dff688fb56143499905591225
Author: Tobias Soloschenko <tsolosche...@sapient.com>
Date:   2017-11-03T15:01:46Z

WICKET-6490

* Changed resource management




---


[GitHub] wicket issue #230: Replace filterPath pattern '/*' with empty string

2017-09-27 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/230
  
@martin-g what do you thing of extracting the lines:


https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java#L583

to 


https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java#L599

into a method and call this method within getFilterPath and 
getFilterPathFromConfig?


---


[GitHub] wicket issue #230: Replace filterPath pattern '/*' with empty string

2017-09-27 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/230
  
Just my thoughts:

/* - maps every path - root paths and sub paths to the specific filter
/ - maps only the root path but not every sub path

So from my understanding they aren't the same and shouldn't be mixed up.


https://stackoverflow.com/questions/4140448/difference-between-and-in-servlet-mapping-url-pattern

Maybe we should inspect this a bit more to achieve the right handling.

WDTY?


---


[GitHub] wicket issue #229: WICKET-6438 - 8.x reference guide needs a few minor impro...

2017-08-13 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/229
  
The changes of the PR are integrated with commit 
075d8371ef3eb2e5f3bdadf008ae904cafd222b3


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #227: Fixes issue of pushing resources

2017-08-06 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/227
  
Thanks again @martin-g 😊


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #226: Allow to set the rel attribute with CssHeaderItem

2017-08-06 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/226
  
Thanks a lot @martin-g!!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #224: Fixed WicketTester to detect components in enclosure when...

2017-08-03 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/224
  
Thanks a lot for your effort. @martin-g I saw you did the review already. I 
created a JIRA ticket: https://issues.apache.org/jira/browse/WICKET-6434.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #226: Allow to set the rel attribute with CssHeaderItem

2017-08-03 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/226
  
Ticket: https://issues.apache.org/jira/browse/WICKET-6433


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket pull request #227: Fixes issue of pushing resources

2017-08-03 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/227#discussion_r131109718
  
--- Diff: 
wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java
 ---
@@ -361,7 +366,32 @@ else if (url.toString().startsWith("."))
url = url.toString().substring(1);
}
 
-   urls.add(url.toString());
+   // The context path and the filter have to be 
applied to the URL, because otherwise
+   // the resource is not pushed correctly
+   StringBuffer partialUrl = new StringBuffer();
--- End diff --

Oh yes! Good catch! I am going to change it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #227: Fixes issue of pushing resources

2017-08-03 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/227
  
Thanks for reviewing! I apply the changes, now! 👍 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket pull request #227: Fixes issue of pushing resources

2017-08-03 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/227#discussion_r131109906
  
--- Diff: 
wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java
 ---
@@ -361,7 +366,32 @@ else if (url.toString().startsWith("."))
url = url.toString().substring(1);
}
 
-   urls.add(url.toString());
+   // The context path and the filter have to be 
applied to the URL, because otherwise
+   // the resource is not pushed correctly
+   StringBuffer partialUrl = new StringBuffer();
+   String contextPath = 
WebApplication.get().getServletContext().getContextPath();
+   partialUrl.append(contextPath);
+   if (!contextPath.equals("/"))
+   {
+   partialUrl.append("/");
+   }
+   String filterPath = 
WebApplication.get().getWicketFilter().getFilterPath();
+   if (filterPath.equals("/"))
+   {
+   filterPath = "";
+   }
+   else if (filterPath.endsWith("/"))
+   {
+   filterPath = 
filterPath.replaceAll(".$", "");
--- End diff --

Okay, thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket pull request #227: Fixes issue of pushing resources

2017-08-03 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/227#discussion_r131109859
  
--- Diff: 
wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java
 ---
@@ -361,7 +366,32 @@ else if (url.toString().startsWith("."))
url = url.toString().substring(1);
}
 
-   urls.add(url.toString());
+   // The context path and the filter have to be 
applied to the URL, because otherwise
+   // the resource is not pushed correctly
+   StringBuffer partialUrl = new StringBuffer();
+   String contextPath = 
WebApplication.get().getServletContext().getContextPath();
+   partialUrl.append(contextPath);
+   if (!contextPath.equals("/"))
+   {
+   partialUrl.append("/");
--- End diff --

Performance, performance, performance. 😆 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket pull request #227: Fixes issue of pushing resources

2017-08-03 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/227#discussion_r131109822
  
--- Diff: 
wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java
 ---
@@ -361,7 +366,32 @@ else if (url.toString().startsWith("."))
url = url.toString().substring(1);
}
 
-   urls.add(url.toString());
+   // The context path and the filter have to be 
applied to the URL, because otherwise
+   // the resource is not pushed correctly
+   StringBuffer partialUrl = new StringBuffer();
+   String contextPath = 
WebApplication.get().getServletContext().getContextPath();
+   partialUrl.append(contextPath);
+   if (!contextPath.equals("/"))
--- End diff --

Okay, I change it!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #226: Allow to set the rel attribute with CssHeaderItem

2017-08-03 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/226
  
Ok I create a JIRA ticket for this! 😃 

Thanks for reviewing @martin-g 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket pull request #226: Allow to set the rel attribute with CssHeaderItem

2017-08-03 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/226#discussion_r131109389
  
--- Diff: 
wicket-core/src/main/java/org/apache/wicket/markup/head/CssHeaderItem.java ---
@@ -169,6 +171,39 @@ public static CssReferenceHeaderItem 
forReference(ResourceReference reference,
}
 
/**
+* Creates a {@link CssReferenceHeaderItem} for the given reference.
+*
+* Warning: the conditional comments don't work when 
injected dynamically with
--- End diff --

I just copied the constructor and added the rel parameter. Thats the reason 
why it is applied there, too. I would just keep it to be backward compatible - 
the arguments are all Strings, so I have to add a new one behind. 😞 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket pull request #227: Fixes issue of pushing resources

2017-08-02 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/227#discussion_r130974278
  
--- Diff: 
wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java
 ---
@@ -361,7 +366,32 @@ else if (url.toString().startsWith("."))
url = url.toString().substring(1);
}
 
-   urls.add(url.toString());
+   // The context path and the filter have to be 
applied to the URL, because otherwise
--- End diff --

Is someone able to review this and the following lines of code? I dislike 
the handling about the slashes in the url and to build up the path part that 
way.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #226: Allow to set the rel attribute with CssHeaderItem

2017-07-31 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/226
  
Maybe we can create a ticket for this PR to have something for the version 
changes file


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket pull request #225: Some changes regarding CssHeaderItem / push integr...

2017-07-31 Thread klopfdreh
Github user klopfdreh closed the pull request at:

https://github.com/apache/wicket/pull/225


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket pull request #227: Fixes issue of pushing resources

2017-07-31 Thread klopfdreh
GitHub user klopfdreh opened a pull request:

https://github.com/apache/wicket/pull/227

Fixes issue of pushing resources



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/klopfdreh/wicket push_issue_fix

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/wicket/pull/227.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #227


commit 87c8f50f3eee39e89053c0ab6690b8389d2d5714
Author: Tobias Soloschenko <tsolosche...@sapient.com>
Date:   2017-08-01T05:32:47Z

Fixes issue of pushing resources




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket pull request #226: Allow to set the rel attribute with CssHeaderItem

2017-07-31 Thread klopfdreh
GitHub user klopfdreh opened a pull request:

https://github.com/apache/wicket/pull/226

Allow to set the rel attribute with CssHeaderItem



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/klopfdreh/wicket 
rel_attribute_for_cssheaderitem

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/wicket/pull/226.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #226


commit 620081b0ae4fdcb09a24e75a8c6173485ab9de94
Author: Tobias Soloschenko <tsolosche...@sapient.com>
Date:   2017-08-01T05:36:15Z

Allow to set the rel attribute with CssHeaderItem




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket pull request #225: Some changes regarding CssHeaderItem / push integr...

2017-07-31 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/225#discussion_r130393784
  
--- Diff: 
wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java
 ---
@@ -361,7 +366,32 @@ else if (url.toString().startsWith("."))
url = url.toString().substring(1);
}
 
-   urls.add(url.toString());
+   // The context path and the filter have to be 
applied to the URL, because otherwise
+   // the resource is not pushed correctly
+   StringBuffer partialUrl = new StringBuffer();
+   String contextPath = 
WebApplication.get().getServletContext().getContextPath();
+   partialUrl.append(contextPath);
+   if (!contextPath.equals("/"))
+   {
+   partialUrl.append("/");
+   }
+   String filterPath = 
WebApplication.get().getWicketFilter().getFilterPath();
+   if (filterPath.equals("/"))
+   {
+   filterPath = "";
+   }
+   else if (filterPath.endsWith("/"))
+   {
+   filterPath = 
filterPath.replaceAll(".$", "");
+   }
+   partialUrl.append(filterPath);
--- End diff --

I used those:
```java
WebApplication.get().getServletContext().getContextPath();
WebApplication.get().getWicketFilter().getFilterPath();
```

and build the path by my self.

Can you have a look at the implementation if this is ok?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #225: Some changes regarding CssHeaderItem / push integration

2017-07-31 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/225
  
All in all there are currently some errors regarding the caching of the 
resources which are pushed. It currently behaves like this:

Resource pushed (no status code) > 200 OK (served via link tag) > 304 NOT 
MODIFIED (received from cache)

It should be:

Resource pushed (no status code) > 304 NOT MODIFIED (received from cache)



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket pull request #225: Some regarding CssHeaderItem / push integration

2017-07-31 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/225#discussion_r130389962
  
--- Diff: 
wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java
 ---
@@ -361,7 +366,32 @@ else if (url.toString().startsWith("."))
url = url.toString().substring(1);
}
 
-   urls.add(url.toString());
+   // The context path and the filter have to be 
applied to the URL, because otherwise
+   // the resource is not pushed correctly
+   StringBuffer partialUrl = new StringBuffer();
+   String contextPath = 
WebApplication.get().getServletContext().getContextPath();
+   partialUrl.append(contextPath);
+   if (!contextPath.equals("/"))
+   {
+   partialUrl.append("/");
+   }
+   String filterPath = 
WebApplication.get().getWicketFilter().getFilterPath();
+   if (filterPath.equals("/"))
+   {
+   filterPath = "";
+   }
+   else if (filterPath.endsWith("/"))
+   {
+   filterPath = 
filterPath.replaceAll(".$", "");
+   }
+   partialUrl.append(filterPath);
--- End diff --

@martin-g - long time ago we wrote to each other 😄 - I have a question 
regarding receiving the context path / filter path - is there a method to do so?

Example:

https://127.0.0.1:8443/mywebappcontext/myfilter/wicket/

I need a better way to get this part:

/mywebappcontext/myfilter/



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket pull request #225: Some regarding CssHeaderItem / push integration

2017-07-31 Thread klopfdreh
GitHub user klopfdreh opened a pull request:

https://github.com/apache/wicket/pull/225

Some regarding CssHeaderItem / push integration

* there are some methods to apply the rel attribute to css header items
* fixed a bug that the resources were not pushed correctly to the client

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/klopfdreh/wicket 
css_improvements_and_push_integration_fix

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/wicket/pull/225.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #225


commit 1eb3b63b4235c38f0d23a502c9ebf730ee117c3c
Author: Tobias Soloschenko <tsolosche...@apache.org>
Date:   2017-07-31T15:34:25Z

Some regarding CssHeaderItem / push integration




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket pull request #214: experimenting with suspension of requestCycle via ...

2017-07-30 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/214#discussion_r130276480
  
--- Diff: 
wicket-core/src/main/java/org/apache/wicket/page/PageAccessSynchronizer.java ---
@@ -93,8 +94,8 @@ public Duration getTimeout(int pageId)
 */
public void lockPage(int pageId) throws CouldNotLockPageException
{
-   final Thread thread = Thread.currentThread();
-   final PageLock lock = new PageLock(pageId, thread);
+   final RequestCycle cycle = RequestCycle.get();
--- End diff --

Any updates here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #224: Fixed WicketTester to detect components in enclosure when...

2017-07-30 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/224
  
Just do a revert commit and apply the changes you originally wanted to do 
in a separate one 👍 

I think your IDE is also supporting this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket pull request #219: [WICKET-6355] It is now possible to set fileName t...

2017-04-12 Thread klopfdreh
Github user klopfdreh commented on a diff in the pull request:

https://github.com/apache/wicket/pull/219#discussion_r30176
  
--- Diff: 
wicket-core/src/main/java/org/apache/wicket/resource/FileSystemResource.java ---
@@ -95,7 +95,9 @@ protected ResourceResponse createResourceResponse(Path 
path, String fileName)
resourceResponse.setContentType(getMimeType());
resourceResponse.setAcceptRange(ContentRangeType.BYTES);
resourceResponse.setContentLength(size);
-   resourceResponse.setFileName(fileName == null ? 
path.getFileName().toString() : fileName);
+   if (path != null && path.getFileName() != null) {
--- End diff --

I think we don't need to check *path != null* because it is checked before 
(and a WicketRuntimeException is thrown if it is null) - everything else looks 
good.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #131: Conversion of Gdoc to Asciidoctor

2017-01-28 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/131
  
I think this PR can be closed, now. Thanks a lot for the great new guide!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #195: WICKET-6287 Switch from json.org to open-json - 7.x

2017-01-21 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/195
  
@bitstorm - the changes are made - JSONObject does not throw any checked 
exceptions anymore. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #195: WICKET-6287 Switch from json.org to open-json - 7.x

2017-01-19 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/195
  
Thanks a lot @tdunning !


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #195: WICKET-6287 Switch from json.org to open-json - 7.x

2017-01-19 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/195
  
@bitstorm - the issue about the checked exceptions is fixed in the master 
branch we only have to wait until the release and increase our version in the 
pom.xml. Then there should be no further issue.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #195: WICKET-6287 Switch from json.org to open-json - 7.x

2017-01-15 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/195
  
I changed the method propertiesAsMap to throw the JSONException, because 
the first statement of a constructor always has to be the super / this call.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #203: Wicket 7.x please correction doc about CDI

2017-01-10 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/203
  
It seems that you have selected the wrong branch for the PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #195: WICKET-6287 Switch from json.org to open-json - 7.x

2017-01-09 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/195
  
Hi @bitstorm ,
I saw that JSONObject throws a JSONException which extends RuntimeException 
- I thought it is unchecked.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #194: WICKET-6287 Switch from json.org to open-json - 6.x

2017-01-03 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/194
  
Closed due to:
* 
https://github.com/apache/wicket/commit/0ba87f062cad8664d216abccb2a47126f637b87c
* 
https://github.com/apache/wicket/commit/6f764146a007ab38686a7d54210db0fcdfc2a7ef
* 
https://github.com/apache/wicket/commit/a6bf0e29bbc9ccebaa7588f566e15f0ac1d2eaa6
* 
https://github.com/apache/wicket/commit/ad978211a5a550e7902eba354b03ec6618649579


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket pull request #194: WICKET-6287 Switch from json.org to open-json - 6....

2017-01-03 Thread klopfdreh
Github user klopfdreh closed the pull request at:

https://github.com/apache/wicket/pull/194


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #195: WICKET-6287 Switch from json.org to open-json - 7.x

2017-01-03 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/195
  
Closed due to:
* 
https://github.com/apache/wicket/commit/3dacec4c55bb95618f604ad2ccea279346de279c
* 
https://github.com/apache/wicket/commit/6b1d53b17a0aa77a8b131fd161e12e08d335a251
* 
https://github.com/apache/wicket/commit/5348b3e00518e5636126e724f1e62ea1aebbd8b6


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket pull request #195: WICKET-6287 Switch from json.org to open-json - 7....

2017-01-03 Thread klopfdreh
Github user klopfdreh closed the pull request at:

https://github.com/apache/wicket/pull/195


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket pull request #193: WICKET-6287 Switch from json.org to open-json - 8....

2017-01-03 Thread klopfdreh
Github user klopfdreh closed the pull request at:

https://github.com/apache/wicket/pull/193


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #193: WICKET-6287 Switch from json.org to open-json - 8.x

2017-01-03 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/193
  
Closed due to:
* 
https://github.com/apache/wicket/commit/4e3194466c4df50c9d38ea1ed50800dea592c72b
* 
https://github.com/apache/wicket/commit/cc98cb0675ffbe9be956e33d6b827f4d61f9f3d7
* 
https://github.com/apache/wicket/commit/49a486ac9fb379426b36ee29a8c9101fa818e669


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #193: WICKET-6287 Switch from json.org to open-json - 8.x

2016-12-12 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/193
  
Hi @tdunning - thanks for keeping us up to date with the changes! 👍 

I am going to set the version to 1.6 so that we get the latest version.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #193: WICKET-6287 Switch from json.org to open-json - 8.x

2016-12-11 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/193
  
I vote to merge the 8.x PR. For 6.x / 7.x @martin-g already did build tests 
and pointed out some issues and I would suggest to check out the PRs and test 
them even with wicketstuff to ensure not to break something.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #193: WICKET-6287 Switch from json.org to open-json - 8.x

2016-12-08 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/193
  
@bitstorm - there are two different PRs for 6.x and 7.x to preserve the API 
integrity.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #195: WICKET-6287 Switch from json.org to open-json - 7.x

2016-12-08 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/195
  
Great! 😄 - so if everything is working - we should integrate all PR for 
open-json. But I suggest to test all dependencies (also for wicketstuff)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #195: WICKET-6287 Switch from json.org to open-json - 7.x

2016-12-08 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/195
  
@martin-g I rebased it and pushed it again. Should be up to date now.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #193: WICKET-6287 Switch from json.org to open-json - 8.x

2016-12-07 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/193
  
Summary before integration:

* json.org is replaced with open-json, now
* Because Apache Wicket 8 is at milestone level API changes are allowed and 
because of this all JSON library classes are removed and the external 
dependency of open-json has been added. This way it is easier to keep the 
library updated. Users have to organize imports.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #194: WICKET-6287 Switch from json.org to open-json - 6.x

2016-12-07 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/194
  
Summary before integration:

* json.org is replaced with open-json, now
* Method calls not supported by open-json throw a WicketRuntimeException to 
inform the user
* If users still need json.org they have to reorganize imports and add the 
json.org dependency in maven (beware of the license issues in this case!!)
* All classes are preserved due to clirr checks, but are converted to 
dummies if there is no functionality left
* There has been a special change to JSONObject, because Objects.hashCode 
is only available since jdk > 7


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #195: WICKET-6287 Switch from json.org to open-json - 7.x

2016-12-07 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/195
  
Summary before integration:

* json.org is replaced with open-json, now
* Method calls not supported by open-json throw a WicketRuntimeException to 
inform the user
* If the users still needs json.org they have to reorganize imports and add 
the json.org dependency in maven (beware of the license issues in this case!!)
* All classes are preserved due to clirr checks, but are converted to 
dummies if there is no functionality left


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #194: WICKET-6287 Switch from json.org to open-json - 6.x

2016-12-07 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/194
  
Hi @martin-g - this was because Objects.hashCode is only available since 
idk > 7.

I replaced the call with a return 0; - this is done by 
Objects.hashCode(null) anyway.

I also created a ticket for open-json to change the code so that there is a 
"real" jdk 6 compatibility. 😄 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] wicket issue #194: WICKET-6287 Switch from json.org to open-json - 6.x

2016-12-07 Thread klopfdreh
Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/194
  
Hi @martin-g - thanks for the hint - I am going to have a look at it, soon.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


  1   2   3   4   >