[GitHub] wicket issue #343: [WICKET-6617] headers are added to header-items if specif...
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/343 OK :) ---
[GitHub] wicket pull request #343: [WICKET-6617] headers are added to header-items if...
Github user solomax closed the pull request at: https://github.com/apache/wicket/pull/343 ---
[GitHub] wicket issue #343: [WICKET-6617] headers are added to header-items if specif...
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/343 @svenmeier Should this be merged into 7.x? ---
[GitHub] wicket pull request #344: [WICKET-6620] deprecated classes/methods are remov...
GitHub user solomax opened a pull request: https://github.com/apache/wicket/pull/344 [WICKET-6620] deprecated classes/methods are removed You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/wicket WICKET-6620-remove-deprecated Alternatively you can review and apply these changes as the patch at: https://github.com/apache/wicket/pull/344.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 #344 commit 4b09e371b0a59ff2d093d1236afbf66ee7874402 Author: Maxim Solodovnik Date: 2018-12-07T09:52:19Z [WICKET-6620] deprecated classes/methods are removed ---
[GitHub] wicket pull request #343: [WICKET-6617] headers are added to header-items if...
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/343#discussion_r238202582 --- Diff: wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js --- @@ -2116,10 +2116,15 @@ // Adds the element to page head addElement: function (element) { - var head = document.getElementsByTagName("head"); + var headItems = document.querySelector('head meta[name="wicket.header.items"]'); --- End diff -- According to this table [1] `querySelector` is being supported by all browsers ... [1] https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector#Browser_Compatibility ---
[GitHub] wicket pull request #343: [WICKET-6617] headers are added to header-items if...
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/343#discussion_r238121519 --- Diff: wicket-core/src/main/java/org/apache/wicket/markup/html/internal/HtmlHeaderContainer.java --- @@ -161,19 +161,19 @@ public final void onComponentTagBody(MarkupStream markupStream, ComponentTag ope final StringResponse response = new StringResponse(); getRequestCycle().setResponse(response); - IHeaderResponse headerResponse = getHeaderResponse(); - if (!response.equals(headerResponse.getResponse())) - { - getRequestCycle().setResponse(headerResponse.getResponse()); - } + try (IHeaderResponse headerResponse = getHeaderResponse()) { + if (!response.equals(headerResponse.getResponse())) + { + getRequestCycle().setResponse(headerResponse.getResponse()); + } - // Render the header sections of all components on the page - AbstractHeaderRenderStrategy.get().renderHeader(this, - new HeaderStreamState(markupStream, openTag), getPage()); + // Render the header sections of all components on the page + AbstractHeaderRenderStrategy.get().renderHeader(this, + new HeaderStreamState(markupStream, openTag), getPage()); - // Close the header response before rendering the header container itself - // See https://issues.apache.org/jira/browse/WICKET-3728 - headerResponse.close(); --- End diff -- `close()` is being called automatically by `try with resource` statement I'll modify comment ---
[GitHub] wicket pull request #343: [WICKET-6617] headers are added to header-items if...
GitHub user solomax opened a pull request: https://github.com/apache/wicket/pull/343 [WICKET-6617] headers are added to header-items if specified You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/wicket WICKET-6617-header-placeholder Alternatively you can review and apply these changes as the patch at: https://github.com/apache/wicket/pull/343.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 #343 commit a529aadafdaf7b32e909bbf90fe32822e841877f Author: Maxim Solodovnik Date: 2018-12-02T08:09:37Z [WICKET-6617] headers are added to header-items if specified ---
[GitHub] wicket issue #340: Improve formatting of example snippet
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/340 I would not change `tab` with 2 spaces for whole project Even this markup can have `tab` and will be readable if CSS will be in separate file my 2c ---
[GitHub] wicket issue #300: [WICKET-6603] Asypc page/data store destroyed without han...
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/300 It would be impossible to call `pageSavingThread.join();` to ensure Thread is stopped Would it be OK? ---
[GitHub] wicket pull request #300: [WICKET-6603] Asypc page/data store destroyed with...
GitHub user solomax opened a pull request: https://github.com/apache/wicket/pull/300 [WICKET-6603] Asypc page/data store destroyed without hanging You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/wicket WICKET-6603-wickettester-hang Alternatively you can review and apply these changes as the patch at: https://github.com/apache/wicket/pull/300.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 #300 commit 1a558850ff4cd4bb56c4f32a613f116dde7ea617 Author: Maxim Solodovnik Date: 2018-10-24T07:51:26Z [WICKET-6603] Asypc page/data store destroyed without hanging ---
[GitHub] wicket pull request #294: WICKET-5552 fix modal mousedown and make modal mor...
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/294#discussion_r220426844 --- Diff: wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js --- @@ -2301,6 +2302,10 @@ onDrag = jQuery.noop; } + if (typeof(settings) !== "undefined" && settings.stopDragOnCssSelector) { --- End diff -- According to the code `settings` should be `object` Maybe it would be better to change this line to be `typeof(settings) === 'object'` ? ---
[GitHub] wicket issue #290: Fix org.junit as resolution:=optional
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/290 @SubrahmanyamSistha it seems you are trying to merge fix for wicket-9 to wicket-8 branch ... I believe this PR need to be closed and corrected ---
[GitHub] wicket issue #287: Considering upgrading to Junit5
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/287 +1 from me :) ---
[GitHub] wicket pull request #288: Fix JavaDoc warnings in wicket-util
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/288#discussion_r206803641 --- Diff: wicket-util/src/main/java/org/apache/wicket/util/crypt/Base64.java --- @@ -22,7 +22,7 @@ * Provides Base64 encoding and decoding with URL and filename safe alphabet as defined by RFC 3548, * section 4. * - * This Base64 encoder is modified to meet URL requirements. The changes are: '+' => '*', '/' => + * This Base64 encoder is modified to meet URL requirements. The changes are: '+' = '*', '/' = * '-', and no padding. * --- End diff -- this `` tag is really weird :( ---
[GitHub] wicket pull request #287: Considering upgrading to Junit5
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/287#discussion_r206493340 --- Diff: wicket-util/src/test/java/org/apache/wicket/util/collections/IntHashMapTest.java --- @@ -48,9 +46,9 @@ public void serialize() throws IOException, ClassNotFoundException ByteArrayInputStream bais = new ByteArrayInputStream(serialized); ObjectInputStream ois = new ObjectInputStream(bais); IntHashMap deserialized = (IntHashMap) ois.readObject(); - assertThat(deserialized, is(notNullValue())); - assertThat(deserialized.get(1), is(equalTo("one"))); - assertThat(deserialized.get(2), is(equalTo("two"))); + assertNotNull(deserialized); + assertEquals(deserialized.get(1), "one"); --- End diff -- Is this correct parameter order? ---
[GitHub] wicket pull request #287: Considering upgrading to Junit5
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/287#discussion_r206492111 --- Diff: wicket-core/src/main/java/org/apache/wicket/util/tester/WicketTester.java --- @@ -54,14 +38,24 @@ import org.apache.wicket.request.mapper.parameter.PageParameters; import org.apache.wicket.util.lang.Args; import org.apache.wicket.util.lang.Objects; +import org.opentest4j.AssertionFailedError; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.servlet.ServletContext; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Locale; + +import static org.junit.jupiter.api.Assertions.*; --- End diff -- Whild card imports should be expanded Lot's of re-formatting here :( hard to get the changes ---
[GitHub] wicket pull request #287: Considering upgrading to Junit5
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/287#discussion_r206493069 --- Diff: wicket-util/src/main/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTestCase.java --- @@ -16,23 +16,18 @@ */ package org.apache.wicket.util.markup.xhtml; +import org.junit.jupiter.api.Test; +import org.xml.sax.*; --- End diff -- Another wild-card import ---
[GitHub] wicket issue #275: [WICKET-6544] mobile browser detection is improved (with ...
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/275 @klopfdreh can you create wicketstuff module? ---
[GitHub] wicket issue #275: [WICKET-6544] mobile browser detection is improved (with ...
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/275 I believe we can add browser detection as wicketstuff module and/or as confluence example Should be easy and useful ---
[GitHub] wicket issue #279: Allow meta tags to be contributed during AJAX request
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/279 Could you please fix spaces to be tabs? ---
[GitHub] wicket pull request #269: [WICKET-6544] mobile browser detection is improved
Github user solomax closed the pull request at: https://github.com/apache/wicket/pull/269 ---
[GitHub] wicket issue #269: [WICKET-6544] mobile browser detection is improved
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/269 OK, let's close this one :) ---
[GitHub] wicket pull request #275: [WICKET-6544] mobile browser detection is improved...
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/275#discussion_r182993206 --- 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 -- Sorry for delay, here is the code works for me: ``` private static ThreadLocal localAnalyzer = new ThreadLocal(); @Before public void before() { requestCycleMock = mock(RequestCycle.class); webRequest = mock(ServletWebRequest.class); when(requestCycleMock.getRequest()).thenReturn(webRequest); servletRequest = mock(HttpServletRequest.class); when(webRequest.getContainerRequest()).thenReturn(servletRequest); if (localAnalyzer.get() == null) { WebClientInfo webClientInfo = new WebClientInfo(requestCycleMock, "test"); webClientInfo.gatherExtendedInfo(); localAnalyzer.set(Application.get().getMetaData(WebClientInfo.UAA_META_DATA_KEY)); } else { Application.get().setMetaData(WebClientInfo.UAA_META_DATA_KEY, localAnalyzer.get()); } } @AfterClass public static void staticAfter() { localAnalyzer.set(null); } ``` Here are the measurment results: ``` Combined tests real0m24.123s user1m30.748s sys 0m1.804s Individual tests (after above changes were applied) real0m22.844s user1m23.948s sys 0m1.832s ``` ---
[GitHub] wicket pull request #275: [WICKET-6544] mobile browser detection is improved...
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/275#discussion_r181297750 --- 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 -- Will try to provide patch later tonight Have to do day time job right now :( ---
[GitHub] wicket pull request #275: [WICKET-6544] mobile browser detection is improved...
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/275#discussion_r181294275 --- 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 -- All subsequent lines will not be executed in case of failure ---
[GitHub] wicket pull request #275: [WICKET-6544] mobile browser detection is improved...
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/275#discussion_r181293918 --- 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 can move init to `@BeforeClass` . ---
[GitHub] wicket pull request #275: [WICKET-6544] mobile browser detection is improved...
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/275#discussion_r181293591 --- 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 -- I would rather have all these as individual tests, to be able to see which one was failed And run all of them regardless failure state of others ---
[GitHub] wicket pull request #275: [WICKET-6544] mobile browser detection is improved...
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/275#discussion_r181293350 --- Diff: wicket-core/src/main/java/org/apache/wicket/protocol/http/request/WebClientInfo.java --- @@ -147,6 +149,93 @@ private String getUserAgentStringLc() return (getUserAgent() != null) ? getUserAgent().toLowerCase() : ""; } + /** +* 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. +*/ + public void initialize() + { + UserAgentAnalyzer userAgentAnalyzer = Application.get().getMetaData(UAA_META_DATA_KEY); + if (userAgentAnalyzer == null) + { + userAgentAnalyzer = UserAgentAnalyzer.newBuilder() + .hideMatcherLoadStats() + .withCache(25000) + .build(); + Application.get().setMetaData(UAA_META_DATA_KEY, userAgentAnalyzer); + } + detectBrowserProperties(userAgentAnalyzer); + } + + /** +* Detects browser properties like versions or the type of the browser and applies them to the +* {@link ClientProperties}, override this method if there are errors within the browser / +* version detection due to newer browsers +* +* @param userAgentAnalyzer +*the user agent analyzer to detect browsers and versions +*/ + protected void detectBrowserProperties(UserAgentAnalyzer userAgentAnalyzer) + { + + nl.basjes.parse.useragent.UserAgent parsedUserAgent = userAgentAnalyzer + .parse(getUserAgent()); + String userAgentName = parsedUserAgent.getValue("AgentName"); + + // Konqueror + properties.setBrowserKonqueror(UserAgent.KONQUEROR.getUaStrings().contains(userAgentName)); + + // Chrome + properties.setBrowserChrome(UserAgent.CHROME.getUaStrings().contains(userAgentName)); + + // Edge + properties.setBrowserEdge(UserAgent.EDGE.getUaStrings().contains(userAgentName)); + + // Safari + properties.setBrowserSafari(UserAgent.SAFARI.getUaStrings().contains(userAgentName)); + + // Opera + properties.setBrowserOpera(UserAgent.OPERA.getUaStrings().contains(userAgentName)); + + // Internet Explorer + properties.setBrowserInternetExplorer( + UserAgent.INTERNET_EXPLORER.getUaStrings().contains(userAgentName)); + + // FireFox + boolean isFireFox = UserAgent.FIREFOX.getUaStrings() + .contains(parsedUserAgent.getValue("AgentName")); + if (isFireFox) + { + properties.setBrowserMozillaFirefox(true); + properties.setBrowserMozilla(true); + } + else + { + properties.setBrowserMozilla( + UserAgent.MOZILLA.getUaStrings().contains(parsedUserAgent.getValue("AgentName"))); --- End diff -- `userAgentName` ---
[GitHub] wicket pull request #275: [WICKET-6544] mobile browser detection is improved...
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/275#discussion_r181293318 --- Diff: wicket-core/src/main/java/org/apache/wicket/protocol/http/request/WebClientInfo.java --- @@ -147,6 +149,93 @@ private String getUserAgentStringLc() return (getUserAgent() != null) ? getUserAgent().toLowerCase() : ""; } + /** +* 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. +*/ + public void initialize() + { + UserAgentAnalyzer userAgentAnalyzer = Application.get().getMetaData(UAA_META_DATA_KEY); + if (userAgentAnalyzer == null) + { + userAgentAnalyzer = UserAgentAnalyzer.newBuilder() + .hideMatcherLoadStats() + .withCache(25000) + .build(); + Application.get().setMetaData(UAA_META_DATA_KEY, userAgentAnalyzer); + } + detectBrowserProperties(userAgentAnalyzer); + } + + /** +* Detects browser properties like versions or the type of the browser and applies them to the +* {@link ClientProperties}, override this method if there are errors within the browser / +* version detection due to newer browsers +* +* @param userAgentAnalyzer +*the user agent analyzer to detect browsers and versions +*/ + protected void detectBrowserProperties(UserAgentAnalyzer userAgentAnalyzer) + { + + nl.basjes.parse.useragent.UserAgent parsedUserAgent = userAgentAnalyzer + .parse(getUserAgent()); + String userAgentName = parsedUserAgent.getValue("AgentName"); + + // Konqueror + properties.setBrowserKonqueror(UserAgent.KONQUEROR.getUaStrings().contains(userAgentName)); + + // Chrome + properties.setBrowserChrome(UserAgent.CHROME.getUaStrings().contains(userAgentName)); + + // Edge + properties.setBrowserEdge(UserAgent.EDGE.getUaStrings().contains(userAgentName)); + + // Safari + properties.setBrowserSafari(UserAgent.SAFARI.getUaStrings().contains(userAgentName)); + + // Opera + properties.setBrowserOpera(UserAgent.OPERA.getUaStrings().contains(userAgentName)); + + // Internet Explorer + properties.setBrowserInternetExplorer( + UserAgent.INTERNET_EXPLORER.getUaStrings().contains(userAgentName)); + + // FireFox + boolean isFireFox = UserAgent.FIREFOX.getUaStrings() + .contains(parsedUserAgent.getValue("AgentName")); --- End diff -- `userAgentName` ---
[GitHub] wicket pull request #275: [WICKET-6544] mobile browser detection is improved...
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/275#discussion_r181282823 --- 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 -- can be replaced with String agent = parsedUserAgent.getValue("AgentName"); properties.setBrowserKonqueror(UserAgent.KONQUEROR.getUaStrings().contains(agent)); properties.setBrowserChrome(UserAgent.CHROME.getUaStrings().contains(agent)); . setBrowserVersion(parsedUserAgent); ---
[GitHub] wicket pull request #275: [WICKET-6544] mobile browser detection is improved...
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/275#discussion_r181282313 --- 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 -- All these methods looks very much the same ---
[GitHub] wicket pull request #274: [WICKET-6546] HTML comments are removed from inlin...
GitHub user solomax opened a pull request: https://github.com/apache/wicket/pull/274 [WICKET-6546] HTML comments are removed from inline CSS You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/wicket WICKET-6546-no-css-comments Alternatively you can review and apply these changes as the patch at: https://github.com/apache/wicket/pull/274.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 #274 commit 976f28de7a890a5827ef8c160e74a40df2c87709 Author: Maxim Solodovnik <solomax666@...> Date: 2018-04-03T14:23:48Z [WICKET-6546] HTML comments are removed from inline CSS ---
[GitHub] wicket pull request #273: WICKET-6321 Support Integrity and Crossorigin attr...
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/273#discussion_r178463264 --- Diff: wicket-core/src/main/java/org/apache/wicket/markup/head/CssHeaderItem.java --- @@ -200,7 +207,13 @@ public static CssReferenceHeaderItem forReference(ResourceReference reference, public static CssReferenceHeaderItem forReference(ResourceReference reference, PageParameters pageParameters, String media, String condition, String rel) { - return new CssReferenceHeaderItem(reference, pageParameters, media, condition, rel); +final CssReferenceHeaderItem cssReferenceHeaderItem = new CssReferenceHeaderItem(reference, pageParameters, media, condition, rel); +if(reference instanceof IntegrityAttributed) { --- End diff -- whitespaces: space after `if`, line break before `{` and the whole PR ---
[GitHub] wicket pull request #270: [WICKET-6533] Unicode non-characters are skipped
GitHub user solomax opened a pull request: https://github.com/apache/wicket/pull/270 [WICKET-6533] Unicode non-characters are skipped You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/wicket WICKET-6533-non-characters Alternatively you can review and apply these changes as the patch at: https://github.com/apache/wicket/pull/270.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 #270 commit b85f5c0202439b404028470883f8353a44a2e034 Author: Maxim Solodovnik <solomax666@...> Date: 2018-03-28T17:47:08Z [WICKET-6533] Unicode non-characters are skipped ---
[GitHub] wicket pull request #269: [WICKET-6544] mobile browser detection is improved
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/269#discussion_r176132347 --- Diff: wicket-core/src/test/java/org/apache/wicket/protocol/http/request/WebClientInfoTest.java --- @@ -680,6 +708,35 @@ public void konqueror() } } + @Test + public void ffMobile() + { + final String userAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_6 like Mac OS X) AppleWebKit/604.5.6 (KHTML, like Gecko) FxiOS/10.6b8836 Mobile/15D100 Safari/604.5.6"; + WebClientInfo webClientInfo = new WebClientInfo(requestCycleMock, userAgent); + + assertThat(userAgent, webClientInfo.getProperties().getBrowserVersionMajor(), + is(equalTo(10))); + assertThat(userAgent, webClientInfo.getProperties().getBrowserVersionMinor(), + is(equalTo(6))); + assertThat(userAgent, webClientInfo.getProperties().isBrowserMozillaFirefox(), + is(equalTo(true))); + assertThat(userAgent, webClientInfo.getProperties().isBrowserMozilla(), --- End diff -- This part is something I don;t really like in this PR :( ---
[GitHub] wicket pull request #269: [WICKET-6544] mobile browser detection is improved
GitHub user solomax opened a pull request: https://github.com/apache/wicket/pull/269 [WICKET-6544] mobile browser detection is improved You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/wicket WICKET-6544-mobile-browsers Alternatively you can review and apply these changes as the patch at: https://github.com/apache/wicket/pull/269.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 #269 commit 0cc14749903f51057cc75d011cbc8a02a4e42f4c Author: Maxim Solodovnik <solomax666@...> Date: 2018-03-21T15:44:17Z [WICKET-6544] mobile browser detection is improved ---
[GitHub] wicket issue #261: Wicket 6523 ajax timers
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/261 The code looks good to me Our main application also seems to work as expected with this version +1 ---
[GitHub] wicket issue #258: Wicket 6498 deferred javascript made simple
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/258 Thanks @svenmeier, my bad, I should investigate deeper. +1 for merging this PR, everything works as expected :))) ---
[GitHub] wicket issue #258: Wicket 6498 deferred javascript made simple
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/258 It seems I should use `git rebase` while merging ---
[GitHub] wicket issue #258: Wicket 6498 deferred javascript made simple
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/258 Thanks @svenmeier , `Auto mode` seems to work :) I have updated https://github.com/solomax/repeater-with-events with case that fails in deferred mode I'll try to check this from my side ---
[GitHub] wicket issue #258: Wicket 6498 deferred javascript made simple
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/258 Hello @svenmeier Finally I was able to create quick-start https://github.com/solomax/repeater-with-events, The issue is reproducible using latest wicket-core from master branch The issue is NOT reproducible in case this https://github.com/solomax/repeater-with-events/blob/master/src/main/java/org/apache/solomax/MainPanel.java#L34 line is commented out `setAuto(true);` Hope you can understand what "magic" was broken :))) ---
[GitHub] wicket issue #258: Wicket 6498 deferred javascript made simple
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/258 @svenmeier here is incomplete investigation: I can see same errors using latest 8.0.0-SNAPSHOT from master branch :( I have checked commit-by-commit and this behavior caused by this https://github.com/apache/wicket/commit/c27a57b31a0e519ef15dfe08b425d85f9a24f685 commit I'll try to continue investigating using diffs tomorrow Will appreciate any help here ---
[GitHub] wicket issue #258: Wicket 6498 deferred javascript made simple
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/258 Will try to create quickstart Might take some time . ---
[GitHub] wicket pull request #260: [WICKET-6523] unique suffix is added if more than ...
Github user solomax closed the pull request at: https://github.com/apache/wicket/pull/260 ---
[GitHub] wicket pull request #260: [WICKET-6523] unique suffix is added if more than ...
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/260#discussion_r164051979 --- Diff: wicket-core/src/main/java/org/apache/wicket/ajax/AbstractAjaxTimerBehavior.java --- @@ -92,6 +95,35 @@ public void renderHead(Component component, IHeaderResponse response) } } + /** +* Can be overridden to provide different implementation +* +* @return the unique ID of JS timer +*/ + protected CharSequence createTimerId() + { + StringBuilder jsId = new StringBuilder(getComponent().getMarkupId()); + List list = getComponent().getBehaviors(AbstractAjaxTimerBehavior.class); + if (list.size() != 1) + { + for (int i = 0; i < list.size(); ++i) + { + if (list.get(i) == this) + { + jsId.append('_').append(i); --- End diff -- I thought UUIDs are not being used cause it is long String. This was my first idea. If there would be no better ideas I'll update PR ---
[GitHub] wicket pull request #260: [WICKET-6523] unique suffix is added if more than ...
GitHub user solomax opened a pull request: https://github.com/apache/wicket/pull/260 [WICKET-6523] unique suffix is added if more than 1 timer behaviour i⦠â¦s added for the component You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/wicket WICKET-6523-unique-timer-id Alternatively you can review and apply these changes as the patch at: https://github.com/apache/wicket/pull/260.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 #260 commit edb8c370a6989cbfdc1ca53b382a8e1caea3e103 Author: Maxim Solodovnik <solomax666@...> Date: 2018-01-26T04:50:19Z [WICKET-6523] unique suffix is added if more than 1 timer behaviour is added for the component ---
[GitHub] wicket pull request #258: Wicket 6498 deferred javascript made simple
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/258#discussion_r164029616 --- Diff: wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxApplication.java --- @@ -44,6 +46,11 @@ protected void init() getDebugSettings().setAjaxDebugModeEnabled(true); + setHeaderResponseDecorator(response -> { --- End diff -- this can be simplified to be ``` tester.getApplication().setHeaderResponseDecorator(response -> new ResourceAggregator(new JavaScriptDeferHeaderResponse(response))); ``` ---
[GitHub] wicket pull request #258: Wicket 6498 deferred javascript made simple
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/258#discussion_r164029599 --- Diff: wicket-core/src/test/java/org/apache/wicket/markup/head/filter/FilteringHeaderResponseTest.java --- @@ -74,4 +75,22 @@ protected Response getRealResponse() CharSequence realContent = headerResponse.getContent(filterName); assertEquals(headerContent, realContent.toString()); } -} + + /** +* WICKET-6498 all JavaScript resources have an "defer" attribute, all other JavaScript is +* inside a {@code document.addEventListener('DOMContentLoaded', function() {}; } hook. +*/ + @Test + public void deferred() throws Exception + { + tester.getApplication().setHeaderResponseDecorator(new IHeaderResponseDecorator() --- End diff -- this can be simplified to be ``` tester.getApplication().setHeaderResponseDecorator(response -> new ResourceAggregator(new JavaScriptDeferHeaderResponse(response))); ``` ---
[GitHub] wicket issue #253: WICKET-6498 deferred javascript
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/253 Sure :) no rush, just would like to check if everyone happy with this PR :) ---
[GitHub] wicket issue #253: WICKET-6498 deferred javascript
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/253 Thanks a lot @svenmeier! All tests are green now :) Shall we merge? ---
[GitHub] wicket pull request #256: WICKET-6517 ajax multipart
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/256#discussion_r161435444 --- Diff: wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js --- @@ -643,11 +643,6 @@ we.publish(topic.AJAX_CALL_PRECONDITION, attrs); - if (attrs.mp) { // multipart form. jQuery.ajax() doesn't help here ... --- End diff -- This is noted in bug description here: https://issues.apache.org/jira/browse/WICKET-6517 ---
[GitHub] wicket pull request #253: WICKET-6498 deferred javascript
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/253#discussion_r161372957 --- Diff: wicket-core/src/main/java/org/apache/wicket/markup/head/filter/FilteringHeaderResponse.java --- @@ -263,14 +262,12 @@ public void markRendered(Object object) } }; - ResourceAggregator resourceAggregator = new ResourceAggregator(headerRenderer); - for (HeaderItem curItem : resp) { - resourceAggregator.render(curItem); + headerRenderer.render(curItem); --- End diff -- Unfortunately with this change `FilteringHeaderResponseTest` fails due to JS dependencies are not being rendered :((( @svenmeier Could you please take a look at this? ---
[GitHub] wicket pull request #257: [WICKET-6518] Log4j is replaced with logback
GitHub user solomax opened a pull request: https://github.com/apache/wicket/pull/257 [WICKET-6518] Log4j is replaced with logback You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/wicket WICKET-6518-quickstart-logback Alternatively you can review and apply these changes as the patch at: https://github.com/apache/wicket/pull/257.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 #257 commit cfd6a55fc9d613d4412a004efcc8e06d6ac1d73d Author: Maxim Solodovnik <solomax666@...> Date: 2018-01-13T03:18:56Z [WICKET-6518] Log4j is replaced with logback ---
[GitHub] wicket pull request #253: WICKET-6498 deferred javascript
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/253#discussion_r161220021 --- Diff: wicket-core/src/main/java/org/apache/wicket/markup/head/ResourceAggregator.java --- @@ -337,24 +338,27 @@ private void renderCombinedEventScripts() if (combinedScript.length() > 0) { combinedScript.append("\nWicket.Event.publish(Wicket.Event.Topic.AJAX_HANDLERS_BOUND);"); - getRealResponse().render( - OnDomReadyHeaderItem.forScript(combinedScript.append('\n').toString())); + getRealResponse().render(OnDomReadyHeaderItem.forScript(combinedScript.append('\n'))); } combinedScript.setLength(0); + String lastId = null; --- End diff -- Would appreciate review on this commit, especially this part ---
[GitHub] wicket pull request #253: WICKET-6498 deferred javascript
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/253#discussion_r161151287 --- 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 -- previous code set the id attribute, so the check was trivial (node.attr === 'wicket-ajax-base-url'). Current implementation adds text content. which have to be parsed, maybe it worth to set attribute back to avoid parsing the text? ---
[GitHub] wicket pull request #253: WICKET-6498 deferred javascript
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/253#discussion_r161151470 --- Diff: wicket-core/src/main/java/org/apache/wicket/markup/head/OnDomReadyHeaderItem.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, \"domready\", " + - "function(event) { " + js + ";});"); + JavaScriptUtils.writeJavaScript(response, + "var f = function() {" + js + ";};\nif ('loading' !== document.readyState) f(); else document.addEventListener('DOMContentLoaded', f);"); --- End diff -- I would like to change this code to be: ``` { //scope const f = function() {" + js + ";}; } ``` This way multiple `OnDomReadyHeader` items will work as expected in deferred mode WDYT? ---
[GitHub] wicket pull request #253: WICKET-6498 deferred javascript
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/253#discussion_r161121472 --- 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 -- this missing `id` attribute breaks `org.apache.wicket.util.tester.BaseWicketTester.getWicketAjaxBaseUrlEncodedInLastResponse()` Will set it back if there are no better solutions ... ---
[GitHub] wicket pull request #252: [WICKET-6512] feedbackMessages, style, pageId, seq...
GitHub user solomax opened a pull request: https://github.com/apache/wicket/pull/252 [WICKET-6512] feedbackMessages, style, pageId, sequence and temporary⦠â¦SessionAttributes are not being dropped while session replacement You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/wicket WICKET-6512-replaceSession Alternatively you can review and apply these changes as the patch at: https://github.com/apache/wicket/pull/252.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 #252 commit 05a8c7e57d6a2822d09fa1806955707c4cca368e Author: Maxim Solodovnik <solomax666@...> Date: 2017-12-26T06:10:33Z [WICKET-6512] feedbackMessages, style, pageId, sequence and temporarySessionAttributes are not being dropped while session replacement ---
[GitHub] wicket pull request #249: independent component renderer
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/249#discussion_r155466396 --- Diff: wicket-core/src/main/java/org/apache/wicket/core/util/string/ComponentRenderer.java --- @@ -16,35 +16,321 @@ */ package org.apache.wicket.core.util.string; +import java.io.Serializable; +import java.util.List; +import java.util.Set; +import java.util.function.Supplier; + import org.apache.wicket.Application; import org.apache.wicket.Component; import org.apache.wicket.MarkupContainer; +import org.apache.wicket.Page; +import org.apache.wicket.RuntimeConfigurationType; +import org.apache.wicket.Session; import org.apache.wicket.ThreadContext; import org.apache.wicket.core.request.handler.PageProvider; import org.apache.wicket.markup.IMarkupCacheKeyProvider; import org.apache.wicket.markup.IMarkupResourceStreamProvider; import org.apache.wicket.markup.MarkupNotFoundException; import org.apache.wicket.markup.html.WebPage; +import org.apache.wicket.mock.MockApplication; +import org.apache.wicket.mock.MockWebRequest; import org.apache.wicket.protocol.http.BufferedWebResponse; +import org.apache.wicket.protocol.http.WebApplication; +import org.apache.wicket.protocol.http.mock.MockServletContext; +import org.apache.wicket.request.Request; import org.apache.wicket.request.Response; +import org.apache.wicket.request.Url; import org.apache.wicket.request.cycle.RequestCycle; +import org.apache.wicket.request.http.WebRequest; +import org.apache.wicket.serialize.ISerializer; +import org.apache.wicket.session.ISessionStore; import org.apache.wicket.util.resource.IResourceStream; import org.apache.wicket.util.resource.StringResourceStream; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * A helper class for rendering components and pages. - * - * Note: {@link #renderComponent(Component)} does not - * support rendering {@link org.apache.wicket.markup.html.panel.Fragment} instances! + * + * With the static methods of this class components and pages can be rendered on a thread already + * processing an {@link Application}. + * + * If you want to render independently from any web request processing (e.g. generating an email + * body on a worker thread), you can create an instance of this class. + * You may use an existing application, create a fresh one or just use the defaults of + * {@link #ComponentRenderer()} for a mocked application with sensible defaults. + * + * Note: For performance instances can and should be reused, be sure to call {@link #destroy()} when + * they are no longer needed. */ public class ComponentRenderer { private static final Logger LOGGER = LoggerFactory.getLogger(ComponentRenderer.class); + private WebApplication application; + + /** +* A renderer using a default mocked application, which +* +* never shares anything in a session +* never serializes anything +* +*/ + public ComponentRenderer() + { + this(new MockApplication() + { + @Override + public RuntimeConfigurationType getConfigurationType() + { + return RuntimeConfigurationType.DEPLOYMENT; + } + + @Override + protected void init() + { + super.init(); + + setSessionStoreProvider(() -> new NeverSessionStore()); + getFrameworkSettings().setSerializer(new NeverSerializer()); + } + }); + } + + /** +* A renderer using the given application. +* +* If the application was not yet initialized - e.g. it is not reused from an already running +* web container - it will be initialized. +*/ + public ComponentRenderer(WebApplication application) + { + this.application = application; + + if (application.getName() == null) + { + // not yet initialized + + inThreadContext(() -> { + application.setServletContext(new MockServletContext(application, null)); + application.setName( + "ComponentRenderer[" + System.identityHashCode(ComponentRenderer.this) + "]"); + application.initApplication(); + }); + } + } + + /** +
[GitHub] wicket issue #249: independent component renderer
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/249 We are currently using WicketTester for this, I'll try this later tonight and will give huge +1 :)) ---
[GitHub] wicket pull request #248: [WICKET-6501] storeSettings.isAsynchronous() is ho...
GitHub user solomax opened a pull request: https://github.com/apache/wicket/pull/248 [WICKET-6501] storeSettings.isAsynchronous() is honored You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/wicket WICKET-6501-store-settings Alternatively you can review and apply these changes as the patch at: https://github.com/apache/wicket/pull/248.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 #248 commit 383c40f2557e78ac852ca4ea4300901281902435 Author: Maxim Solodovnik <solomax...@gmail.com> Date: 2017-11-27T13:08:40Z [WICKET-6501] storeSettings.isAsynchronous() is honored ---
[GitHub] wicket issue #246: WICKET-6499 Support Bean Validation 2.0
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/246 I believe this can be closed @theigl could you please close this PR? ---
[GitHub] wicket issue #247: [WICKET-6497] wicket-event-jquery.js and wicket-ajax-jque...
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/247 @svenmeier I'll merge if you have no objections :) ---
[GitHub] wicket pull request #247: [WICKET-6497] wicket-event-jquery.js and wicket-aj...
GitHub user solomax opened a pull request: https://github.com/apache/wicket/pull/247 [WICKET-6497] wicket-event-jquery.js and wicket-ajax-jquery.js are me⦠â¦rged, references are updated Surprisingly huge PR You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/wicket WICKET-6497-unify-js Alternatively you can review and apply these changes as the patch at: https://github.com/apache/wicket/pull/247.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 #247 commit 0f767eb5e169739893602a8c236921d150643728 Author: Maxim Solodovnik <solomax...@gmail.com> Date: 2017-11-22T15:24:17Z [WICKET-6497] wicket-event-jquery.js and wicket-ajax-jquery.js are merged, references are updated ---
[GitHub] wicket pull request #246: WICKET-6499 Support Bean Validation 2.0
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/246#discussion_r152173556 --- Diff: wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator_fr.properties.xml --- @@ -26,6 +26,8 @@ Le champ '${label}' doit être inférieur ou égal à ${value} Le champ '${label}' doit être supérieur ou égal à ${value} Le champ '${label}' ne doit pas être null + Le champ '${label}' ne peut pas être vide --- End diff -- OK with me :) ---
[GitHub] wicket pull request #246: WICKET-6499 Support Bean Validation 2.0
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/246#discussion_r152042763 --- Diff: wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator_fr.properties.xml --- @@ -26,6 +26,8 @@ Le champ '${label}' doit être inférieur ou égal à ${value} Le champ '${label}' doit être supérieur ou égal à ${value} Le champ '${label}' ne doit pas être null + Le champ '${label}' ne peut pas être vide --- End diff -- It is APL licensed so, I guess, we can copy I would better use existing ones, but not sure how is this possible :( ---
[GitHub] wicket pull request #246: WICKET-6499 Support Bean Validation 2.0
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/246#discussion_r151932467 --- Diff: wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator_fr.properties.xml --- @@ -26,6 +26,8 @@ Le champ '${label}' doit être inférieur ou égal à ${value} Le champ '${label}' doit être supérieur ou égal à ${value} Le champ '${label}' ne doit pas être null + Le champ '${label}' ne peut pas être vide --- End diff -- +1 for new labels, I'll add `_ru` localization ... ---
[GitHub] wicket pull request #246: WICKET-6499 Support Bean Validation 2.0
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/246#discussion_r151861578 --- Diff: wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java --- @@ -208,24 +206,29 @@ public void detach(Component component) boolean isRequired() { - List constraints = findNotNullConstraints(); + BeanValidationContext config = BeanValidationConfiguration.get(); + List<Class> notNullAnnotations = config.getNotNullAnnotations(); + Map<Annotation, ConstraintDescriptor> constraints = findNotNullConstraints( + notNullAnnotations); if (constraints.isEmpty()) { return false; } - HashSet<Class> validatorGroups = new HashSet<Class>(); + Set<Class> validatorGroups = new HashSet<>(); validatorGroups.addAll(Arrays.asList(getGroups())); - for (NotNull constraint : constraints) + for (Map.Entry<Annotation, ConstraintDescriptor> entry : constraints.entrySet()) { - if (canApplyToDefaultGroup(constraint) && validatorGroups.isEmpty()) + final Annotation annotation = entry.getKey(); + ConstraintDescriptor constraintDescriptor = constraints.get(annotation); --- End diff -- you can use `entry.getValue()` here ---
[GitHub] wicket pull request #246: WICKET-6499 Support Bean Validation 2.0
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/246#discussion_r151861201 --- Diff: wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java --- @@ -208,24 +206,28 @@ public void detach(Component component) boolean isRequired() { - List constraints = findNotNullConstraints(); + BeanValidationContext config = BeanValidationConfiguration.get(); + List<Class> notNullAnnotations = config.getNotNullAnnotations(); + Map<Annotation, ConstraintDescriptor> constraints = findNotNullConstraints( + notNullAnnotations); if (constraints.isEmpty()) { return false; } - HashSet<Class> validatorGroups = new HashSet<Class>(); + HashSet<Class> validatorGroups = new HashSet<>(); validatorGroups.addAll(Arrays.asList(getGroups())); - for (NotNull constraint : constraints) + for (Annotation constraint : constraints.keySet()) { --- End diff -- `entrySet()` can be used here to avoid `double search` ---
[GitHub] wicket pull request #246: WICKET-6499 Support Bean Validation 2.0
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/246#discussion_r151861199 --- Diff: wicket-bean-validation/src/main/java/org/apache/wicket/bean/validation/PropertyValidator.java --- @@ -208,24 +206,28 @@ public void detach(Component component) boolean isRequired() { - List constraints = findNotNullConstraints(); + BeanValidationContext config = BeanValidationConfiguration.get(); + List<Class> notNullAnnotations = config.getNotNullAnnotations(); + Map<Annotation, ConstraintDescriptor> constraints = findNotNullConstraints( + notNullAnnotations); if (constraints.isEmpty()) { return false; } - HashSet<Class> validatorGroups = new HashSet<Class>(); + HashSet<Class> validatorGroups = new HashSet<>(); validatorGroups.addAll(Arrays.asList(getGroups())); --- End diff -- I would use `Set` here ---
[GitHub] wicket pull request #245: [WICKET-6492] minified js/css files are bundled
GitHub user solomax opened a pull request: https://github.com/apache/wicket/pull/245 [WICKET-6492] minified js/css files are bundled You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/wicket WICKET-6492-minify-fix Alternatively you can review and apply these changes as the patch at: https://github.com/apache/wicket/pull/245.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 #245 commit e3832fd8276d56be8b678d5d0ebbf5ddd1673c4f Author: Maxim Solodovnik <solomax...@gmail.com> Date: 2017-11-11T12:46:59Z [WICKET-6492] minified js/css files are bundled ---
[GitHub] wicket issue #244: [WICKET-6491] ajax download seems to work under both IE11...
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/244 Is it OK to merge this PR? ---
[GitHub] wicket issue #244: [WICKET-6491] ajax download seems to work under both IE11...
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/244 @svenmeier I reverted my changes to AjaxDownloadBehavior.java, thanks for catching this :) ---
[GitHub] wicket pull request #244: [WICKET-6491] ajax download seems to work under bo...
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/244#discussion_r150018189 --- Diff: wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/AjaxDownloadBehavior.java --- @@ -323,10 +323,30 @@ private String getName() } /** +* Controls if anti cache parameter should be added to the URL or not +* +* @return {@code true} to add the anti cache request parameter, {@code false} - otherwise +*/ + protected boolean shouldAddAntiCacheParameter() { --- End diff -- I'll double-check (modify my tests) and remove it I thought it would save some lines of code if anti-cache will be on by default ---
[GitHub] wicket pull request #244: [WICKET-6491] ajax download seems to work under bo...
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/244#discussion_r150012308 --- Diff: wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/AjaxDownloadBehavior.java --- @@ -323,10 +323,30 @@ private String getName() } /** +* Controls if anti cache parameter should be added to the URL or not +* +* @return {@code true} to add the anti cache request parameter, {@code false} - otherwise +*/ + protected boolean shouldAddAntiCacheParameter() { --- End diff -- During my tests I found the issue: subsequent download was cached. I have implemented this anti-cache, same as in wicket Image.java ---
[GitHub] wicket pull request #244: [WICKET-6491] ajax download seems to work under bo...
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/244#discussion_r149991409 --- Diff: wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/wicket-ajaxdownload.js --- @@ -108,29 +108,32 @@ var disposition = xhr.getResponseHeader("Content-Disposition"); if (disposition) { var matches = /filename[^;=\n]*=(([""]).*?\2|[^;\n]*)/.exec(disposition); - if (matches != null && matches[1]) { + if (matches !== null && matches[1]) { --- End diff -- Wasn't aware of this file Just have checked `../../wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/wicket-ajaxdownload.js` is already added ---
[GitHub] wicket pull request #244: [WICKET-6491] ajax download seems to work under bo...
GitHub user solomax opened a pull request: https://github.com/apache/wicket/pull/244 [WICKET-6491] ajax download seems to work under both IE11 and Edge I would appreciate if someone can review my changes You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/wicket WICKET-6491-ajax-download-ms Alternatively you can review and apply these changes as the patch at: https://github.com/apache/wicket/pull/244.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 #244 commit e1e6235e33156086fc3b7b13d49261ef10c2183d Author: Maxim Solodovnik <solomax...@gmail.com> Date: 2017-11-09T12:15:26Z [WICKET-6491] ajax download seems to work under both IE11 and Edge ---
[GitHub] wicket issue #235: Wicket 6105 java.time
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/235 Hello All, Are we happy with these changes? Is it time to merge? :) ---
[GitHub] wicket issue #235: Wicket 6105 java.time
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/235 Hello @svenmeier maybe I can help with the changes need to be done? I really need M8 to be released :)) ---
[GitHub] wicket issue #235: Wicket 6105 java.time
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/235 This issue is too silent :((( Is it time to merge? Or maybe another review cycle? ---
[GitHub] wicket issue #235: Wicket 6105 java.time
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/235 Everything seems to work :) Time for another (final?) review? :)) ---
[GitHub] wicket issue #235: Wicket 6105 java.time
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/235 IDateConverter is removed, Will try to add additional tests as soon as I get more free time BTW how are you running wicket-examples? it fail to start for me :( `mvn jetty:run` ``` [WARNING] java.lang.IllegalStateException: WELD-ENV-33: Invalid bean archive scanning result - found multiple results with the same reference: /home/solomax/work/wicket/wicket-examples/target/classes at org.jboss.weld.environment.deployment.discovery.AbstractDiscoveryStrategy.performDiscovery(AbstractDiscoveryStrategy.java:96) at org.jboss.weld.environment.servlet.WeldServletLifecycle.createDeployment(WeldServletLifecycle.java:311) at org.jboss.weld.environment.servlet.WeldServletLifecycle.initialize(WeldServletLifecycle.java:163) at org.jboss.weld.environment.servlet.EnhancedListener.onStartup(EnhancedListener.java:61) at org.eclipse.jetty.plus.annotation.ContainerInitializer.callStartup(ContainerInitializer.java:140) ``` ---
[GitHub] wicket issue #235: Wicket 6105 java.time
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/235 I did homework (partially) and added some tests :) Could you please check them and maybe add some more? :)) ---
[GitHub] wicket issue #236: [WICKET-6476] check is added while setting filter path to...
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/236 Should this change be cherry-picked to other branches? ---
[GitHub] wicket issue #236: [WICKET-6476] check is added while setting filter path to...
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/236 @martin-g Should I merge then delete the branch? Is the process of merging documented somewhere? ---
[GitHub] wicket pull request #236: [WICKET-6476] check is added while setting filter ...
GitHub user solomax opened a pull request: https://github.com/apache/wicket/pull/236 [WICKET-6476] check is added while setting filter path to prevent exc⦠â¦eption You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/wicket WICKET-6476-websocket-tester Alternatively you can review and apply these changes as the patch at: https://github.com/apache/wicket/pull/236.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 #236 commit 58a7106d74de02cc9f193d95613b6c1f3483ca7b Author: Maxim Solodovnik <solomax...@gmail.com> Date: 2017-10-03T04:46:28Z [WICKET-6476] check is added while setting filter path to prevent exception ---
[GitHub] wicket issue #235: Wicket 6105 java.time
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/235 I'll create `org.apache.wicket.examples.datetime` later tonight taking `org.apache.wicket.examples.captcha` as reference :) ---
[GitHub] wicket issue #235: Wicket 6105 java.time
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/235 old date examples are still available at wicketstuff, what is "example's compref"? ---
[GitHub] wicket pull request #235: Wicket 6105 java.time
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/235#discussion_r142088563 --- Diff: wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeField.java --- @@ -0,0 +1,278 @@ +/* + * 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.extensions.markup.html.form.datetime; + +import java.time.LocalDate; +import java.time.LocalTime; +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.time.temporal.ChronoField; +import java.util.Date; +import java.util.Locale; +import java.util.TimeZone; + +import org.apache.wicket.Session; +import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; +import org.apache.wicket.core.request.ClientInfo; +import org.apache.wicket.markup.html.form.FormComponentPanel; +import org.apache.wicket.model.IModel; +import org.apache.wicket.protocol.http.request.WebClientInfo; + +/** + * Works on a {@link java.time.ZonedDateTime} object. Displays a date field and a DatePicker, a field + * for hours and a field for minutes, and an AM/PM field. The format (12h/24h) of the hours field + * depends on the time format of this {@link DateTimeField}'s {@link Locale}, as does the visibility + * of the AM/PM field (see {@link DateTimeField#use12HourFormat}). + * + * Ajaxifying the DateTimeField: If you want to update a DateTimeField with an + * {@link AjaxFormComponentUpdatingBehavior}, you have to attach it to the contained + * {@link DateField} by overriding {@link #newDateTextField(String, IModel)} and calling + * {@link #processInput()}: + * + * {@code + * DateTimeField dateTimeField = new DateTimeField(...) { + *protected DateTextField newDateTextField(String id, PropertyModel dateFieldModel) + *{ + * DateTextField dateField = super.newDateTextField(id, dateFieldModel); + * dateField.add(new AjaxFormComponentUpdatingBehavior("change") { + *protected void onUpdate(AjaxRequestTarget target) { + * processInput(); // let DateTimeField process input too + * + * ... + *} + * }); + * return recorder; + *} + * } + * } + * + * @author eelcohillenius + * @see DateField for a variant with just the date field and date picker + */ +public class DateTimeField extends FormComponentPanel --- End diff -- Will add additional component ---
[GitHub] wicket pull request #235: Wicket 6105 java.time
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/235#discussion_r142088478 --- Diff: wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateLabel.java --- @@ -227,14 +216,10 @@ public DateLabel(String id, DateConverter converter) * @param converter *The converter to use */ - public DateLabel(String id, IModel model, DateConverter converter) + public DateLabel(String id, IModel model, ZonedDateTimeConverter converter) --- End diff -- +1 for delete ---
[GitHub] wicket pull request #235: Wicket 6105 java.time
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/235#discussion_r142076722 --- Diff: wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeField.java --- @@ -0,0 +1,288 @@ +/* + * 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.extensions.markup.html.form.datetime; + +import java.time.LocalDate; +import java.time.LocalTime; +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.time.temporal.ChronoField; +import java.util.Date; +import java.util.Locale; +import java.util.TimeZone; + +import org.apache.wicket.Session; +import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; +import org.apache.wicket.core.request.ClientInfo; +import org.apache.wicket.markup.html.form.FormComponentPanel; +import org.apache.wicket.model.IModel; +import org.apache.wicket.protocol.http.request.WebClientInfo; + +/** + * Works on a {@link java.time.ZonedDateTime} object. Displays a date field and a DatePicker, a field + * for hours and a field for minutes, and an AM/PM field. The format (12h/24h) of the hours field + * depends on the time format of this {@link DateTimeField}'s {@link Locale}, as does the visibility + * of the AM/PM field (see {@link DateTimeField#use12HourFormat}). + * + * Ajaxifying the DateTimeField: If you want to update a DateTimeField with an + * {@link AjaxFormComponentUpdatingBehavior}, you have to attach it to the contained + * {@link DateField} by overriding {@link #newDateTextField(String, IModel)} and calling + * {@link #processInput()}: + * + * {@code + * DateTimeField dateTimeField = new DateTimeField(...) { + *protected DateTextField newDateTextField(String id, PropertyModel dateFieldModel) + *{ + * DateTextField dateField = super.newDateTextField(id, dateFieldModel); + * dateField.add(new AjaxFormComponentUpdatingBehavior("change") { + *protected void onUpdate(AjaxRequestTarget target) { + * processInput(); // let DateTimeField process input too + * + * ... + *} + * }); + * return recorder; + *} + * } + * } + * + * @author eelcohillenius + * @see DateField for a variant with just the date field and date picker + */ +public class DateTimeField extends FormComponentPanel +{ + private static final long serialVersionUID = 1L; + + // Component-IDs + protected static final String DATE = "date"; + protected static final String TIME = "time"; + + // The date TextField and it's associated model object + // Note that any time information in date will be ignored + private DateField dateField; + private TimeField timeField; + private ZonedDateTime dateTime = ZonedDateTime.now(); + + /** +* Construct. +* +* @param id +*/ + public DateTimeField(final String id) + { + this(id, null); + } + + /** +* Construct. +* +* @param id +* @param model +*/ + public DateTimeField(final String id, final IModel model) + { + super(id, model); + + // Sets the type that will be used when updating the model for this component. + setType(ZonedDateTime.class); + + // Create and add the date TextField + add(dateField = newDateField(DATE, new DateModel())); + add(timeField = newTimeField(TIME, new TimeModel())); + } + + /** +* +* @return The date TextField +*/ + protected final DateField getDateField() + { + return dateField; + } + + /** +* +* @return The date TextField +*/ + protected final TimeField getTime
[GitHub] wicket pull request #235: Wicket 6105 java.time
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/235#discussion_r142076750 --- Diff: wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/IDateConverter.java --- @@ -0,0 +1,53 @@ +/* + * 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.extensions.markup.html.form.datetime; + +import java.time.format.DateTimeFormatter; +import java.util.Locale; + +import org.apache.wicket.util.convert.IConverter; + + +/** + * Base class for Joda Time based date converters. It contains the logic to parse and format, --- End diff -- Addressed, thanks ---
[GitHub] wicket pull request #235: Wicket 6105 java.time
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/235#discussion_r142076776 --- Diff: wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleTimeConverter.java --- @@ -0,0 +1,118 @@ +/* + * 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.extensions.markup.html.form.datetime; + +import java.time.LocalTime; +import java.time.chrono.IsoChronology; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeFormatterBuilder; +import java.time.format.FormatStyle; +import java.util.Locale; + +/** + * Date converter that uses javax.time and can be configured to take the time zone difference between + * clients and server into account, and that is configured for a certain date style. The pattern + * will always be locale specific. + * + * This converter is especially suited on a per-component base. + * + * + * @see org.apache.wicket.extensions.markup.html.form.DateTextField + * @see java.time.LocalTime + * @see DateTimeFormatter + * + * @author eelcohillenius --- End diff -- Addressed, thanks ---
[GitHub] wicket pull request #235: Wicket 6105 java.time
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/235#discussion_r142076656 --- Diff: pom.xml --- @@ -89,7 +89,6 @@ wicket wicket-core wicket-util - wicket-datetime --- End diff -- I see no reason to keep empty module :( AFAICT All valuable staff is moved to wicket-extensions ---
[GitHub] wicket pull request #235: Wicket 6105 java.time
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/235#discussion_r142076708 --- Diff: wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeField.java --- @@ -0,0 +1,288 @@ +/* + * 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.extensions.markup.html.form.datetime; + +import java.time.LocalDate; +import java.time.LocalTime; +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.time.temporal.ChronoField; +import java.util.Date; +import java.util.Locale; +import java.util.TimeZone; + +import org.apache.wicket.Session; +import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; +import org.apache.wicket.core.request.ClientInfo; +import org.apache.wicket.markup.html.form.FormComponentPanel; +import org.apache.wicket.model.IModel; +import org.apache.wicket.protocol.http.request.WebClientInfo; + +/** + * Works on a {@link java.time.ZonedDateTime} object. Displays a date field and a DatePicker, a field + * for hours and a field for minutes, and an AM/PM field. The format (12h/24h) of the hours field + * depends on the time format of this {@link DateTimeField}'s {@link Locale}, as does the visibility + * of the AM/PM field (see {@link DateTimeField#use12HourFormat}). + * + * Ajaxifying the DateTimeField: If you want to update a DateTimeField with an + * {@link AjaxFormComponentUpdatingBehavior}, you have to attach it to the contained + * {@link DateField} by overriding {@link #newDateTextField(String, IModel)} and calling + * {@link #processInput()}: + * + * {@code + * DateTimeField dateTimeField = new DateTimeField(...) { + *protected DateTextField newDateTextField(String id, PropertyModel dateFieldModel) + *{ + * DateTextField dateField = super.newDateTextField(id, dateFieldModel); + * dateField.add(new AjaxFormComponentUpdatingBehavior("change") { + *protected void onUpdate(AjaxRequestTarget target) { + * processInput(); // let DateTimeField process input too + * + * ... + *} + * }); + * return recorder; + *} + * } + * } + * + * @author eelcohillenius + * @see DateField for a variant with just the date field and date picker + */ +public class DateTimeField extends FormComponentPanel +{ + private static final long serialVersionUID = 1L; + + // Component-IDs + protected static final String DATE = "date"; + protected static final String TIME = "time"; + + // The date TextField and it's associated model object + // Note that any time information in date will be ignored + private DateField dateField; + private TimeField timeField; + private ZonedDateTime dateTime = ZonedDateTime.now(); + + /** +* Construct. +* +* @param id +*/ + public DateTimeField(final String id) + { + this(id, null); + } + + /** +* Construct. +* +* @param id +* @param model +*/ + public DateTimeField(final String id, final IModel model) + { + super(id, model); + + // Sets the type that will be used when updating the model for this component. + setType(ZonedDateTime.class); + + // Create and add the date TextField + add(dateField = newDateField(DATE, new DateModel())); + add(timeField = newTimeField(TIME, new TimeModel())); + } + + /** +* +* @return The date TextField +*/ + protected final DateField getDateField() + { + return dateField; + } + + /** +* +* @return The date TextField +*/ + protected final TimeField getTime
[GitHub] wicket issue #235: Wicket 6105 java.time
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/235 Is it time to merge this PR and pack M8? ;) ---
[GitHub] wicket pull request #235: Wicket 6105 java.time
GitHub user solomax opened a pull request: https://github.com/apache/wicket/pull/235 Wicket 6105 java.time - datetime module is moved to wicketstuff - all references to joda-time are removed - The build is fixed You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/wicket WICKET-6105-java.time Alternatively you can review and apply these changes as the patch at: https://github.com/apache/wicket/pull/235.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 #235 commit 4da2ef043aac1f681233c04d2228fca50d6e900a Author: Martin Tzvetanov Grigorov <mgrigo...@apache.org> Date: 2016-02-26T22:28:11Z WICKET-6105 Decommission wicket-datetime Move DateLabel and all Date formatters from wicket-datetime to wicket-extensions module WIP! commit 1b99716338c149a6701b78cfa1acc25cfa6dd721 Author: Martin Tzvetanov Grigorov <mgrigo...@apache.org> Date: 2016-03-07T20:36:13Z WICKET-6105 Decommission Wicket-Datetime module WIP: Move some more code from -datetime to -extensions while trying to keep old APIs (j.u.Date based ones) available for easier migration commit b82bce9cd9ee8ee203801d50c9916dd5570ac3f1 Author: Martin Tzvetanov Grigorov <mgrigo...@apache.org> Date: 2016-03-07T21:21:03Z WICKET-6105 Decommission Wicket-Datetime module WIP: Bug fixes and API improvements commit 8019324c27739a705205e1c499f4509c0dc3c194 Author: Maxim Solodovnik <solomax...@gmail.com> Date: 2017-09-13T14:38:57Z Merge remote-tracking branch 'origin/master' into WICKET-6105-java.time commit a9b06ca2e23a76dd99c3e77f3fc4e9aa17a2f815 Author: Maxim Solodovnik <solomax...@gmail.com> Date: 2017-09-22T14:57:06Z Merge branch 'master' into WICKET-6105-java.time commit 11ef5c48962bb42e9e823d428b3fffb1d8b126b9 Author: Maxim Solodovnik <solomax...@gmail.com> Date: 2017-09-22T17:20:26Z Wicket is compilable, tests are fails commit 9ab8f47a980e9cd472bf731bb6496d276ee8db7a Author: Maxim Solodovnik <solomax...@gmail.com> Date: 2017-09-23T05:38:05Z Date-time tests are fixed ---
[GitHub] wicket pull request #228: WICKET-6437: Library versions are updated
GitHub user solomax opened a pull request: https://github.com/apache/wicket/pull/228 WICKET-6437: Library versions are updated I was unable to update org.jglue.cdi-unit:cdi-unit and wildfly It seems code/build modifications are required for this :( You can merge this pull request into a Git repository by running: $ git pull https://github.com/solomax/wicket WICKET-6437 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/wicket/pull/228.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 #228 commit dad47df0bde5cb1ab312d719ac9283c52abb7301 Author: Maxim Solodovnik <solomax...@gmail.com> Date: 2017-08-05T15:08:45Z Library versions are updated --- 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
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/227#discussion_r131064919 --- 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 -- Maybe StringBuilder should be used 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 pull request #219: [WICKET-6355] It is now possible to set fileName t...
Github user solomax commented on a diff in the pull request: https://github.com/apache/wicket/pull/219#discussion_r30572 --- 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 -- My bad, will fix --- 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. ---