[jira] [Updated] (WICKET-6439) Support auto-scroll for (Fenced)FeedbackPanel
[ https://issues.apache.org/jira/browse/WICKET-6439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hendy Irawan updated WICKET-6439: - Description: My use case is exactly the same as described in https://stackoverflow.com/questions/27172854/how-to-automatically-scroll-up-a-wicket-panel-when-wicket-feedbackpanel-is-trigg Allow me to elaborate. Assuming a mobile browser or any viewport size that can't display the full page: When user clicks the (ajax) Submit button and there's error, without this functionality, there are two scenarios: 1. If the FeedbackPanel is on top, the user won't see it. Unless it's a stateless form, which then goes back to top. Either way they *still* have to scroll up or down to find the field. 2. If the FeedbackPanel is right above the button, only users with working Ajax will see it and only for ajax forms. Else it back to top and they won't see it. Either way they *still* have to scroll up or down to find the field. Some users find this disorienting and I suspect this is the cause some people leave and never come back. Just for the sake of argument here's one goal flow (almost half of the users go away on the very first form) that I'd like to increase its conversion rate :) !https://issues.apache.org/jira/secure/attachment/12880581/wicketscroll.jpg! Proposed solution is simple, scroll to the FeedbackPanel message, which is optimally placed right on top of the first offending field (in case there are several). But some problems I encountered while trying to get solve this: 1. With {{Form.onError()}} it's trivial to do this when there's only one FeedbackPanel. But with multiple {{FencedFeedbackPanel}}s there needs to be some logic to (1) know which of the FeedbackPanels gets which message, and (2) determine the "top-most" (based on component hierarchy), before (3) appending JavaScript to scroll there. 2. Even with point 1 solved, I still need to duplicate that logic on every form on every page. It'd be great if this logic can be put directly in the FeedbackPanel itself. I've tried it using hint from https://stackoverflow.com/questions/19246892/how-to-get-the-ajaxrequesttarget-inside-wickets-onbeforerender-method-of-a-co but I can't even get any messages, any method I try simply gave either null or Array[] : {code:java} public class ScrollNotificationPanel extends NotificationPanel { @Override protected void onInitialize() { super.onInitialize(); setOutputMarkupId(true); } @Override protected void onAfterRender() { super.onAfterRender(); final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class); if (null != target) { final Object modelObject = newFeedbackMessagesModel().getObject(); //final List feedbackMessages = getFeedbackMessagesModel().getObject(); final String msgs = JsonUtils.asJson(modelObject); target.appendJavaScript("console.log('horaXy', " + msgs + ");"); } if (null != target && getFeedbackMessages().hasMessage(FeedbackMessage.ERROR)) { String scrollScript = "$('html, body').animate({scrollTop:$('#" + getMarkupId() + "').offset().top - 20}, 'slow');\n"; target.appendJavaScript(scrollScript); } } @Override protected void onBeforeRender() { super.onBeforeRender(); final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class); if (null != target) { final Object modelObject = newFeedbackMessagesModel().getObject(); //final List feedbackMessages = getFeedbackMessagesModel().getObject(); final String msgs = JsonUtils.asJson(modelObject); target.appendJavaScript("console.log('horay', " + msgs + ");"); } if (null != target && getFeedbackMessages().hasMessage(FeedbackMessage.ERROR)) { String scrollScript = "$('html, body').animate({scrollTop:$('#" + getMarkupId() + "').offset().top - 20}, 'slow');\n"; target.appendJavaScript(scrollScript); } } } {code} 3. There needs to be some "buffer" on top when scrolling. For example, most websites have a floating navbar on top, and scrolling right to a panel will make the panel covered by the navbar. So there should be a buffer value, 20 is a sane minimal value for comfort, but some websites (like mine) will need to adjust it to 50 or something else. 4. Added bonus if this can work with non-JavaScript (i.e. Button/AjaxFallbackButton) / stateless forms. Technically it's possible by using the URL fragment, i.e. FeedbackPanel's outputMarkupId will need to be true, and the "next" page need to redirect to a fragment. However I have no idea how to do this robustly. (5. I know an edge case: horizontal scrolling, yet I personally don't care because IMHO if there's a horizontal scroll visible the page
[jira] [Updated] (WICKET-6439) Support auto-scroll for (Fenced)FeedbackPanel
[ https://issues.apache.org/jira/browse/WICKET-6439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hendy Irawan updated WICKET-6439: - Description: My use case is exactly the same as described in https://stackoverflow.com/questions/27172854/how-to-automatically-scroll-up-a-wicket-panel-when-wicket-feedbackpanel-is-trigg Allow me to elaborate. Assuming a mobile browser or any viewport size that can't display the full page: When user clicks the (ajax) Submit button and there's error, without this functionality, there are two scenarios: 1. If the FeedbackPanel is on top, the user won't see it. Unless it's a stateless form, which then goes back to top. Either way they *still* have to scroll up or down to find the field. 2. If the FeedbackPanel is right above the button, only users with working Ajax will see it and only for ajax forms. Else it back to top and they won't see it. Either way they *still* have to scroll up or down to find the field. Some users find this disorienting and I suspect this is the cause some people leave and never come back. Just for the sake of argument here's one goal flow (almost half of the users go away on the very first form) that I'd like to increase its conversion rate :) !https://issues.apache.org/jira/secure/attachment/12880581/wicketscroll.jpg! Proposed solution is simple, scroll to the FeedbackPanel message, which is optimally placed right on top of the first offending field (in case there are several). But some problems I encountered while trying to get solve this: 1. With {{Form.onError()}} it's trivial to do this when there's only one FeedbackPanel. But with multiple {{FencedFeedbackPanel}}s there needs to be some logic to (1) know which of the FeedbackPanels gets which message, and (2) determine the "top-most" (based on component hierarchy), before (3) appending JavaScript to scroll there. 2. Even with point 1 solved, I still need to duplicate that logic on every form on every page. It'd be great if this logic can be put directly in the FeedbackPanel itself. I've tried it using hint from https://stackoverflow.com/questions/19246892/how-to-get-the-ajaxrequesttarget-inside-wickets-onbeforerender-method-of-a-co but I can't even get any messages, any method I try simply gave either null or Array[] : {code:java} public class ScrollNotificationPanel extends NotificationPanel { @Override protected void onInitialize() { super.onInitialize(); setOutputMarkupId(true); } @Override protected void onAfterRender() { super.onAfterRender(); final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class); if (null != target) { final Object modelObject = newFeedbackMessagesModel().getObject(); //final List feedbackMessages = getFeedbackMessagesModel().getObject(); final String msgs = JsonUtils.asJson(modelObject); target.appendJavaScript("console.log('horaXy', " + msgs + ");"); } if (null != target && getFeedbackMessages().hasMessage(FeedbackMessage.ERROR)) { String scrollScript = "$('html, body').animate({scrollTop:$('#" + getMarkupId() + "').offset().top - 20}, 'slow');\n"; target.appendJavaScript(scrollScript); } } @Override protected void onBeforeRender() { super.onBeforeRender(); final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class); if (null != target) { final Object modelObject = newFeedbackMessagesModel().getObject(); //final List feedbackMessages = getFeedbackMessagesModel().getObject(); final String msgs = JsonUtils.asJson(modelObject); target.appendJavaScript("console.log('horay', " + msgs + ");"); } if (null != target && getFeedbackMessages().hasMessage(FeedbackMessage.ERROR)) { String scrollScript = "$('html, body').animate({scrollTop:$('#" + getMarkupId() + "').offset().top - 20}, 'slow');\n"; target.appendJavaScript(scrollScript); } } } {code} 3. There needs to be some "buffer" on top when scrolling. For example, most websites have a floating navbar on top, and scrolling right to a panel will make the panel covered by the navbar. So there should be a buffer value, 20 is a sane minimal value for comfort, but some websites (like mine) will need to adjust it to 50 or something else. 4. Added bonus if this can work with non-JavaScript (i.e. Button/AjaxFallbackButton) / stateless forms. Technically it's possible by using the URL fragment, i.e. FeedbackPanel's outputMarkupId will need to be true, and the "next" page need to redirect to a fragment. However I have no idea how to do this robustly. (5. I know an edge case: horizontal scrolling, yet I personally don't care because IMHO if there's a horizontal scroll visible the page
[jira] [Updated] (WICKET-6439) Support auto-scroll for (Fenced)FeedbackPanel
[ https://issues.apache.org/jira/browse/WICKET-6439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hendy Irawan updated WICKET-6439: - Description: My use case is exactly the same as described in https://stackoverflow.com/questions/27172854/how-to-automatically-scroll-up-a-wicket-panel-when-wicket-feedbackpanel-is-trigg Allow me to elaborate. Assuming a mobile browser or any viewport size that can't display the full page: When user clicks the (ajax) Submit button and there's error, without this functionality, there are two scenarios: 1. If the FeedbackPanel is on top, the user won't see it. Unless it's a stateless form, which then goes back to top. Either way they *still* have to scroll up or down to find the field. 2. If the FeedbackPanel is right above the button, only users with working Ajax will see it and only for ajax forms. Else it back to top and they won't see it. Either way they *still* have to scroll up or down to find the field. Some users find this disorienting and I suspect this is the cause some people leave and never come back. Just for the sake of argument here's one goal flow (almost half of the users go away on the very first form) that I'd like to increase its conversion rate :) !https://issues.apache.org/jira/secure/attachment/12880581/wicketscroll.jpg! Proposed solution is simple, scroll to the FeedbackPanel message, which is optimally placed right on top of the first offending field (in case there are several). But some problems I encountered while trying to get solve this: 1. With {{Form.onError()}} it's trivial to do this when there's only one FeedbackPanel. But with multiple {{FencedFeedbackPanel}}s there needs to be some logic to (1) know which of the FeedbackPanels gets which message, and (2) determine the "top-most" (based on component hierarchy), before (3) appending JavaScript to scroll there. 2. Even with point 1 solved, I still need to duplicate that logic on every form on every page. It'd be great if this logic can be put directly in the FeedbackPanel itself. I've tried it using hint from https://stackoverflow.com/questions/19246892/how-to-get-the-ajaxrequesttarget-inside-wickets-onbeforerender-method-of-a-co but I can't even get any messages, any method I try simply gave either null or Array[] : {code:java} public class ScrollNotificationPanel extends NotificationPanel { @Override protected void onInitialize() { super.onInitialize(); setOutputMarkupId(true); } @Override protected void onAfterRender() { super.onAfterRender(); final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class); if (null != target) { final Object modelObject = newFeedbackMessagesModel().getObject(); //final List feedbackMessages = getFeedbackMessagesModel().getObject(); final String msgs = JsonUtils.asJson(modelObject); target.appendJavaScript("console.log('horaXy', " + msgs + ");"); } if (null != target && getFeedbackMessages().hasMessage(FeedbackMessage.ERROR)) { String scrollScript = "$('html, body').animate({scrollTop:$('#" + getMarkupId() + "').offset().top - 20}, 'slow');\n"; target.appendJavaScript(scrollScript); } } @Override protected void onBeforeRender() { super.onBeforeRender(); final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class); if (null != target) { final Object modelObject = newFeedbackMessagesModel().getObject(); //final List feedbackMessages = getFeedbackMessagesModel().getObject(); final String msgs = JsonUtils.asJson(modelObject); target.appendJavaScript("console.log('horay', " + msgs + ");"); } if (null != target && getFeedbackMessages().hasMessage(FeedbackMessage.ERROR)) { String scrollScript = "$('html, body').animate({scrollTop:$('#" + getMarkupId() + "').offset().top - 20}, 'slow');\n"; target.appendJavaScript(scrollScript); } } } {code} 3. There needs to be some "buffer" on top when scrolling. For example, most websites have a floating navbar on top, and scrolling right to a panel will make the panel covered by the navbar. So there should be a buffer value, 20 is a sane minimal value for comfort, but some websites (like mine) will need to adjust it to 50 or something else. 4. Added bonus if this can work with non-JavaScript (i.e. Button/AjaxFallbackButton) / stateless forms. Technically it's possible by using the URL fragment, i.e. FeedbackPanel's outputMarkupId will need to be true, and the "next" page need to redirect to a fragment. However I have no idea how to do this robustly. (5. I know an edge case: horizontal scrolling, yet I personally don't care because IMHO if there's a horizontal scroll visible the page
[jira] [Updated] (WICKET-6439) Support auto-scroll for (Fenced)FeedbackPanel
[ https://issues.apache.org/jira/browse/WICKET-6439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hendy Irawan updated WICKET-6439: - Description: My use case is exactly the same as described in https://stackoverflow.com/questions/27172854/how-to-automatically-scroll-up-a-wicket-panel-when-wicket-feedbackpanel-is-trigg Allow me to elaborate. Assuming a mobile browser or any viewport size that can't display the full page: When user clicks the (ajax) Submit button and there's error, without this functionality, there are two scenarios: 1. If the FeedbackPanel is on top, the user won't see it. Unless they're using a traditional browser such as Opera Mini, which then goes back to top. Either way they *still* have to scroll up or down to find the field. 2. If the FeedbackPanel is right above the button, only users with modern browser will see it. Unless they're using a traditional browser such as Opera Mini, which goes back to top and won't see it. Either way they *still* have to scroll up or down to find the field. Some users find this disorienting and I suspect this is the cause some people and never come back. Just for the sake of argument here's one goal flow (almost half of the users go away on the very first form) that I'd like to increase its conversion rate :) !https://issues.apache.org/jira/secure/attachment/12880581/wicketscroll.jpg! Proposed solution is simple, scroll to the FeedbackPanel message, which is optimally placed right on top of the first offending field (in case there are several). But some problems I encountered while trying to get solve this: 1. With {{Form.onError()}} it's trivial to do this when there's only one FeedbackPanel. But with multiple {{FencedFeedbackPanel}}s there needs to be some logic to (1) know which of the FeedbackPanels gets which message, and (2) determine the "top-most" (based on component hierarchy), before (3) appending JavaScript to scroll there. 2. Even with point 1 solved, I still need to duplicate that logic on every form on every page. It'd be great if this logic can be put directly in the FeedbackPanel itself. I've tried it using hint from https://stackoverflow.com/questions/19246892/how-to-get-the-ajaxrequesttarget-inside-wickets-onbeforerender-method-of-a-co but I can't even get any messages, any method I try simply gave either null or Array[] : {code:java} public class ScrollNotificationPanel extends NotificationPanel { @Override protected void onInitialize() { super.onInitialize(); setOutputMarkupId(true); } @Override protected void onAfterRender() { super.onAfterRender(); final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class); if (null != target) { final Object modelObject = newFeedbackMessagesModel().getObject(); //final List feedbackMessages = getFeedbackMessagesModel().getObject(); final String msgs = JsonUtils.asJson(modelObject); target.appendJavaScript("console.log('horaXy', " + msgs + ");"); } if (null != target && getFeedbackMessages().hasMessage(FeedbackMessage.ERROR)) { String scrollScript = "$('html, body').animate({scrollTop:$('#" + getMarkupId() + "').offset().top - 20}, 'slow');\n"; target.appendJavaScript(scrollScript); } } @Override protected void onBeforeRender() { super.onBeforeRender(); final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class); if (null != target) { final Object modelObject = newFeedbackMessagesModel().getObject(); //final List feedbackMessages = getFeedbackMessagesModel().getObject(); final String msgs = JsonUtils.asJson(modelObject); target.appendJavaScript("console.log('horay', " + msgs + ");"); } if (null != target && getFeedbackMessages().hasMessage(FeedbackMessage.ERROR)) { String scrollScript = "$('html, body').animate({scrollTop:$('#" + getMarkupId() + "').offset().top - 20}, 'slow');\n"; target.appendJavaScript(scrollScript); } } } {code} 3. There needs to be some "buffer" on top when scrolling. For example, most websites have a floating navbar on top, and scrolling right to a panel will make the panel covered by the navbar. So there should be a buffer value, 20 is a sane minimal value for comfort, but some websites (like mine) will need to adjust it to 50 or something else. 4. Added bonus if this can work with non-JavaScript (i.e. Button/AjaxFallbackButton) / stateless forms. Technically it's possible by using the URL fragment, i.e. FeedbackPanel's outputMarkupId will need to be true, and the "next" page need to redirect to a fragment. However I have no idea how to do this robustly. (5. I know an edge case: horizontal scrolling, yet I personally don't
[jira] [Updated] (WICKET-6439) Support auto-scroll for (Fenced)FeedbackPanel
[ https://issues.apache.org/jira/browse/WICKET-6439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hendy Irawan updated WICKET-6439: - Description: My use case is exactly the same as described in https://stackoverflow.com/questions/27172854/how-to-automatically-scroll-up-a-wicket-panel-when-wicket-feedbackpanel-is-trigg Allow me to elaborate. Assuming a mobile browser or any viewport size that can't display the full page: When user clicks the (ajax) Submit button and there's error, without this functionality, there are two scenarios: 1. If the FeedbackPanel is on top, the user won't see it. Unless they're using a traditional browser such as Opera Mini, which then goes back to top. Either way they *still* have to scroll up or down to find the field. 2. If the FeedbackPanel is right above the button, only users with modern browser will see it. Unless they're using a traditional browser such as Opera Mini, which goes back to top and won't see it. Either way they *still* have to scroll up or down to find the field. Some users find this disorienting and I suspect this is the cause some people and never come back. Just for the sake of argument here's one goal flow (almost half of the users go away on the very first form) that I'd like to increase its conversion rate :) !https://issues.apache.org/jira/secure/attachment/12880581/wicketscroll.jpg! Proposed solution is simple, scroll to the FeedbackPanel message, which is optimally placed right on top of the first offending field (in case there are several). But some problems I encountered while trying to get solve this: 1. With {{Form.onError()}} it's trivial to do this when there's only one FeedbackPanel. But with multiple {{FencedFeedbackPanel}}s there needs to be some logic to (1) know which of the FeedbackPanels gets which message, and (2) determine the "top-most" (based on component hierarchy), before (3) appending JavaScript to scroll there. 2. Even with point 1 solved, I still need to duplicate that logic on every form on every page. It'd be great if this logic can be put directly in the FeedbackPanel itself. I've tried it using hint from https://stackoverflow.com/questions/19246892/how-to-get-the-ajaxrequesttarget-inside-wickets-onbeforerender-method-of-a-co but I can't even get any messages, any method I try simply gave either null or Array[] : {code:java} public class ScrollNotificationPanel extends NotificationPanel { @Override protected void onInitialize() { super.onInitialize(); setOutputMarkupId(true); } @Override protected void onAfterRender() { super.onAfterRender(); final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class); if (null != target) { final Object modelObject = newFeedbackMessagesModel().getObject(); //final List feedbackMessages = getFeedbackMessagesModel().getObject(); final String msgs = JsonUtils.asJson(modelObject); target.appendJavaScript("console.log('horaXy', " + msgs + ");"); } if (null != target && getFeedbackMessages().hasMessage(FeedbackMessage.ERROR)) { String scrollScript = "$('html, body').animate({scrollTop:$('#" + getMarkupId() + "').offset().top - 20}, 'slow');\n"; target.appendJavaScript(scrollScript); } } @Override protected void onBeforeRender() { super.onBeforeRender(); final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class); if (null != target) { final Object modelObject = newFeedbackMessagesModel().getObject(); //final List feedbackMessages = getFeedbackMessagesModel().getObject(); final String msgs = JsonUtils.asJson(modelObject); target.appendJavaScript("console.log('horay', " + msgs + ");"); } if (null != target && getFeedbackMessages().hasMessage(FeedbackMessage.ERROR)) { String scrollScript = "$('html, body').animate({scrollTop:$('#" + getMarkupId() + "').offset().top - 20}, 'slow');\n"; target.appendJavaScript(scrollScript); } } } {code} 3. Added bonus if this can work with non-JavaScript (i.e. Button/AjaxFallbackButton) / stateless forms. Technically it's possible by using the URL fragment, i.e. FeedbackPanel's outputMarkupId will need to be true, and the "next" page need to redirect to a fragment. However I have no idea how to do this robustly. So I hope you accept this proposal or at least give me hints on how to do point 1 & 2 above. If this gets implemented in Wicket this should be a flag instead of a new component, and I hope it's enabled by default (if not in Wicket 7 then hopefully for Wicket 8). Thank you in advance Martin! :) was: My use case is exactly the same as described in
[jira] [Updated] (WICKET-6439) Support auto-scroll for (Fenced)FeedbackPanel
[ https://issues.apache.org/jira/browse/WICKET-6439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hendy Irawan updated WICKET-6439: - Description: My use case is exactly the same as described in https://stackoverflow.com/questions/27172854/how-to-automatically-scroll-up-a-wicket-panel-when-wicket-feedbackpanel-is-trigg Allow me to elaborate. Assuming a mobile browser or any viewport size that can't display the full page: When user clicks the (ajax) Submit button and there's error, without this functionality, there are two scenarios: 1. If the FeedbackPanel is on top, the user won't see it. Unless they're using a traditional browser such as Opera Mini, which then goes back to top. Either way they *still* have to scroll up or down to find the field. 2. If the FeedbackPanel is right above the button, only users with modern browser will see it. Unless they're using a traditional browser such as Opera Mini, which goes back to top and won't see it. Either way they *still* have to scroll up or down to find the field. Some users find this disorienting and I suspect this is the cause some people and never come back. Just for the sake of argument here's one goal flow (almost half of the users go away on the very first form) that I'd like to increase its conversion rate :) !https://issues.apache.org/jira/secure/attachment/12880581/wicketscroll.jpg! !wicketscroll.jpg|thumbnail! (attachment image not shown for some reason: https://issues.apache.org/jira/secure/attachment/12880581/wicketscroll.jpg) Proposed solution is simple, scroll to the FeedbackPanel message, which is optimally placed right on top of the first offending field (in case there are several). But some problems I encountered while trying to get solve this: 1. With {{Form.onError()}} it's trivial to do this when there's only one FeedbackPanel. But with multiple {{FencedFeedbackPanel}}s there needs to be some logic to (1) know which of the FeedbackPanels gets which message, and (2) determine the "top-most" (based on component hierarchy), before (3) appending JavaScript to scroll there. 2. Even with point 1 solved, I still need to duplicate that logic on every form on every page. It'd be great if this logic can be put directly in the FeedbackPanel itself. I've tried it using hint from https://stackoverflow.com/questions/19246892/how-to-get-the-ajaxrequesttarget-inside-wickets-onbeforerender-method-of-a-co but I can't even get any messages, any method I try simply gave either null or Array[] : {code:java} public class ScrollNotificationPanel extends NotificationPanel { @Override protected void onInitialize() { super.onInitialize(); setOutputMarkupId(true); } @Override protected void onAfterRender() { super.onAfterRender(); final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class); if (null != target) { final Object modelObject = newFeedbackMessagesModel().getObject(); //final List feedbackMessages = getFeedbackMessagesModel().getObject(); final String msgs = JsonUtils.asJson(modelObject); target.appendJavaScript("console.log('horaXy', " + msgs + ");"); } if (null != target && getFeedbackMessages().hasMessage(FeedbackMessage.ERROR)) { String scrollScript = "$('html, body').animate({scrollTop:$('#" + getMarkupId() + "').offset().top - 20}, 'slow');\n"; target.appendJavaScript(scrollScript); } } @Override protected void onBeforeRender() { super.onBeforeRender(); final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class); if (null != target) { final Object modelObject = newFeedbackMessagesModel().getObject(); //final List feedbackMessages = getFeedbackMessagesModel().getObject(); final String msgs = JsonUtils.asJson(modelObject); target.appendJavaScript("console.log('horay', " + msgs + ");"); } if (null != target && getFeedbackMessages().hasMessage(FeedbackMessage.ERROR)) { String scrollScript = "$('html, body').animate({scrollTop:$('#" + getMarkupId() + "').offset().top - 20}, 'slow');\n"; target.appendJavaScript(scrollScript); } } } {code} 3. Added bonus if this can work with non-JavaScript (i.e. Button/AjaxFallbackButton) / stateless forms. Technically it's possible by using the URL fragment, i.e. FeedbackPanel's outputMarkupId will need to be true, and the "next" page need to redirect to a fragment. However I have no idea how to do this robustly. So I hope you accept this proposal or at least give me hints on how to do point 1 & 2 above. If this gets implemented in Wicket this should be a flag instead of a new component, and I hope it's enabled by default (if not in Wicket 7 then hopefully for Wicket 8).
[jira] [Updated] (WICKET-6439) Support auto-scroll for (Fenced)FeedbackPanel
[ https://issues.apache.org/jira/browse/WICKET-6439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hendy Irawan updated WICKET-6439: - Description: My use case is exactly the same as described in https://stackoverflow.com/questions/27172854/how-to-automatically-scroll-up-a-wicket-panel-when-wicket-feedbackpanel-is-trigg Allow me to elaborate. Assuming a mobile browser or any viewport size that can't display the full page: When user clicks the (ajax) Submit button and there's error, without this functionality, there are two scenarios: 1. If the FeedbackPanel is on top, the user won't see it. Unless they're using a traditional browser such as Opera Mini, which then goes back to top. Either way they *still* have to scroll up or down to find the field. 2. If the FeedbackPanel is right above the button, only users with modern browser will see it. Unless they're using a traditional browser such as Opera Mini, which goes back to top and won't see it. Either way they *still* have to scroll up or down to find the field. Some users find this disorienting and I suspect this is the cause some people and never come back. Just for the sake of argument here's one goal flow (almost half of the users go away on the very first form) that I'd like to increase its conversion rate :) !wicketscroll.jpg|thumbnail! (attachment image not shown for some reason: https://issues.apache.org/jira/secure/attachment/12880581/wicketscroll.jpg) Proposed solution is simple, scroll to the FeedbackPanel message, which is optimally placed right on top of the first offending field (in case there are several). But some problems I encountered while trying to get solve this: 1. With {{Form.onError()}} it's trivial to do this when there's only one FeedbackPanel. But with multiple {{FencedFeedbackPanel}}s there needs to be some logic to (1) know which of the FeedbackPanels gets which message, and (2) determine the "top-most" (based on component hierarchy), before (3) appending JavaScript to scroll there. 2. Even with point 1 solved, I still need to duplicate that logic on every form on every page. It'd be great if this logic can be put directly in the FeedbackPanel itself. I've tried it using hint from https://stackoverflow.com/questions/19246892/how-to-get-the-ajaxrequesttarget-inside-wickets-onbeforerender-method-of-a-co but I can't even get any messages, any method I try simply gave either null or Array[] : {code:java} public class ScrollNotificationPanel extends NotificationPanel { @Override protected void onInitialize() { super.onInitialize(); setOutputMarkupId(true); } @Override protected void onAfterRender() { super.onAfterRender(); final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class); if (null != target) { final Object modelObject = newFeedbackMessagesModel().getObject(); //final List feedbackMessages = getFeedbackMessagesModel().getObject(); final String msgs = JsonUtils.asJson(modelObject); target.appendJavaScript("console.log('horaXy', " + msgs + ");"); } if (null != target && getFeedbackMessages().hasMessage(FeedbackMessage.ERROR)) { String scrollScript = "$('html, body').animate({scrollTop:$('#" + getMarkupId() + "').offset().top - 20}, 'slow');\n"; target.appendJavaScript(scrollScript); } } @Override protected void onBeforeRender() { super.onBeforeRender(); final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class); if (null != target) { final Object modelObject = newFeedbackMessagesModel().getObject(); //final List feedbackMessages = getFeedbackMessagesModel().getObject(); final String msgs = JsonUtils.asJson(modelObject); target.appendJavaScript("console.log('horay', " + msgs + ");"); } if (null != target && getFeedbackMessages().hasMessage(FeedbackMessage.ERROR)) { String scrollScript = "$('html, body').animate({scrollTop:$('#" + getMarkupId() + "').offset().top - 20}, 'slow');\n"; target.appendJavaScript(scrollScript); } } } {code} 3. Added bonus if this can work with non-JavaScript (i.e. Button/AjaxFallbackButton) / stateless forms. Technically it's possible by using the URL fragment, i.e. FeedbackPanel's outputMarkupId will need to be true, and the "next" page need to redirect to a fragment. However I have no idea how to do this robustly. So I hope you accept this proposal or at least give me hints on how to do point 1 & 2 above. If this gets implemented in Wicket this should be a flag instead of a new component, and I hope it's enabled by default (if not in Wicket 7 then hopefully for Wicket 8). Thank you in advance Martin! :) was: My use case is exactly the same as
[jira] [Updated] (WICKET-6439) Support auto-scroll for (Fenced)FeedbackPanel
[ https://issues.apache.org/jira/browse/WICKET-6439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hendy Irawan updated WICKET-6439: - Description: My use case is exactly the same as described in https://stackoverflow.com/questions/27172854/how-to-automatically-scroll-up-a-wicket-panel-when-wicket-feedbackpanel-is-trigg Allow me to elaborate. Assuming a mobile browser or any viewport size that can't display the full page: When user clicks the (ajax) Submit button and there's error, without this functionality, there are two scenarios: 1. If the FeedbackPanel is on top, the user won't see it. Unless they're using a traditional browser such as Opera Mini, which then goes back to top. Either way they *still* have to scroll up or down to find the field. 2. If the FeedbackPanel is right above the button, only users with modern browser will see it. Unless they're using a traditional browser such as Opera Mini, which goes back to top and won't see it. Either way they *still* have to scroll up or down to find the field. Some users find this disorienting and I suspect this is the cause some people and never come back. Just for the sake of argument here's one goal flow (almost half of the users go away on the very first form) that I'd like to increase its conversion rate :) !https://issues.apache.org/jira/secure/attachment/12880581/wicketscroll.jpg! !wicketscroll.jpg! Proposed solution is simple, scroll to the FeedbackPanel message, which is optimally placed right on top of the first offending field (in case there are several). But some problems I encountered while trying to get solve this: 1. With {{Form.onError()}} it's trivial to do this when there's only one FeedbackPanel. But with multiple {{FencedFeedbackPanel}}s there needs to be some logic to (1) know which of the FeedbackPanels gets which message, and (2) determine the "top-most" (based on component hierarchy), before (3) appending JavaScript to scroll there. 2. Even with point 1 solved, I still need to duplicate that logic on every form on every page. It'd be great if this logic can be put directly in the FeedbackPanel itself. I've tried it using hint from https://stackoverflow.com/questions/19246892/how-to-get-the-ajaxrequesttarget-inside-wickets-onbeforerender-method-of-a-co but I can't even get any messages, any method I try simply gave either null or Array[] : {code:java} public class ScrollNotificationPanel extends NotificationPanel { @Override protected void onInitialize() { super.onInitialize(); setOutputMarkupId(true); } @Override protected void onAfterRender() { super.onAfterRender(); final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class); if (null != target) { final Object modelObject = newFeedbackMessagesModel().getObject(); //final List feedbackMessages = getFeedbackMessagesModel().getObject(); final String msgs = JsonUtils.asJson(modelObject); target.appendJavaScript("console.log('horaXy', " + msgs + ");"); } if (null != target && getFeedbackMessages().hasMessage(FeedbackMessage.ERROR)) { String scrollScript = "$('html, body').animate({scrollTop:$('#" + getMarkupId() + "').offset().top - 20}, 'slow');\n"; target.appendJavaScript(scrollScript); } } @Override protected void onBeforeRender() { super.onBeforeRender(); final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class); if (null != target) { final Object modelObject = newFeedbackMessagesModel().getObject(); //final List feedbackMessages = getFeedbackMessagesModel().getObject(); final String msgs = JsonUtils.asJson(modelObject); target.appendJavaScript("console.log('horay', " + msgs + ");"); } if (null != target && getFeedbackMessages().hasMessage(FeedbackMessage.ERROR)) { String scrollScript = "$('html, body').animate({scrollTop:$('#" + getMarkupId() + "').offset().top - 20}, 'slow');\n"; target.appendJavaScript(scrollScript); } } } {code} 3. Added bonus if this can work with non-JavaScript (i.e. Button/AjaxFallbackButton) / stateless forms. Technically it's possible by using the URL fragment, i.e. FeedbackPanel's outputMarkupId will need to be true, and the "next" page need to redirect to a fragment. However I have no idea how to do this robustly. So I hope you accept this proposal or at least give me hints on how to do point 1 & 2 above. If this gets implemented in Wicket this should be a flag instead of a new component, and I hope it's enabled by default (if not in Wicket 7 then hopefully for Wicket 8). Thank you in advance Martin! :) was: My use case is exactly the same as described in
[jira] [Updated] (WICKET-6439) Support auto-scroll for (Fenced)FeedbackPanel
[ https://issues.apache.org/jira/browse/WICKET-6439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hendy Irawan updated WICKET-6439: - Description: My use case is exactly the same as described in https://stackoverflow.com/questions/27172854/how-to-automatically-scroll-up-a-wicket-panel-when-wicket-feedbackpanel-is-trigg Allow me to elaborate. Assuming a mobile browser or any viewport size that can't display the full page: When user clicks the (ajax) Submit button and there's error, without this functionality, there are two scenarios: 1. If the FeedbackPanel is on top, the user won't see it. Unless they're using a traditional browser such as Opera Mini, which then goes back to top. Either way they *still* have to scroll up or down to find the field. 2. If the FeedbackPanel is right above the button, only users with modern browser will see it. Unless they're using a traditional browser such as Opera Mini, which goes back to top and won't see it. Either way they *still* have to scroll up or down to find the field. Some users find this disorienting and I suspect this is the cause some people and never come back. Just for the sake of argument here's one goal flow that I'd like to increase its conversion rate :) !wicketscroll.jpg|thumbnail! (attachment image not shown for some reason: https://issues.apache.org/jira/secure/attachment/12880581/wicketscroll.jpg) Proposed solution is simple, scroll to the FeedbackPanel message, which is optimally placed right on top of the first offending field (in case there are several). But some problems I encountered while trying to get solve this: 1. With {{Form.onError()}} it's trivial to do this when there's only one FeedbackPanel. But with multiple {{FencedFeedbackPanel}}s there needs to be some logic to (1) know which of the FeedbackPanels gets which message, and (2) determine the "top-most" (based on component hierarchy), before (3) appending JavaScript to scroll there. 2. Even with point 1 solved, I still need to duplicate that logic on every form on every page. It'd be great if this logic can be put directly in the FeedbackPanel itself. I've tried it using hint from https://stackoverflow.com/questions/19246892/how-to-get-the-ajaxrequesttarget-inside-wickets-onbeforerender-method-of-a-co but I can't even get any messages, any method I try simply gave either null or Array[] : {code:java} public class ScrollNotificationPanel extends NotificationPanel { @Override protected void onInitialize() { super.onInitialize(); setOutputMarkupId(true); } @Override protected void onAfterRender() { super.onAfterRender(); final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class); if (null != target) { final Object modelObject = newFeedbackMessagesModel().getObject(); //final List feedbackMessages = getFeedbackMessagesModel().getObject(); final String msgs = JsonUtils.asJson(modelObject); target.appendJavaScript("console.log('horaXy', " + msgs + ");"); } if (null != target && getFeedbackMessages().hasMessage(FeedbackMessage.ERROR)) { String scrollScript = "$('html, body').animate({scrollTop:$('#" + getMarkupId() + "').offset().top - 20}, 'slow');\n"; target.appendJavaScript(scrollScript); } } @Override protected void onBeforeRender() { super.onBeforeRender(); final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class); if (null != target) { final Object modelObject = newFeedbackMessagesModel().getObject(); //final List feedbackMessages = getFeedbackMessagesModel().getObject(); final String msgs = JsonUtils.asJson(modelObject); target.appendJavaScript("console.log('horay', " + msgs + ");"); } if (null != target && getFeedbackMessages().hasMessage(FeedbackMessage.ERROR)) { String scrollScript = "$('html, body').animate({scrollTop:$('#" + getMarkupId() + "').offset().top - 20}, 'slow');\n"; target.appendJavaScript(scrollScript); } } } {code} 3. Added bonus if this can work with non-JavaScript (i.e. Button/AjaxFallbackButton) / stateless forms. Technically it's possible by using the URL fragment, i.e. FeedbackPanel's outputMarkupId will need to be true, and the "next" page need to redirect to a fragment. However I have no idea how to do this robustly. So I hope you accept this proposal or at least give me hints on how to do point 1 & 2 above. If this gets implemented in Wicket this should be a flag instead of a new component, and I hope it's enabled by default (if not in Wicket 7 then hopefully for Wicket 8). Thank you in advance Martin! :) was: My use case is exactly the same as described in
[jira] [Updated] (WICKET-6439) Support auto-scroll for (Fenced)FeedbackPanel
[ https://issues.apache.org/jira/browse/WICKET-6439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hendy Irawan updated WICKET-6439: - Description: My use case is exactly the same as described in https://stackoverflow.com/questions/27172854/how-to-automatically-scroll-up-a-wicket-panel-when-wicket-feedbackpanel-is-trigg Allow me to elaborate. Assuming a mobile browser or any viewport size that can't display the full page: When user clicks the (ajax) Submit button and there's error, without this functionality, there are two scenarios: 1. If the FeedbackPanel is on top, the user won't see it. Unless they're using a traditional browser such as Opera Mini, which then goes back to top. Either way they *still* have to scroll up or down to find the field. 2. If the FeedbackPanel is right above the button, only users with modern browser will see it. Unless they're using a traditional browser such as Opera Mini, which goes back to top and won't see it. Either way they *still* have to scroll up or down to find the field. Some users find this disorienting and I suspect this is the cause some people and never come back. Just for the sake of argument here's one goal flow that I'd like to increase its conversion rate :) !wicketscroll.jpg|thumbnail! (attachment image not shown for some reason) Proposed solution is simple, scroll to the FeedbackPanel message, which is optimally placed right on top of the first offending field (in case there are several). But some problems I encountered while trying to get solve this: 1. With {{Form.onError()}} it's trivial to do this when there's only one FeedbackPanel. But with multiple {{FencedFeedbackPanel}}s there needs to be some logic to (1) know which of the FeedbackPanels gets which message, and (2) determine the "top-most" (based on component hierarchy), before (3) appending JavaScript to scroll there. 2. Even with point 1 solved, I still need to duplicate that logic on every form on every page. It'd be great if this logic can be put directly in the FeedbackPanel itself. I've tried it using hint from https://stackoverflow.com/questions/19246892/how-to-get-the-ajaxrequesttarget-inside-wickets-onbeforerender-method-of-a-co but I can't even get any messages, any method I try simply gave either null or Array[] : {code:java} public class ScrollNotificationPanel extends NotificationPanel { @Override protected void onInitialize() { super.onInitialize(); setOutputMarkupId(true); } @Override protected void onAfterRender() { super.onAfterRender(); final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class); if (null != target) { final Object modelObject = newFeedbackMessagesModel().getObject(); //final List feedbackMessages = getFeedbackMessagesModel().getObject(); final String msgs = JsonUtils.asJson(modelObject); target.appendJavaScript("console.log('horaXy', " + msgs + ");"); } if (null != target && getFeedbackMessages().hasMessage(FeedbackMessage.ERROR)) { String scrollScript = "$('html, body').animate({scrollTop:$('#" + getMarkupId() + "').offset().top - 20}, 'slow');\n"; target.appendJavaScript(scrollScript); } } @Override protected void onBeforeRender() { super.onBeforeRender(); final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class); if (null != target) { final Object modelObject = newFeedbackMessagesModel().getObject(); //final List feedbackMessages = getFeedbackMessagesModel().getObject(); final String msgs = JsonUtils.asJson(modelObject); target.appendJavaScript("console.log('horay', " + msgs + ");"); } if (null != target && getFeedbackMessages().hasMessage(FeedbackMessage.ERROR)) { String scrollScript = "$('html, body').animate({scrollTop:$('#" + getMarkupId() + "').offset().top - 20}, 'slow');\n"; target.appendJavaScript(scrollScript); } } } {code} 3. Added bonus if this can work with non-JavaScript (i.e. Button/AjaxFallbackButton) / stateless forms. Technically it's possible by using the URL fragment, i.e. FeedbackPanel's outputMarkupId will need to be true, and the "next" page need to redirect to a fragment. However I have no idea how to do this robustly. So I hope you accept this proposal or at least give me hints on how to do point 1 & 2 above. If this gets implemented in Wicket this should be a flag instead of a new component, and I hope it's enabled by default (if not in Wicket 7 then hopefully for Wicket 8). Thank you in advance Martin! :) was: My use case is exactly the same as described in
[jira] [Created] (WICKET-6439) Support auto-scroll for (Fenced)FeedbackPanel
Hendy Irawan created WICKET-6439: Summary: Support auto-scroll for (Fenced)FeedbackPanel Key: WICKET-6439 URL: https://issues.apache.org/jira/browse/WICKET-6439 Project: Wicket Issue Type: Improvement Components: wicket Affects Versions: 7.8.0 Reporter: Hendy Irawan Priority: Minor Attachments: wicketscroll.jpg My use case is exactly the same as described in https://stackoverflow.com/questions/27172854/how-to-automatically-scroll-up-a-wicket-panel-when-wicket-feedbackpanel-is-trigg Allow me to elaborate. Assuming a mobile browser or any viewport size that can't display the full page: When user clicks the (ajax) Submit button and there's error, without this functionality, there are two scenarios: 1. If the FeedbackPanel is on top, the user won't see it. Unless they're using a traditional browser such as Opera Mini, which then goes back to top. Either way they *still* have to scroll up or down to find the field. 2. If the FeedbackPanel is right above the button, only users with modern browser will see it. Unless they're using a traditional browser such as Opera Mini, which goes back to top and won't see it. Either way they *still* have to scroll up or down to find the field. Some users find this disorienting and I suspect this is the cause some people and never come back. Just for the sake of argument here's one goal flow that I'd like to increase its conversion rate :) !wicketscroll.jpg|thumbnail! Proposed solution is simple, scroll to the FeedbackPanel message, which is optimally placed right on top of the first offending field (in case there are several). But some problems I encountered while trying to get solve this: 1. With {{Form.onError()}} it's trivial to do this when there's only one FeedbackPanel. But with multiple {{FencedFeedbackPanel}}s there needs to be some logic to (1) know which of the FeedbackPanels gets which message, and (2) determine the "top-most" (based on component hierarchy), before (3) appending JavaScript to scroll there. 2. Even with point 1 solved, I still need to duplicate that logic on every form on every page. It'd be great if this logic can be put directly in the FeedbackPanel itself. I've tried it using hint from https://stackoverflow.com/questions/19246892/how-to-get-the-ajaxrequesttarget-inside-wickets-onbeforerender-method-of-a-co but I can't even get any messages, any method I try simply gave either null or Array[] : {code:java} public class ScrollNotificationPanel extends NotificationPanel { @Override protected void onInitialize() { super.onInitialize(); setOutputMarkupId(true); } @Override protected void onAfterRender() { super.onAfterRender(); final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class); if (null != target) { final Object modelObject = newFeedbackMessagesModel().getObject(); //final List feedbackMessages = getFeedbackMessagesModel().getObject(); final String msgs = JsonUtils.asJson(modelObject); target.appendJavaScript("console.log('horaXy', " + msgs + ");"); } if (null != target && getFeedbackMessages().hasMessage(FeedbackMessage.ERROR)) { String scrollScript = "$('html, body').animate({scrollTop:$('#" + getMarkupId() + "').offset().top - 20}, 'slow');\n"; target.appendJavaScript(scrollScript); } } @Override protected void onBeforeRender() { super.onBeforeRender(); final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class); if (null != target) { final Object modelObject = newFeedbackMessagesModel().getObject(); //final List feedbackMessages = getFeedbackMessagesModel().getObject(); final String msgs = JsonUtils.asJson(modelObject); target.appendJavaScript("console.log('horay', " + msgs + ");"); } if (null != target && getFeedbackMessages().hasMessage(FeedbackMessage.ERROR)) { String scrollScript = "$('html, body').animate({scrollTop:$('#" + getMarkupId() + "').offset().top - 20}, 'slow');\n"; target.appendJavaScript(scrollScript); } } } {code} 3. Added bonus if this can work with non-JavaScript (i.e. Button/AjaxFallbackButton) / stateless forms. Technically it's possible by using the URL fragment, i.e. FeedbackPanel's outputMarkupId will need to be true, and the "next" page need to redirect to a fragment. However I have no idea how to do this robustly. So I hope you accept this proposal or at least give me hints on how to do point 1 & 2 above. If this gets implemented in Wicket this should be a flag instead of a new component, and I hope it's enabled by default (if not in Wicket 7 then hopefully for Wicket 8).
[jira] [Commented] (WICKET-6432) SignInPanel causes infinite redirect loop if session id is suppressed in URL
[ https://issues.apache.org/jira/browse/WICKET-6432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16115839#comment-16115839 ] Sven Meier commented on WICKET-6432: With remember-me out of the way we come to the core of the problem (and It doesn't depend whether you have set "org.eclipse.jetty.servlet.SessionIdPathParameterName" or not): Jetty restricts the session cookie to HTTPS requests only. Any further request via HTTP has to include another Session cookie *in* the URL. These are measures by Jetty to limit access to a session cookie to secure connections. I don't see what Wicket can do about this. Suggestions are welcomed. > SignInPanel causes infinite redirect loop if session id is suppressed in URL > > > Key: WICKET-6432 > URL: https://issues.apache.org/jira/browse/WICKET-6432 > Project: Wicket > Issue Type: Bug > Components: wicket-auth-roles >Affects Versions: 7.8.0 >Reporter: Simon Erhardt >Assignee: Martin Grigorov > Attachments: redirect-loop.zip > > > The attached, very simple quickstart causes an infinite redirection loop. It > consists of a _AuthenticatedPage_, which is annotated by > _@AuthorizeInstantiation_, and a _LoginPage_, using a SingInPanel, which is > set up as home page. > The trouble begins if one opens the HTTP URL after signing in with HTTPS. > It happens only if Jetty is forced to suppress the session id as URL > parameter (see [Jetty 9.2.X > documentation|http://www.eclipse.org/jetty/documentation/9.2.22.v20170531/session-management.html#setting-session-characteristics]): > {code} > WebAppContext bb = new WebAppContext(); > // The following line causes the trouble > > bb.setInitParameter("org.eclipse.jetty.servlet.SessionIdPathParameterName", > "none"); > {code} > Steps to reproduce: > # Start the application in test/java/quickstart/Start > # Open https://localhost:8443 > # Sign in using "user" and "password" > # After redirected to the AuthenticatedPage, open http://localhost:8080 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (WICKET-6438) 8.x reference guide needs a few minor improvements
[ https://issues.apache.org/jira/browse/WICKET-6438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16115828#comment-16115828 ] ASF GitHub Bot commented on WICKET-6438: Github user ozeray commented on the issue: https://github.com/apache/wicket/pull/229 Implemented Martin's diff request. Made some more improvements on 8.x reference documentation. > 8.x reference guide needs a few minor improvements > -- > > Key: WICKET-6438 > URL: https://issues.apache.org/jira/browse/WICKET-6438 > Project: Wicket > Issue Type: Improvement > Components: guide >Affects Versions: 8.0.0 >Reporter: Ahmet Yaşar Özer >Assignee: Andrea Del Bene >Priority: Minor > Labels: documentation > > Minor fix in helloWorld.adoc: Removed irrelevant line to avoid warning during > maven packaging phase: > WARNING: image to embed not found or not readable: > F:/wicket/wicket-user-guide/src/main/asciidoc/images/uml-component.svg > Minor fix in contributing.adoc: Revised the generated document target > directory for the user guide documentation. > Cropped top and bottom blank parts in comsysto-logo.png to have the > Introduction page fit in one page in PDF. Made minor changes in > helloWorld_2.adoc, helloWorld_3.adoc and introduction.adoc. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (WICKET-6432) SignInPanel causes infinite redirect loop if session id is suppressed in URL
[ https://issues.apache.org/jira/browse/WICKET-6432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16115806#comment-16115806 ] Sven Meier commented on WICKET-6432: HTTPS works fine here. This issue is caused by two factors actually: Firstly SignInPanel#onConfigure() uses the authentication strategy to automatically sign the user. Jetty does not accept the cookie on non-HTTPS request (see next comment), so the application goes into a redirect loop. This can remedied by disabling remember-me getSecuritySettings().setAuthenticationStrategy(new NoOpAuthenticationStrategy()). Instead of a redirect-loop, the user will now have to sign in twice for HTTP and HTTPS respectively. > SignInPanel causes infinite redirect loop if session id is suppressed in URL > > > Key: WICKET-6432 > URL: https://issues.apache.org/jira/browse/WICKET-6432 > Project: Wicket > Issue Type: Bug > Components: wicket-auth-roles >Affects Versions: 7.8.0 >Reporter: Simon Erhardt >Assignee: Martin Grigorov > Attachments: redirect-loop.zip > > > The attached, very simple quickstart causes an infinite redirection loop. It > consists of a _AuthenticatedPage_, which is annotated by > _@AuthorizeInstantiation_, and a _LoginPage_, using a SingInPanel, which is > set up as home page. > The trouble begins if one opens the HTTP URL after signing in with HTTPS. > It happens only if Jetty is forced to suppress the session id as URL > parameter (see [Jetty 9.2.X > documentation|http://www.eclipse.org/jetty/documentation/9.2.22.v20170531/session-management.html#setting-session-characteristics]): > {code} > WebAppContext bb = new WebAppContext(); > // The following line causes the trouble > > bb.setInitParameter("org.eclipse.jetty.servlet.SessionIdPathParameterName", > "none"); > {code} > Steps to reproduce: > # Start the application in test/java/quickstart/Start > # Open https://localhost:8443 > # Sign in using "user" and "password" > # After redirected to the AuthenticatedPage, open http://localhost:8080 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (WICKET-6432) SignInPanel causes infinite redirect loop if session id is suppressed in URL
[ https://issues.apache.org/jira/browse/WICKET-6432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16115798#comment-16115798 ] Sven Meier commented on WICKET-6432: Sorry for the wrong issue in the commit message - I was working on both issues at a time :/. > SignInPanel causes infinite redirect loop if session id is suppressed in URL > > > Key: WICKET-6432 > URL: https://issues.apache.org/jira/browse/WICKET-6432 > Project: Wicket > Issue Type: Bug > Components: wicket-auth-roles >Affects Versions: 7.8.0 >Reporter: Simon Erhardt >Assignee: Martin Grigorov > Attachments: redirect-loop.zip > > > The attached, very simple quickstart causes an infinite redirection loop. It > consists of a _AuthenticatedPage_, which is annotated by > _@AuthorizeInstantiation_, and a _LoginPage_, using a SingInPanel, which is > set up as home page. > The trouble begins if one opens the HTTP URL after signing in with HTTPS. > It happens only if Jetty is forced to suppress the session id as URL > parameter (see [Jetty 9.2.X > documentation|http://www.eclipse.org/jetty/documentation/9.2.22.v20170531/session-management.html#setting-session-characteristics]): > {code} > WebAppContext bb = new WebAppContext(); > // The following line causes the trouble > > bb.setInitParameter("org.eclipse.jetty.servlet.SessionIdPathParameterName", > "none"); > {code} > Steps to reproduce: > # Start the application in test/java/quickstart/Start > # Open https://localhost:8443 > # Sign in using "user" and "password" > # After redirected to the AuthenticatedPage, open http://localhost:8080 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[2/7] wicket git commit: Reduced degree of nesting
Reduced degree of nesting Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/9bd66f67 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/9bd66f67 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/9bd66f67 Branch: refs/heads/master Commit: 9bd66f676a8db8e577d6bc114535d4a62dfe8f43 Parents: 717dc33 Author: Domas PoliakasAuthored: Thu Jul 27 15:26:43 2017 +0100 Committer: Martin Tzvetanov Grigorov Committed: Sun Aug 6 15:27:21 2017 +0300 -- .../wicket/util/tester/BaseWicketTester.java| 396 +-- 1 file changed, 197 insertions(+), 199 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/9bd66f67/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java index 2f17a64..1fcd084 100644 --- a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java +++ b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java @@ -144,14 +144,14 @@ import junit.framework.AssertionFailedError; * A helper class to ease unit testing of Wicket applications without the need for a servlet * container. See javadoc of WicketTester for example usage. This class can be used as * is, but JUnit users should use derived class WicketTester. - * + * * @see WicketTester - * + * * @author Ingram Chen * @author Juergen Donnerstag * @author Frank Bille * @author Igor Vaynberg - * + * * @since 1.2.6 */ @SuppressWarnings("serial") @@ -211,7 +211,7 @@ public class BaseWicketTester /** * Creates WicketTester and automatically creates a WebApplication. -* +* * @param * @param homePage *a home page Class @@ -230,7 +230,7 @@ public class BaseWicketTester /** * Creates a WicketTester. -* +* * @param application *a WicketTester WebApplication object */ @@ -241,7 +241,7 @@ public class BaseWicketTester /** * Creates a WicketTester. -* +* * @param application *a WicketTester WebApplication object * @param servletContextBasePath @@ -255,7 +255,7 @@ public class BaseWicketTester /** * Creates a WicketTester. -* +* * @param application *a WicketTester WebApplication object * @param servletCtx @@ -265,10 +265,10 @@ public class BaseWicketTester { this(application, servletCtx, true); } - + /** * Creates a WicketTester. -* +* * @param application *a WicketTester WebApplication object * @param init @@ -278,10 +278,10 @@ public class BaseWicketTester { this(application, null, init); } - + /** * Creates a WicketTester. -* +* * @param application *a WicketTester WebApplication object * @param servletCtx @@ -297,10 +297,10 @@ public class BaseWicketTester } servletContext = servletCtx != null ? servletCtx - // If it's provided from the container it's not necessary to mock. - : !init && application.getServletContext() != null ? application.getServletContext() - : new MockServletContext(application, null); - + // If it's provided from the container it's not necessary to mock. + : !init && application.getServletContext() != null ? application.getServletContext() + : new MockServletContext(application, null); + // If using Arquillian and it's configured in a web.xml it'll be provided. If not, mock it. if(application.getWicketFilter() == null) { @@ -330,7 +330,7 @@ public class BaseWicketTester { application.setName("WicketTesterApplication-" + UUID.randomUUID()); } - + application.setServletContext(servletContext); // initialize the application application.initApplication(); @@ -342,15 +342,15 @@ public class BaseWicketTester // reconfigure application for the test environment
[5/7] wicket git commit: Forgot to add a license
Forgot to add a license Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/aeda988d Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/aeda988d Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/aeda988d Branch: refs/heads/master Commit: aeda988d3a46de753a5a2fca9778ea7d99e3f782 Parents: 4158b8c Author: Domas PoliakasAuthored: Thu Jul 27 14:27:26 2017 +0100 Committer: Martin Tzvetanov Grigorov Committed: Sun Aug 6 15:27:21 2017 +0300 -- .../tester/MockPageWithLabelInEnclosure.java| 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/aeda988d/wicket-core/src/test/java/org/apache/wicket/util/tester/MockPageWithLabelInEnclosure.java -- diff --git a/wicket-core/src/test/java/org/apache/wicket/util/tester/MockPageWithLabelInEnclosure.java b/wicket-core/src/test/java/org/apache/wicket/util/tester/MockPageWithLabelInEnclosure.java index b2f09f1..06e6ca2 100644 --- a/wicket-core/src/test/java/org/apache/wicket/util/tester/MockPageWithLabelInEnclosure.java +++ b/wicket-core/src/test/java/org/apache/wicket/util/tester/MockPageWithLabelInEnclosure.java @@ -1,3 +1,19 @@ +/* + * 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.util.tester; import org.apache.wicket.ajax.AjaxRequestTarget; @@ -6,7 +22,9 @@ import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.basic.Label; /** - * Created by dpoliakas on 27/07/2017. + * Mock page which has an ajax link in an enclosure. Clicking the link invokes ajax rendering the link again. + * + * @author Domas Poliakas (disblader) */ public class MockPageWithLabelInEnclosure extends WebPage {
[3/7] wicket git commit: Tests for new functionality
Tests for new functionality Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/4158b8c5 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/4158b8c5 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/4158b8c5 Branch: refs/heads/master Commit: 4158b8c5f479bede43a413aca928d2e5d08255d8 Parents: 73d094b Author: Domas PoliakasAuthored: Thu Jul 27 14:16:21 2017 +0100 Committer: Martin Tzvetanov Grigorov Committed: Sun Aug 6 15:27:21 2017 +0300 -- .../tester/MockPageWithLabelInEnclosure.html| 13 ++ .../tester/MockPageWithLabelInEnclosure.java| 26 .../wicket/util/tester/WicketTesterTest.java| 12 + 3 files changed, 51 insertions(+) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/4158b8c5/wicket-core/src/test/java/org/apache/wicket/util/tester/MockPageWithLabelInEnclosure.html -- diff --git a/wicket-core/src/test/java/org/apache/wicket/util/tester/MockPageWithLabelInEnclosure.html b/wicket-core/src/test/java/org/apache/wicket/util/tester/MockPageWithLabelInEnclosure.html new file mode 100644 index 000..35dfab8 --- /dev/null +++ b/wicket-core/src/test/java/org/apache/wicket/util/tester/MockPageWithLabelInEnclosure.html @@ -0,0 +1,13 @@ + +http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> +http://www.w3.org/1999/xhtml; xmlns:wicket> + + +Insert title here + + + +[Something] + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/wicket/blob/4158b8c5/wicket-core/src/test/java/org/apache/wicket/util/tester/MockPageWithLabelInEnclosure.java -- diff --git a/wicket-core/src/test/java/org/apache/wicket/util/tester/MockPageWithLabelInEnclosure.java b/wicket-core/src/test/java/org/apache/wicket/util/tester/MockPageWithLabelInEnclosure.java new file mode 100644 index 000..b2f09f1 --- /dev/null +++ b/wicket-core/src/test/java/org/apache/wicket/util/tester/MockPageWithLabelInEnclosure.java @@ -0,0 +1,26 @@ +package org.apache.wicket.util.tester; + +import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.ajax.markup.html.AjaxLink; +import org.apache.wicket.markup.html.WebPage; +import org.apache.wicket.markup.html.basic.Label; + +/** + * Created by dpoliakas on 27/07/2017. + */ +public class MockPageWithLabelInEnclosure extends WebPage { + +public MockPageWithLabelInEnclosure() { +// Clicking this link re-renders the link itself +this.add(new AjaxLink("testLink") { +@Override +public void onClick(AjaxRequestTarget target) { +target.add(this); +} +}); +} + +public AjaxLink getSelfRefreshingAjaxLink(){ +return (AjaxLink) get("testLink"); +} +} http://git-wip-us.apache.org/repos/asf/wicket/blob/4158b8c5/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java -- diff --git a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java index ee32429..33ea646 100644 --- a/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java +++ b/wicket-core/src/test/java/org/apache/wicket/util/tester/WicketTesterTest.java @@ -1327,4 +1327,16 @@ public class WicketTesterTest extends WicketTestCase String secondId = tester.getSession().getId(); assertNotEquals(firstId, secondId); } + + @Test + public void assertComponentInEnclosureInAjaxResponse() + { + MockPageWithLabelInEnclosure page = new MockPageWithLabelInEnclosure(); + AjaxLink testLink = page.getSelfRefreshingAjaxLink(); + + tester.startPage(page); + tester.clickLink(testLink); + tester.assertComponentOnAjaxResponse(testLink); + + } }
[1/7] wicket git commit: Reduced degree of nesting and also didn't mess up the indentation all over the place
Repository: wicket Updated Branches: refs/heads/master 5f2809c7c -> 2f23607e1 Reduced degree of nesting and also didn't mess up the indentation all over the place Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/2f23607e Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/2f23607e Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/2f23607e Branch: refs/heads/master Commit: 2f23607e13fb3582e84874f57a8a3ec6b7cc5a98 Parents: f2a23b8 Author: Domas PoliakasAuthored: Thu Aug 3 09:04:52 2017 +0100 Committer: Martin Tzvetanov Grigorov Committed: Sun Aug 6 15:27:21 2017 +0300 -- .../wicket/util/tester/BaseWicketTester.java| 26 +--- 1 file changed, 12 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/2f23607e/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java index ce8bc08..b0263c7 100644 --- a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java +++ b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java @@ -2328,26 +2328,24 @@ public class BaseWicketTester failMessage = "Component wasn't found in the AJAX response. " + componentInfo; result = isTrue(failMessage, isComponentInAjaxResponse); - if (result.wasFailed()){ - // Check if the component has been included as part of an enclosure render - Enclosure enclosure = getLastRenderedPage().visitChildren(Enclosure.class, (Enclosure enc, IVisit visit) -> { - if (AjaxEnclosureListener.isControllerOfEnclosure(component, enc)){ - visit.stop(enc); - } - }); + if (!result.wasFailed()) { + return result; + } - if (enclosure != null){ - failMessage = "Component's enclosure was not found in the AJAX response. " + enclosure; - boolean isEnclosureInAjaxResponse = !isComponentOnAjaxResponse(enclosure).wasFailed(); - return isTrue(failMessage, isEnclosureInAjaxResponse); - } else { - return result; + // Check if the component has been included as part of an enclosure render + Enclosure enclosure = getLastRenderedPage().visitChildren(Enclosure.class, (Enclosure enc, IVisit visit) -> { + if (AjaxEnclosureListener.isControllerOfEnclosure(component, enc)){ + visit.stop(enc); } + }); - } else { + if (enclosure == null) { return result; } + failMessage = "Component's enclosure was not found in the AJAX response. " + enclosure; + boolean isEnclosureInAjaxResponse = !isComponentOnAjaxResponse(enclosure).wasFailed(); + return isTrue(failMessage, isEnclosureInAjaxResponse); }
[7/7] wicket git commit: Addressing pull request #224 comments
Addressing pull request #224 comments Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/717dc339 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/717dc339 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/717dc339 Branch: refs/heads/master Commit: 717dc339d8ef416c52f86a6af3b0a4ac53d5594e Parents: aeda988 Author: Domas PoliakasAuthored: Thu Jul 27 14:58:48 2017 +0100 Committer: Martin Tzvetanov Grigorov Committed: Sun Aug 6 15:27:21 2017 +0300 -- .../wicket/util/tester/BaseWicketTester.java| 24 1 file changed, 15 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/717dc339/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java index 13c16fb..2f17a64 100644 --- a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java +++ b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java @@ -2328,21 +2328,27 @@ public class BaseWicketTester failMessage = "Component wasn't found in the AJAX response. " + componentInfo; result = isTrue(failMessage, isComponentInAjaxResponse); - // Check if the component has been included as part of an enclosure render - Enclosure enclosure = getLastRenderedPage().visitChildren(Enclosure.class, (Enclosure enc, IVisit visit) -> { - if (AjaxEnclosureListener.isControllerOfEnclosure(component, enc)){ - visit.stop(enc); + if (result.wasFailed()){ + // Check if the component has been included as part of an enclosure render + Enclosure enclosure = getLastRenderedPage().visitChildren(Enclosure.class, (Enclosure enc, IVisit visit) -> { + if (AjaxEnclosureListener.isControllerOfEnclosure(component, enc)){ + visit.stop(enc); + } + }); + + if (enclosure != null){ + failMessage = "Component's enclosure was not found in the AJAX response. " + enclosure; + boolean isEnclosureInAjaxResponse = !isComponentOnAjaxResponse(enclosure).wasFailed(); + return isTrue(failMessage, isEnclosureInAjaxResponse); + } else { + return result; } - }); - if (enclosure != null){ - failMessage = "Component's enclosure was not found in the AJAX response. " + enclosure.toString(); - boolean isEnclosureInAjaxResponse = !isComponentOnAjaxResponse(enclosure).wasFailed(); - return isTrue(failMessage, isEnclosureInAjaxResponse); } else { return result; } + } /**
[4/7] wicket git commit: isComponentOnAjaxResponse now checks whether a component's enclosure is on ajax response
isComponentOnAjaxResponse now checks whether a component's enclosure is on ajax response Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/73d094b6 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/73d094b6 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/73d094b6 Branch: refs/heads/master Commit: 73d094b60a691b2f07d7900e78bcf76ac45ea28a Parents: 5f2809c Author: Domas PoliakasAuthored: Thu Jul 27 12:19:42 2017 +0100 Committer: Martin Tzvetanov Grigorov Committed: Sun Aug 6 15:27:21 2017 +0300 -- .../protocol/http/AjaxEnclosureListener.java| 5 +++-- .../wicket/util/tester/BaseWicketTester.java| 20 +++- 2 files changed, 22 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/73d094b6/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java b/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java index 63e493f..b966580 100644 --- a/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java +++ b/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java @@ -23,6 +23,7 @@ import java.util.Map; import org.apache.wicket.Component; import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.markup.html.internal.Enclosure; import org.apache.wicket.markup.html.internal.InlineEnclosure; import org.apache.wicket.markup.parser.filter.InlineEnclosureHandler; import org.apache.wicket.util.visit.IVisit; @@ -107,8 +108,8 @@ public class AjaxEnclosureListener implements AjaxRequestTarget.IListener * @param enclosure * @return true if the given component is the controlling child of the given InlineEnclosure */ - private boolean isControllerOfEnclosure(final Component component, - final InlineEnclosure enclosure) + public static boolean isControllerOfEnclosure(final Component component, + final Enclosure enclosure) { return (enclosure.get(enclosure.getChildId()) == component || // #queue() enclosure.getParent().get(enclosure.getChildId()) == component); // #add() http://git-wip-us.apache.org/repos/asf/wicket/blob/73d094b6/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java index ddcffb6..13c16fb 100644 --- a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java +++ b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java @@ -82,6 +82,7 @@ import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.FormComponent; import org.apache.wicket.markup.html.form.SubmitLink; +import org.apache.wicket.markup.html.internal.Enclosure; import org.apache.wicket.markup.html.link.AbstractLink; import org.apache.wicket.markup.html.link.BookmarkablePageLink; import org.apache.wicket.markup.html.link.ExternalLink; @@ -96,6 +97,7 @@ import org.apache.wicket.mock.MockRequestParameters; import org.apache.wicket.model.PropertyModel; import org.apache.wicket.page.IPageManager; import org.apache.wicket.page.IPageManagerContext; +import org.apache.wicket.protocol.http.AjaxEnclosureListener; import org.apache.wicket.protocol.http.IMetaDataBufferingWebResponse; import org.apache.wicket.protocol.http.WebApplication; import org.apache.wicket.protocol.http.WicketFilter; @@ -2324,7 +2326,23 @@ public class BaseWicketTester boolean isComponentInAjaxResponse = ajaxResponse.matches("(?s).*]*?>.*"); failMessage = "Component wasn't found in the AJAX response. " + componentInfo; - return isTrue(failMessage, isComponentInAjaxResponse); + result = isTrue(failMessage, isComponentInAjaxResponse); + + // Check if the component has been included as part of an enclosure render + Enclosure enclosure = getLastRenderedPage().visitChildren(Enclosure.class, (Enclosure enc, IVisit visit) -> { + if (AjaxEnclosureListener.isControllerOfEnclosure(component, enc)){ + visit.stop(enc); + } + }); + + if (enclosure != null){ +
[6/7] wicket git commit: Revert "Reduced degree of nesting"
Revert "Reduced degree of nesting" This reverts commit 1cd2a953bcbf83e9c47d6a4ef3e3593645316d59. Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/f2a23b8d Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/f2a23b8d Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/f2a23b8d Branch: refs/heads/master Commit: f2a23b8de1934f121c366ec426ce1a76921ac30d Parents: 9bd66f6 Author: Domas PoliakasAuthored: Thu Aug 3 09:02:30 2017 +0100 Committer: Martin Tzvetanov Grigorov Committed: Sun Aug 6 15:27:21 2017 +0300 -- .../wicket/util/tester/BaseWicketTester.java| 172 ++- 1 file changed, 87 insertions(+), 85 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/f2a23b8d/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java index 1fcd084..ce8bc08 100644 --- a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java +++ b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java @@ -297,9 +297,9 @@ public class BaseWicketTester } servletContext = servletCtx != null ? servletCtx - // If it's provided from the container it's not necessary to mock. - : !init && application.getServletContext() != null ? application.getServletContext() - : new MockServletContext(application, null); + // If it's provided from the container it's not necessary to mock. + : !init && application.getServletContext() != null ? application.getServletContext() + : new MockServletContext(application, null); // If using Arquillian and it's configured in a web.xml it'll be provided. If not, mock it. if(application.getWicketFilter() == null) @@ -342,15 +342,15 @@ public class BaseWicketTester // reconfigure application for the test environment application.setPageRendererProvider(new LastPageRecordingPageRendererProvider( - application.getPageRendererProvider())); + application.getPageRendererProvider())); application.setRequestCycleProvider(new TestRequestCycleProvider( - application.getRequestCycleProvider())); + application.getRequestCycleProvider())); // set a feedback message filter that will not remove any messages originalFeedbackMessageCleanupFilter = application.getApplicationSettings() - .getFeedbackMessageCleanupFilter(); + .getFeedbackMessageCleanupFilter(); application.getApplicationSettings().setFeedbackMessageCleanupFilter( - IFeedbackMessageFilter.NONE); + IFeedbackMessageFilter.NONE); IPageManagerProvider pageManagerProvider = newTestPageManagerProvider(); if (pageManagerProvider != null) { @@ -398,7 +398,7 @@ public class BaseWicketTester // assign protocol://host:port to next request unless the last request was ajax final boolean assignBaseLocation = lastRequest != null && - lastRequest.getHeader("Wicket-Ajax") == null; + lastRequest.getHeader("Wicket-Ajax") == null; // resume request processing with scheme://host:port from last request if (assignBaseLocation) @@ -462,7 +462,7 @@ public class BaseWicketTester ServletWebRequest servletWebRequest = newServletWebRequest(); requestCycle = application.createRequestCycle(servletWebRequest, - newServletWebResponse(servletWebRequest)); + newServletWebResponse(servletWebRequest)); ThreadContext.setRequestCycle(requestCycle); if (session == null) @@ -647,7 +647,7 @@ public class BaseWicketTester * @return true, if process was executed successfully */ public boolean processRequest(final MockHttpServletRequest request, - final IRequestHandler forcedRequestHandler) + final IRequestHandler forcedRequestHandler) { return processRequest(request,
[jira] [Resolved] (WICKET-6433) Allow to set the rel attribute with CssHeaderItem
[ https://issues.apache.org/jira/browse/WICKET-6433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Grigorov resolved WICKET-6433. - Resolution: Fixed > Allow to set the rel attribute with CssHeaderItem > - > > Key: WICKET-6433 > URL: https://issues.apache.org/jira/browse/WICKET-6433 > Project: Wicket > Issue Type: Improvement > Components: wicket >Affects Versions: 8.0.0-M6 >Reporter: Tobias Soloschenko >Assignee: Tobias Soloschenko >Priority: Trivial > Labels: improvement > Fix For: 8.0.0-M7 > > > Allow to set the rel attribute with CssHeaderItem: > https://github.com/apache/wicket/pull/226 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (WICKET-6432) SignInPanel causes infinite redirect loop if session id is suppressed in URL
[ https://issues.apache.org/jira/browse/WICKET-6432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16115786#comment-16115786 ] ASF subversion and git services commented on WICKET-6432: - Commit a0d20c9282be25937e4ff8f9c7c171a056ec0ff4 in wicket's branch refs/heads/master from [~svenmeier] [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=a0d20c9 ] WICKET-6432 added factory method for non-model targetChainingModel logs warning now if target is not serializable > SignInPanel causes infinite redirect loop if session id is suppressed in URL > > > Key: WICKET-6432 > URL: https://issues.apache.org/jira/browse/WICKET-6432 > Project: Wicket > Issue Type: Bug > Components: wicket-auth-roles >Affects Versions: 7.8.0 >Reporter: Simon Erhardt >Assignee: Martin Grigorov > Attachments: redirect-loop.zip > > > The attached, very simple quickstart causes an infinite redirection loop. It > consists of a _AuthenticatedPage_, which is annotated by > _@AuthorizeInstantiation_, and a _LoginPage_, using a SingInPanel, which is > set up as home page. > The trouble begins if one opens the HTTP URL after signing in with HTTPS. > It happens only if Jetty is forced to suppress the session id as URL > parameter (see [Jetty 9.2.X > documentation|http://www.eclipse.org/jetty/documentation/9.2.22.v20170531/session-management.html#setting-session-characteristics]): > {code} > WebAppContext bb = new WebAppContext(); > // The following line causes the trouble > > bb.setInitParameter("org.eclipse.jetty.servlet.SessionIdPathParameterName", > "none"); > {code} > Steps to reproduce: > # Start the application in test/java/quickstart/Start > # Open https://localhost:8443 > # Sign in using "user" and "password" > # After redirected to the AuthenticatedPage, open http://localhost:8080 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[8/8] wicket git commit: Merge branch 'pr-226-rel_attribute_for_cssheaderitem'
Merge branch 'pr-226-rel_attribute_for_cssheaderitem' Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/5f2809c7 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/5f2809c7 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/5f2809c7 Branch: refs/heads/master Commit: 5f2809c7ca9049f6fef2cd660614fa79df7575e0 Parents: 5ec319f f4593f7 Author: Martin Tzvetanov GrigorovAuthored: Sun Aug 6 15:05:32 2017 +0300 Committer: Martin Tzvetanov Grigorov Committed: Sun Aug 6 15:05:32 2017 +0300 -- .../wicket/core/util/string/CssUtils.java | 38 -- .../markup/head/CssContentHeaderItem.java | 14 ++-- .../wicket/markup/head/CssHeaderItem.java | 74 ++-- .../markup/head/CssReferenceHeaderItem.java | 56 --- .../markup/head/CssUrlReferenceHeaderItem.java | 55 --- .../wicket/markup/head/MetaDataHeaderItem.java | 8 +++ .../wicket/http2/markup/head/PushItem.java | 12 ++-- .../http2/markup/head/PushItemHeaderValue.java | 12 ++-- .../http2/markup/head/Jetty9PushBuilder.java| 2 +- 9 files changed, 226 insertions(+), 45 deletions(-) --
[5/8] wicket git commit: WICKET-6432 added factory method for non-model targetChainingModel logs warning now if target is not serializable
WICKET-6432 added factory method for non-model targetChainingModel logs warning now if target is not serializable Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/a0d20c92 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/a0d20c92 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/a0d20c92 Branch: refs/heads/master Commit: a0d20c9282be25937e4ff8f9c7c171a056ec0ff4 Parents: 2191159 Author: Sven MeierAuthored: Sun Aug 6 09:24:04 2017 +0200 Committer: Martin Tzvetanov Grigorov Committed: Sun Aug 6 14:59:34 2017 +0300 -- .../java/org/apache/wicket/model/ChainingModel.java | 6 ++ .../apache/wicket/model/CompoundPropertyModel.java | 16 2 files changed, 22 insertions(+) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/a0d20c92/wicket-core/src/main/java/org/apache/wicket/model/ChainingModel.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/model/ChainingModel.java b/wicket-core/src/main/java/org/apache/wicket/model/ChainingModel.java index 8d8df3f..fa0ca7a 100644 --- a/wicket-core/src/main/java/org/apache/wicket/model/ChainingModel.java +++ b/wicket-core/src/main/java/org/apache/wicket/model/ChainingModel.java @@ -16,6 +16,8 @@ */ package org.apache.wicket.model; +import java.io.Serializable; + import org.apache.wicket.Session; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -46,6 +48,10 @@ public class ChainingModel implements IChainingModel + "in models directly as it may lead to serialization problems. " + "If you need to access a property of the session via the model use the " + "page instance as the model object and 'session.attribute' as the path."); + } else if (modelObject instanceof Serializable == false) + { + LOG.warn("It is not a good idea to reference a non-serializable instance " + + "in models directly as it may lead to serialization problems."); } target = modelObject; http://git-wip-us.apache.org/repos/asf/wicket/blob/a0d20c92/wicket-core/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java b/wicket-core/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java index 50bd4a0..6146529 100644 --- a/wicket-core/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java +++ b/wicket-core/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java @@ -16,6 +16,8 @@ */ package org.apache.wicket.model; +import java.io.Serializable; + import org.apache.wicket.Component; /** @@ -155,4 +157,18 @@ public class CompoundPropertyModel extends ChainingModel implements ICompo { return new CompoundPropertyModel<>(model); } + + /** +* Type-infering factory method +* +* @param +* the type of the model's object +* @param object +*model object +* @return {@link CompoundPropertyModel} instance +*/ + public static CompoundPropertyModel of(Z object) + { + return new CompoundPropertyModel<>(object); + } }
[3/8] wicket git commit: Fixes issue of pushing resources - review changes
Fixes issue of pushing resources - review changes Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/ffeb024e Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/ffeb024e Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/ffeb024e Branch: refs/heads/master Commit: ffeb024eac595e19826f5d511555e98f1f823579 Parents: 50edbc4 Author: Tobias SoloschenkoAuthored: Thu Aug 3 12:57:59 2017 +0200 Committer: Martin Tzvetanov Grigorov Committed: Sun Aug 6 14:59:33 2017 +0300 -- .../apache/wicket/http2/markup/head/PushHeaderItem.java | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/ffeb024e/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java -- diff --git a/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java b/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java index 94d55ad..cb7aa44 100644 --- a/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java +++ b/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java @@ -368,21 +368,21 @@ public class PushHeaderItem extends HeaderItem // 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(); + StringBuilder partialUrl = new StringBuilder(); String contextPath = WebApplication.get().getServletContext().getContextPath(); partialUrl.append(contextPath); - if (!contextPath.equals("/")) + if (!"/".equals(contextPath)) { - partialUrl.append("/"); + partialUrl.append('/'); } String filterPath = WebApplication.get().getWicketFilter().getFilterPath(); - if (filterPath.equals("/")) + if ("/".equals(filterPath)) { filterPath = ""; } else if (filterPath.endsWith("/")) { - filterPath = filterPath.replaceAll(".$", ""); + filterPath = filterPath.substring(0, filterPath.length() - 1); } partialUrl.append(filterPath); partialUrl.append(url.toString());
[6/8] wicket git commit: Small code cleaning to BasicResourceReferenceMapper
Small code cleaning to BasicResourceReferenceMapper Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/1408c944 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/1408c944 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/1408c944 Branch: refs/heads/master Commit: 1408c908001be150aa11c45d1f6865f105d0 Parents: ffeb024 Author: Andrea Del BeneAuthored: Sat Aug 5 12:43:43 2017 +0200 Committer: Martin Tzvetanov Grigorov Committed: Sun Aug 6 14:59:34 2017 +0300 -- .../mapper/BasicResourceReferenceMapper.java| 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/1408c944/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/BasicResourceReferenceMapper.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/BasicResourceReferenceMapper.java b/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/BasicResourceReferenceMapper.java index d0f1375..2c533bc 100755 --- a/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/BasicResourceReferenceMapper.java +++ b/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/BasicResourceReferenceMapper.java @@ -204,19 +204,9 @@ public class BasicResourceReferenceMapper extends AbstractResourceReferenceMappe segments.add(getClassName(reference.getScope())); // setup resource parameters - PageParameters parameters = referenceRequestHandler.getPageParameters(); - - if (parameters == null) - { - parameters = new PageParameters(); - } - else - { - parameters = new PageParameters(parameters); - - // need to remove indexed parameters otherwise the URL won't be able to decode - parameters.clearIndexed(); - } + PageParameters parameters = new PageParameters(referenceRequestHandler.getPageParameters()); + // need to remove indexed parameters otherwise the URL won't be able to decode + parameters.clearIndexed(); ResourceUtil.encodeResourceReferenceAttributes(url, reference);
[1/8] wicket git commit: Allow to set the rel attribute with CssHeaderItem
Repository: wicket Updated Branches: refs/heads/master 5ec319ff4 -> 5f2809c7c Allow to set the rel attribute with CssHeaderItem Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/620081b0 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/620081b0 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/620081b0 Branch: refs/heads/master Commit: 620081b0ae4fdcb09a24e75a8c6173485ab9de94 Parents: 2354d9d Author: Tobias SoloschenkoAuthored: Tue Aug 1 07:36:15 2017 +0200 Committer: Tobias Soloschenko Committed: Tue Aug 1 07:37:35 2017 +0200 -- .../wicket/core/util/string/CssUtils.java | 38 -- .../markup/head/CssContentHeaderItem.java | 14 ++-- .../wicket/markup/head/CssHeaderItem.java | 74 ++-- .../markup/head/CssReferenceHeaderItem.java | 56 --- .../markup/head/CssUrlReferenceHeaderItem.java | 55 --- .../wicket/markup/head/MetaDataHeaderItem.java | 8 +++ 6 files changed, 213 insertions(+), 32 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/620081b0/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java b/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java index 78f29af..4013e83 100644 --- a/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java +++ b/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java @@ -85,14 +85,36 @@ public final class CssUtils * Writes a reference to a css file in the response object * * @param response -* the response to write to +*the response to write to * @param url -* the url of the css reference +*the url of the css reference * @param media -* the CSS media +*the CSS media +* @param markupId +*the markupId */ - public static void writeLinkUrl(final Response response, final CharSequence url, final CharSequence media, - final String markupId) + public static void writeLinkUrl(final Response response, final CharSequence url, + final CharSequence media, final String markupId) + { + CssUtils.writeLinkUrl(response, url, media, markupId, null); + } + + /** +* Writes a reference to a css file in the response object +* +* @param response +*the response to write to +* @param url +*the url of the css reference +* @param media +*the CSS media +* @param markupId +*the markupId +* @param rel +*the rel attribute +*/ + public static void writeLinkUrl(final Response response, final CharSequence url, + final CharSequence media, final String markupId, final String rel) { response.write(""); } http://git-wip-us.apache.org/repos/asf/wicket/blob/620081b0/wicket-core/src/main/java/org/apache/wicket/markup/head/CssContentHeaderItem.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/head/CssContentHeaderItem.java b/wicket-core/src/main/java/org/apache/wicket/markup/head/CssContentHeaderItem.java index 0367f8d..dee0a63 100644 --- a/wicket-core/src/main/java/org/apache/wicket/markup/head/CssContentHeaderItem.java +++ b/wicket-core/src/main/java/org/apache/wicket/markup/head/CssContentHeaderItem.java @@ -20,8 +20,8 @@ import java.util.Arrays; import java.util.Collections; import java.util.Objects; -import org.apache.wicket.request.Response; import org.apache.wicket.core.util.string.CssUtils; +import org.apache.wicket.request.Response; import org.apache.wicket.util.string.Strings; /** @@ -31,6 +31,8 @@ import org.apache.wicket.util.string.Strings; */ public class CssContentHeaderItem extends CssHeaderItem { + private static final long serialVersionUID = 1L; + private final CharSequence css; /** @@ -41,6 +43,8 @@ public class CssContentHeaderItem extends CssHeaderItem * @param id *unique id for the style element. This can be null, however in *that case the ajax header contribution can't detect duplicate CSS fragments. +* @param condition +*the condition when the css should be applied */
[2/8] wicket git commit: Fixes issue of pushing resources
Fixes issue of pushing resources Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/50edbc4c Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/50edbc4c Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/50edbc4c Branch: refs/heads/master Commit: 50edbc4c01a8ed0e4e1f2394b9db4156d7332620 Parents: 620081b Author: Tobias SoloschenkoAuthored: Tue Aug 1 07:32:47 2017 +0200 Committer: Martin Tzvetanov Grigorov Committed: Sun Aug 6 14:59:33 2017 +0300 -- .../http2/markup/head/NoopPushBuilder.java | 2 +- .../wicket/http2/markup/head/PushBuilder.java | 6 +- .../http2/markup/head/PushHeaderItem.java | 59 +++--- .../wicket/http2/markup/head/PushItem.java | 117 +-- .../http2/markup/head/PushItemHeaderValue.java | 101 .../http2/markup/head/Jetty9PushBuilder.java| 19 ++- .../wicket-http2/wicket-http2-tomcat/pom.xml| 2 +- .../http2/markup/head/Tomcat85PushBuilder.java | 17 ++- .../http2/markup/head/UndertowPushBuilder.java | 17 ++- .../main/asciidoc/http2push/http2push_1.adoc| 4 +- 10 files changed, 301 insertions(+), 43 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/50edbc4c/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/NoopPushBuilder.java -- diff --git a/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/NoopPushBuilder.java b/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/NoopPushBuilder.java index b9042a2..eb6dd4d 100644 --- a/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/NoopPushBuilder.java +++ b/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/NoopPushBuilder.java @@ -52,7 +52,7 @@ public class NoopPushBuilder implements PushBuilder * */ @Override - public void push(HttpServletRequest httpServletRequest, String... paths) + public void push(HttpServletRequest httpServletRequest, PushItem... pushItems) { LOG.warn( "This PushBuilder does nothing. Please use one of the other implementations - Jetty9 or Tomcat8.5+"); http://git-wip-us.apache.org/repos/asf/wicket/blob/50edbc4c/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushBuilder.java -- diff --git a/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushBuilder.java b/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushBuilder.java index 7f1eccd..c651899 100644 --- a/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushBuilder.java +++ b/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushBuilder.java @@ -28,8 +28,8 @@ public interface PushBuilder * * @param httpServletRequest *the http servlet request to get the push builder from -* @param paths -*the paths of the resources to be pushed +* @param pushItems +*the pushItems of the resources to be pushed */ - void push(HttpServletRequest httpServletRequest, String... paths); + void push(HttpServletRequest httpServletRequest, PushItem... pushItems); } http://git-wip-us.apache.org/repos/asf/wicket/blob/50edbc4c/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java -- diff --git a/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java b/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java index 1660ef7..94d55ad 100644 --- a/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java +++ b/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java @@ -36,6 +36,7 @@ import org.apache.wicket.WicketRuntimeException; import org.apache.wicket.http2.Http2Settings; import org.apache.wicket.markup.head.HeaderItem; import org.apache.wicket.markup.html.WebPage; +import
[7/8] wicket git commit: Library versions are updated
Library versions are updated Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/2191159c Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/2191159c Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/2191159c Branch: refs/heads/master Commit: 2191159c0eb6086656c1d26203821ee0d61aaaee Parents: 1408c94 Author: Maxim SolodovnikAuthored: Sat Aug 5 22:08:45 2017 +0700 Committer: Martin Tzvetanov Grigorov Committed: Sun Aug 6 14:59:34 2017 +0300 -- pom.xml | 24 testing/wicket-arquillian/pom.xml | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/2191159c/pom.xml -- diff --git a/pom.xml b/pom.xml index ec0b726..fdbc63e 100644 --- a/pom.xml +++ b/pom.xml @@ -126,10 +126,10 @@ 3.2.5 0.7.9 - 9.4.5.v20170502 + 9.4.6.v20170531 2.9.9 4.12 - 4.3.8.RELEASE + 4.3.10.RELEASE 3.1.0 2.10.4 2.20 @@ -137,9 +137,9 @@ 1.7.25 2.8.2 2.0.0.0 - 2.5.1 + 2.6 1.8.10 - 3.2.2 + 3.2.3 @@ -147,7 +147,7 @@ com.google.code.findbugs jsr305 - 3.0.1 + 3.0.2 provided @@ -176,7 +176,7 @@ javax.validation validation-api - 1.1.0.Final + 2.0.0.Final provided @@ -224,7 +224,7 @@ com.fasterxml.jackson.core jackson-databind - 2.8.8 + 2.9.0 true @@ -235,7 +235,7 @@ commons-fileupload commons-fileupload - 1.3.2 + 1.3.3 commons-io @@ -266,7 +266,7 @@ org.apache.commons commons-lang3 - 3.5 + 3.6 org.apache.velocity @@ -428,13 +428,13 @@ org.danekja jdk-serializable-functional - 1.8.2 + 1.8.3 jar com.github.openjson openjson - 1.0.7 + 1.0.8 jar @@ -538,7 +538,7 @@ org.hibernate hibernate-validator - 5.3.4.Final + 6.0.1.Final test http://git-wip-us.apache.org/repos/asf/wicket/blob/2191159c/testing/wicket-arquillian/pom.xml -- diff --git a/testing/wicket-arquillian/pom.xml b/testing/wicket-arquillian/pom.xml index 73d148d..94613da 100644 --- a/testing/wicket-arquillian/pom.xml +++ b/testing/wicket-arquillian/pom.xml @@ -42,12 +42,12 @@ 11091 - 1.1.12.Final + 1.1.13.Final 2.10 UTF-8 8.2.1.Final 1.0.2.Final - 1.0.3.Final + 1.1.0.Final
[4/8] wicket git commit: Clean up Clirr configurations.
Clean up Clirr configurations. For some reason wicket-cdi 7.x was compared against Wicket 6.1.0 (cherry picked from commit a89f2a7b7d4e915c86c2622cbf16f879fa7085da) Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/f4593f71 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/f4593f71 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/f4593f71 Branch: refs/heads/master Commit: f4593f71204ff5940302f6ded4beb1d25c2ddff6 Parents: a0d20c9 Author: Martin Tzvetanov GrigorovAuthored: Sun Aug 6 14:00:48 2017 +0300 Committer: Martin Tzvetanov Grigorov Committed: Sun Aug 6 14:59:34 2017 +0300 -- wicket-cdi/pom.xml | 29 - wicket-devutils/pom.xml | 13 - wicket-experimental/pom.xml | 17 - 3 files changed, 4 insertions(+), 55 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/f4593f71/wicket-cdi/pom.xml -- diff --git a/wicket-cdi/pom.xml b/wicket-cdi/pom.xml index 21d4112..ffb927d 100644 --- a/wicket-cdi/pom.xml +++ b/wicket-cdi/pom.xml @@ -61,33 +61,4 @@ junit - - - - - org.codehaus.mojo - clirr-maven-plugin - - - clirr-check - compile - - check - - - 6.1.0 - true - true - - - - - 6.1.0 - true - true - - - - - http://git-wip-us.apache.org/repos/asf/wicket/blob/f4593f71/wicket-devutils/pom.xml -- diff --git a/wicket-devutils/pom.xml b/wicket-devutils/pom.xml index b5bee39..b21d499 100644 --- a/wicket-devutils/pom.xml +++ b/wicket-devutils/pom.xml @@ -41,17 +41,4 @@ wicket-extensions - - - - - org.codehaus.mojo - clirr-maven-plugin - - true - - - - - http://git-wip-us.apache.org/repos/asf/wicket/blob/f4593f71/wicket-experimental/pom.xml -- diff --git a/wicket-experimental/pom.xml b/wicket-experimental/pom.xml index 1c9c529..ff4012a 100644 --- a/wicket-experimental/pom.xml +++ b/wicket-experimental/pom.xml @@ -32,17 +32,8 @@ wicket-http2 wicket-metrics - - - - - org.codehaus.mojo - clirr-maven-plugin - - true - - - - - + + + true +
[jira] [Commented] (WICKET-6432) SignInPanel causes infinite redirect loop if session id is suppressed in URL
[ https://issues.apache.org/jira/browse/WICKET-6432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16115784#comment-16115784 ] ASF subversion and git services commented on WICKET-6432: - Commit 2472fa08f39ec4607e6d69ca3677a3dded368e12 in wicket's branch refs/heads/master from [~svenmeier] [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=2472fa0 ] WICKET-6432 added factory method for non-model targetChainingModel logs warning now if target is not serializable > SignInPanel causes infinite redirect loop if session id is suppressed in URL > > > Key: WICKET-6432 > URL: https://issues.apache.org/jira/browse/WICKET-6432 > Project: Wicket > Issue Type: Bug > Components: wicket-auth-roles >Affects Versions: 7.8.0 >Reporter: Simon Erhardt >Assignee: Martin Grigorov > Attachments: redirect-loop.zip > > > The attached, very simple quickstart causes an infinite redirection loop. It > consists of a _AuthenticatedPage_, which is annotated by > _@AuthorizeInstantiation_, and a _LoginPage_, using a SingInPanel, which is > set up as home page. > The trouble begins if one opens the HTTP URL after signing in with HTTPS. > It happens only if Jetty is forced to suppress the session id as URL > parameter (see [Jetty 9.2.X > documentation|http://www.eclipse.org/jetty/documentation/9.2.22.v20170531/session-management.html#setting-session-characteristics]): > {code} > WebAppContext bb = new WebAppContext(); > // The following line causes the trouble > > bb.setInitParameter("org.eclipse.jetty.servlet.SessionIdPathParameterName", > "none"); > {code} > Steps to reproduce: > # Start the application in test/java/quickstart/Start > # Open https://localhost:8443 > # Sign in using "user" and "password" > # After redirected to the AuthenticatedPage, open http://localhost:8080 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[4/7] wicket git commit: Clean up Clirr configurations.
Clean up Clirr configurations. For some reason wicket-cdi 7.x was compared against Wicket 6.1.0 (cherry picked from commit a89f2a7b7d4e915c86c2622cbf16f879fa7085da) Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/8353b35c Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/8353b35c Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/8353b35c Branch: refs/heads/master Commit: 8353b35c37ec0d4a4ab25a5a5c7b6c273d026b43 Parents: 2472fa0 Author: Martin Tzvetanov GrigorovAuthored: Sun Aug 6 14:00:48 2017 +0300 Committer: Martin Tzvetanov Grigorov Committed: Sun Aug 6 14:53:00 2017 +0300 -- wicket-cdi/pom.xml | 29 - wicket-devutils/pom.xml | 13 - wicket-experimental/pom.xml | 17 - 3 files changed, 4 insertions(+), 55 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/8353b35c/wicket-cdi/pom.xml -- diff --git a/wicket-cdi/pom.xml b/wicket-cdi/pom.xml index 21d4112..ffb927d 100644 --- a/wicket-cdi/pom.xml +++ b/wicket-cdi/pom.xml @@ -61,33 +61,4 @@ junit - - - - - org.codehaus.mojo - clirr-maven-plugin - - - clirr-check - compile - - check - - - 6.1.0 - true - true - - - - - 6.1.0 - true - true - - - - - http://git-wip-us.apache.org/repos/asf/wicket/blob/8353b35c/wicket-devutils/pom.xml -- diff --git a/wicket-devutils/pom.xml b/wicket-devutils/pom.xml index b5bee39..b21d499 100644 --- a/wicket-devutils/pom.xml +++ b/wicket-devutils/pom.xml @@ -41,17 +41,4 @@ wicket-extensions - - - - - org.codehaus.mojo - clirr-maven-plugin - - true - - - - - http://git-wip-us.apache.org/repos/asf/wicket/blob/8353b35c/wicket-experimental/pom.xml -- diff --git a/wicket-experimental/pom.xml b/wicket-experimental/pom.xml index 1c9c529..ff4012a 100644 --- a/wicket-experimental/pom.xml +++ b/wicket-experimental/pom.xml @@ -32,17 +32,8 @@ wicket-http2 wicket-metrics - - - - - org.codehaus.mojo - clirr-maven-plugin - - true - - - - - + + + true +
[7/7] wicket git commit: Merge branch 'pr-227-push_issue_fix'
Merge branch 'pr-227-push_issue_fix' Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/5ec319ff Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/5ec319ff Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/5ec319ff Branch: refs/heads/master Commit: 5ec319ff46b862204f4c7fe56dc9b298fd495a8d Parents: 549ff63 8353b35 Author: Martin Tzvetanov GrigorovAuthored: Sun Aug 6 14:58:36 2017 +0300 Committer: Martin Tzvetanov Grigorov Committed: Sun Aug 6 14:58:36 2017 +0300 -- pom.xml | 4 +- .../http2/markup/head/NoopPushBuilder.java | 2 +- .../wicket/http2/markup/head/PushBuilder.java | 6 +- .../http2/markup/head/PushHeaderItem.java | 59 +++--- .../wicket/http2/markup/head/PushItem.java | 117 +-- .../http2/markup/head/PushItemHeaderValue.java | 101 .../http2/markup/head/Jetty9PushBuilder.java| 19 ++- .../wicket-http2/wicket-http2-tomcat/pom.xml| 2 +- .../http2/markup/head/Tomcat85PushBuilder.java | 17 ++- .../http2/markup/head/UndertowPushBuilder.java | 17 ++- .../main/asciidoc/http2push/http2push_1.adoc| 4 +- 11 files changed, 303 insertions(+), 45 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/5ec319ff/pom.xml -- diff --cc pom.xml index fdbc63e,fdbc63e..ac0df56 --- a/pom.xml +++ b/pom.xml @@@ -153,7 -153,7 +153,7 @@@ com.google.guava guava -- 22.0 ++ 23.0 javax.el @@@ -754,7 -754,7 +754,7 @@@ org.apache.maven.plugins maven-compiler-plugin -- 3.6.1 ++ 3.6.2 true
[3/7] wicket git commit: WICKET-6432 added factory method for non-model targetChainingModel logs warning now if target is not serializable
WICKET-6432 added factory method for non-model targetChainingModel logs warning now if target is not serializable Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/2472fa08 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/2472fa08 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/2472fa08 Branch: refs/heads/master Commit: 2472fa08f39ec4607e6d69ca3677a3dded368e12 Parents: 1f7b447 Author: Sven MeierAuthored: Sun Aug 6 09:24:04 2017 +0200 Committer: Martin Tzvetanov Grigorov Committed: Sun Aug 6 14:53:00 2017 +0300 -- .../java/org/apache/wicket/model/ChainingModel.java | 6 ++ .../apache/wicket/model/CompoundPropertyModel.java | 16 2 files changed, 22 insertions(+) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/2472fa08/wicket-core/src/main/java/org/apache/wicket/model/ChainingModel.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/model/ChainingModel.java b/wicket-core/src/main/java/org/apache/wicket/model/ChainingModel.java index 8d8df3f..fa0ca7a 100644 --- a/wicket-core/src/main/java/org/apache/wicket/model/ChainingModel.java +++ b/wicket-core/src/main/java/org/apache/wicket/model/ChainingModel.java @@ -16,6 +16,8 @@ */ package org.apache.wicket.model; +import java.io.Serializable; + import org.apache.wicket.Session; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -46,6 +48,10 @@ public class ChainingModel implements IChainingModel + "in models directly as it may lead to serialization problems. " + "If you need to access a property of the session via the model use the " + "page instance as the model object and 'session.attribute' as the path."); + } else if (modelObject instanceof Serializable == false) + { + LOG.warn("It is not a good idea to reference a non-serializable instance " + + "in models directly as it may lead to serialization problems."); } target = modelObject; http://git-wip-us.apache.org/repos/asf/wicket/blob/2472fa08/wicket-core/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java b/wicket-core/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java index 50bd4a0..6146529 100644 --- a/wicket-core/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java +++ b/wicket-core/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java @@ -16,6 +16,8 @@ */ package org.apache.wicket.model; +import java.io.Serializable; + import org.apache.wicket.Component; /** @@ -155,4 +157,18 @@ public class CompoundPropertyModel extends ChainingModel implements ICompo { return new CompoundPropertyModel<>(model); } + + /** +* Type-infering factory method +* +* @param +* the type of the model's object +* @param object +*model object +* @return {@link CompoundPropertyModel} instance +*/ + public static CompoundPropertyModel of(Z object) + { + return new CompoundPropertyModel<>(object); + } }
[6/7] wicket git commit: Library versions are updated
Library versions are updated Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/1f7b447d Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/1f7b447d Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/1f7b447d Branch: refs/heads/master Commit: 1f7b447db3effc2d20352939d10d9fe4b830189f Parents: d062ac5 Author: Maxim SolodovnikAuthored: Sat Aug 5 22:08:45 2017 +0700 Committer: Martin Tzvetanov Grigorov Committed: Sun Aug 6 14:53:00 2017 +0300 -- pom.xml | 24 testing/wicket-arquillian/pom.xml | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/1f7b447d/pom.xml -- diff --git a/pom.xml b/pom.xml index ec0b726..fdbc63e 100644 --- a/pom.xml +++ b/pom.xml @@ -126,10 +126,10 @@ 3.2.5 0.7.9 - 9.4.5.v20170502 + 9.4.6.v20170531 2.9.9 4.12 - 4.3.8.RELEASE + 4.3.10.RELEASE 3.1.0 2.10.4 2.20 @@ -137,9 +137,9 @@ 1.7.25 2.8.2 2.0.0.0 - 2.5.1 + 2.6 1.8.10 - 3.2.2 + 3.2.3 @@ -147,7 +147,7 @@ com.google.code.findbugs jsr305 - 3.0.1 + 3.0.2 provided @@ -176,7 +176,7 @@ javax.validation validation-api - 1.1.0.Final + 2.0.0.Final provided @@ -224,7 +224,7 @@ com.fasterxml.jackson.core jackson-databind - 2.8.8 + 2.9.0 true @@ -235,7 +235,7 @@ commons-fileupload commons-fileupload - 1.3.2 + 1.3.3 commons-io @@ -266,7 +266,7 @@ org.apache.commons commons-lang3 - 3.5 + 3.6 org.apache.velocity @@ -428,13 +428,13 @@ org.danekja jdk-serializable-functional - 1.8.2 + 1.8.3 jar com.github.openjson openjson - 1.0.7 + 1.0.8 jar @@ -538,7 +538,7 @@ org.hibernate hibernate-validator - 5.3.4.Final + 6.0.1.Final test http://git-wip-us.apache.org/repos/asf/wicket/blob/1f7b447d/testing/wicket-arquillian/pom.xml -- diff --git a/testing/wicket-arquillian/pom.xml b/testing/wicket-arquillian/pom.xml index 73d148d..94613da 100644 --- a/testing/wicket-arquillian/pom.xml +++ b/testing/wicket-arquillian/pom.xml @@ -42,12 +42,12 @@ 11091 - 1.1.12.Final + 1.1.13.Final 2.10 UTF-8 8.2.1.Final 1.0.2.Final - 1.0.3.Final + 1.1.0.Final
[1/7] wicket git commit: Fixes issue of pushing resources
Repository: wicket Updated Branches: refs/heads/master 549ff6300 -> 5ec319ff4 Fixes issue of pushing resources Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/87c8f50f Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/87c8f50f Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/87c8f50f Branch: refs/heads/master Commit: 87c8f50f3eee39e89053c0ab6690b8389d2d5714 Parents: 2354d9d Author: Tobias SoloschenkoAuthored: Tue Aug 1 07:32:47 2017 +0200 Committer: Tobias Soloschenko Committed: Tue Aug 1 07:44:52 2017 +0200 -- .../http2/markup/head/NoopPushBuilder.java | 2 +- .../wicket/http2/markup/head/PushBuilder.java | 6 +- .../http2/markup/head/PushHeaderItem.java | 59 +++--- .../wicket/http2/markup/head/PushItem.java | 117 +-- .../http2/markup/head/PushItemHeaderValue.java | 101 .../http2/markup/head/Jetty9PushBuilder.java| 19 ++- .../wicket-http2/wicket-http2-tomcat/pom.xml| 2 +- .../http2/markup/head/Tomcat85PushBuilder.java | 17 ++- .../http2/markup/head/UndertowPushBuilder.java | 17 ++- .../main/asciidoc/http2push/http2push_1.adoc| 4 +- 10 files changed, 301 insertions(+), 43 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/87c8f50f/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/NoopPushBuilder.java -- diff --git a/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/NoopPushBuilder.java b/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/NoopPushBuilder.java index b9042a2..eb6dd4d 100644 --- a/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/NoopPushBuilder.java +++ b/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/NoopPushBuilder.java @@ -52,7 +52,7 @@ public class NoopPushBuilder implements PushBuilder * */ @Override - public void push(HttpServletRequest httpServletRequest, String... paths) + public void push(HttpServletRequest httpServletRequest, PushItem... pushItems) { LOG.warn( "This PushBuilder does nothing. Please use one of the other implementations - Jetty9 or Tomcat8.5+"); http://git-wip-us.apache.org/repos/asf/wicket/blob/87c8f50f/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushBuilder.java -- diff --git a/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushBuilder.java b/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushBuilder.java index 7f1eccd..c651899 100644 --- a/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushBuilder.java +++ b/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushBuilder.java @@ -28,8 +28,8 @@ public interface PushBuilder * * @param httpServletRequest *the http servlet request to get the push builder from -* @param paths -*the paths of the resources to be pushed +* @param pushItems +*the pushItems of the resources to be pushed */ - void push(HttpServletRequest httpServletRequest, String... paths); + void push(HttpServletRequest httpServletRequest, PushItem... pushItems); } http://git-wip-us.apache.org/repos/asf/wicket/blob/87c8f50f/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java -- diff --git a/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java b/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java index 1660ef7..94d55ad 100644 --- a/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java +++ b/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java @@ -36,6 +36,7 @@ import org.apache.wicket.WicketRuntimeException; import org.apache.wicket.http2.Http2Settings; import
[2/7] wicket git commit: Fixes issue of pushing resources - review changes
Fixes issue of pushing resources - review changes Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/b16b075e Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/b16b075e Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/b16b075e Branch: refs/heads/master Commit: b16b075e49d3e72c02628ee6a15d8d993da6a1d1 Parents: 87c8f50 Author: Tobias SoloschenkoAuthored: Thu Aug 3 12:57:59 2017 +0200 Committer: Tobias Soloschenko Committed: Thu Aug 3 12:57:59 2017 +0200 -- .../apache/wicket/http2/markup/head/PushHeaderItem.java | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/b16b075e/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java -- diff --git a/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java b/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java index 94d55ad..cb7aa44 100644 --- a/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java +++ b/wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java @@ -368,21 +368,21 @@ public class PushHeaderItem extends HeaderItem // 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(); + StringBuilder partialUrl = new StringBuilder(); String contextPath = WebApplication.get().getServletContext().getContextPath(); partialUrl.append(contextPath); - if (!contextPath.equals("/")) + if (!"/".equals(contextPath)) { - partialUrl.append("/"); + partialUrl.append('/'); } String filterPath = WebApplication.get().getWicketFilter().getFilterPath(); - if (filterPath.equals("/")) + if ("/".equals(filterPath)) { filterPath = ""; } else if (filterPath.endsWith("/")) { - filterPath = filterPath.replaceAll(".$", ""); + filterPath = filterPath.substring(0, filterPath.length() - 1); } partialUrl.append(filterPath); partialUrl.append(url.toString());
[5/7] wicket git commit: Small code cleaning to BasicResourceReferenceMapper
Small code cleaning to BasicResourceReferenceMapper Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/d062ac55 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/d062ac55 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/d062ac55 Branch: refs/heads/master Commit: d062ac55dd83b0cf4c262295ff504687daaa4c29 Parents: b16b075 Author: Andrea Del BeneAuthored: Sat Aug 5 12:43:43 2017 +0200 Committer: Martin Tzvetanov Grigorov Committed: Sun Aug 6 14:53:00 2017 +0300 -- .../mapper/BasicResourceReferenceMapper.java| 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/d062ac55/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/BasicResourceReferenceMapper.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/BasicResourceReferenceMapper.java b/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/BasicResourceReferenceMapper.java index d0f1375..2c533bc 100755 --- a/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/BasicResourceReferenceMapper.java +++ b/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/BasicResourceReferenceMapper.java @@ -204,19 +204,9 @@ public class BasicResourceReferenceMapper extends AbstractResourceReferenceMappe segments.add(getClassName(reference.getScope())); // setup resource parameters - PageParameters parameters = referenceRequestHandler.getPageParameters(); - - if (parameters == null) - { - parameters = new PageParameters(); - } - else - { - parameters = new PageParameters(parameters); - - // need to remove indexed parameters otherwise the URL won't be able to decode - parameters.clearIndexed(); - } + PageParameters parameters = new PageParameters(referenceRequestHandler.getPageParameters()); + // need to remove indexed parameters otherwise the URL won't be able to decode + parameters.clearIndexed(); ResourceUtil.encodeResourceReferenceAttributes(url, reference);
[jira] [Commented] (WICKET-6432) SignInPanel causes infinite redirect loop if session id is suppressed in URL
[ https://issues.apache.org/jira/browse/WICKET-6432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16115779#comment-16115779 ] ASF subversion and git services commented on WICKET-6432: - Commit e1aa1a1cd3340ce71a0c1dea28a11d1738c73ffa in wicket's branch refs/heads/master from [~svenmeier] [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=e1aa1a1 ] WICKET-6432 added factory method for non-model targetChainingModel logs warning now if target is not serializable > SignInPanel causes infinite redirect loop if session id is suppressed in URL > > > Key: WICKET-6432 > URL: https://issues.apache.org/jira/browse/WICKET-6432 > Project: Wicket > Issue Type: Bug > Components: wicket-auth-roles >Affects Versions: 7.8.0 >Reporter: Simon Erhardt >Assignee: Martin Grigorov > Attachments: redirect-loop.zip > > > The attached, very simple quickstart causes an infinite redirection loop. It > consists of a _AuthenticatedPage_, which is annotated by > _@AuthorizeInstantiation_, and a _LoginPage_, using a SingInPanel, which is > set up as home page. > The trouble begins if one opens the HTTP URL after signing in with HTTPS. > It happens only if Jetty is forced to suppress the session id as URL > parameter (see [Jetty 9.2.X > documentation|http://www.eclipse.org/jetty/documentation/9.2.22.v20170531/session-management.html#setting-session-characteristics]): > {code} > WebAppContext bb = new WebAppContext(); > // The following line causes the trouble > > bb.setInitParameter("org.eclipse.jetty.servlet.SessionIdPathParameterName", > "none"); > {code} > Steps to reproduce: > # Start the application in test/java/quickstart/Start > # Open https://localhost:8443 > # Sign in using "user" and "password" > # After redirected to the AuthenticatedPage, open http://localhost:8080 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (WICKET-6437) Libraries should be updated to most recent versions
[ https://issues.apache.org/jira/browse/WICKET-6437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16115781#comment-16115781 ] ASF GitHub Bot commented on WICKET-6437: Github user asfgit closed the pull request at: https://github.com/apache/wicket/pull/228 > Libraries should be updated to most recent versions > --- > > Key: WICKET-6437 > URL: https://issues.apache.org/jira/browse/WICKET-6437 > Project: Wicket > Issue Type: Improvement > Components: release >Affects Versions: 8.0.0-M6 >Reporter: Maxim Solodovnik >Assignee: Martin Grigorov > > Libraries should be updated to most recent versions -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (WICKET-6437) Libraries should be updated to most recent versions
[ https://issues.apache.org/jira/browse/WICKET-6437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16115780#comment-16115780 ] ASF subversion and git services commented on WICKET-6437: - Commit 549ff6300985eab44dea59a3a6120e78632ebe6c in wicket's branch refs/heads/master from [~mgrigorov] [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=549ff63 ] Merge branch 'pr-228-WICKET-6437' > Libraries should be updated to most recent versions > --- > > Key: WICKET-6437 > URL: https://issues.apache.org/jira/browse/WICKET-6437 > Project: Wicket > Issue Type: Improvement > Components: release >Affects Versions: 8.0.0-M6 >Reporter: Maxim Solodovnik >Assignee: Martin Grigorov > > Libraries should be updated to most recent versions -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Resolved] (WICKET-6437) Libraries should be updated to most recent versions
[ https://issues.apache.org/jira/browse/WICKET-6437?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Grigorov resolved WICKET-6437. - Resolution: Fixed Fix Version/s: 8.0.0-M7 > Libraries should be updated to most recent versions > --- > > Key: WICKET-6437 > URL: https://issues.apache.org/jira/browse/WICKET-6437 > Project: Wicket > Issue Type: Improvement > Components: release >Affects Versions: 8.0.0-M6 >Reporter: Maxim Solodovnik >Assignee: Martin Grigorov > Fix For: 8.0.0-M7 > > > Libraries should be updated to most recent versions -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[2/4] wicket git commit: WICKET-6432 added factory method for non-model targetChainingModel logs warning now if target is not serializable
WICKET-6432 added factory method for non-model targetChainingModel logs warning now if target is not serializable Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/e1aa1a1c Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/e1aa1a1c Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/e1aa1a1c Branch: refs/heads/master Commit: e1aa1a1cd3340ce71a0c1dea28a11d1738c73ffa Parents: dad47df Author: Sven MeierAuthored: Sun Aug 6 09:24:04 2017 +0200 Committer: Martin Tzvetanov Grigorov Committed: Sun Aug 6 14:45:20 2017 +0300 -- .../java/org/apache/wicket/model/ChainingModel.java | 6 ++ .../apache/wicket/model/CompoundPropertyModel.java | 16 2 files changed, 22 insertions(+) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/e1aa1a1c/wicket-core/src/main/java/org/apache/wicket/model/ChainingModel.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/model/ChainingModel.java b/wicket-core/src/main/java/org/apache/wicket/model/ChainingModel.java index 8d8df3f..fa0ca7a 100644 --- a/wicket-core/src/main/java/org/apache/wicket/model/ChainingModel.java +++ b/wicket-core/src/main/java/org/apache/wicket/model/ChainingModel.java @@ -16,6 +16,8 @@ */ package org.apache.wicket.model; +import java.io.Serializable; + import org.apache.wicket.Session; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -46,6 +48,10 @@ public class ChainingModel implements IChainingModel + "in models directly as it may lead to serialization problems. " + "If you need to access a property of the session via the model use the " + "page instance as the model object and 'session.attribute' as the path."); + } else if (modelObject instanceof Serializable == false) + { + LOG.warn("It is not a good idea to reference a non-serializable instance " + + "in models directly as it may lead to serialization problems."); } target = modelObject; http://git-wip-us.apache.org/repos/asf/wicket/blob/e1aa1a1c/wicket-core/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java b/wicket-core/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java index 50bd4a0..6146529 100644 --- a/wicket-core/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java +++ b/wicket-core/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java @@ -16,6 +16,8 @@ */ package org.apache.wicket.model; +import java.io.Serializable; + import org.apache.wicket.Component; /** @@ -155,4 +157,18 @@ public class CompoundPropertyModel extends ChainingModel implements ICompo { return new CompoundPropertyModel<>(model); } + + /** +* Type-infering factory method +* +* @param +* the type of the model's object +* @param object +*model object +* @return {@link CompoundPropertyModel} instance +*/ + public static CompoundPropertyModel of(Z object) + { + return new CompoundPropertyModel<>(object); + } }
[1/4] wicket git commit: Library versions are updated
Repository: wicket Updated Branches: refs/heads/master 4a72c9909 -> 549ff6300 Library versions are updated Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/dad47df0 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/dad47df0 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/dad47df0 Branch: refs/heads/master Commit: dad47df0bde5cb1ab312d719ac9283c52abb7301 Parents: c5f758e Author: Maxim SolodovnikAuthored: Sat Aug 5 22:08:45 2017 +0700 Committer: Maxim Solodovnik Committed: Sat Aug 5 22:08:45 2017 +0700 -- pom.xml | 24 testing/wicket-arquillian/pom.xml | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/dad47df0/pom.xml -- diff --git a/pom.xml b/pom.xml index ec0b726..fdbc63e 100644 --- a/pom.xml +++ b/pom.xml @@ -126,10 +126,10 @@ 3.2.5 0.7.9 - 9.4.5.v20170502 + 9.4.6.v20170531 2.9.9 4.12 - 4.3.8.RELEASE + 4.3.10.RELEASE 3.1.0 2.10.4 2.20 @@ -137,9 +137,9 @@ 1.7.25 2.8.2 2.0.0.0 - 2.5.1 + 2.6 1.8.10 - 3.2.2 + 3.2.3 @@ -147,7 +147,7 @@ com.google.code.findbugs jsr305 - 3.0.1 + 3.0.2 provided @@ -176,7 +176,7 @@ javax.validation validation-api - 1.1.0.Final + 2.0.0.Final provided @@ -224,7 +224,7 @@ com.fasterxml.jackson.core jackson-databind - 2.8.8 + 2.9.0 true @@ -235,7 +235,7 @@ commons-fileupload commons-fileupload - 1.3.2 + 1.3.3 commons-io @@ -266,7 +266,7 @@ org.apache.commons commons-lang3 - 3.5 + 3.6 org.apache.velocity @@ -428,13 +428,13 @@ org.danekja jdk-serializable-functional - 1.8.2 + 1.8.3 jar com.github.openjson openjson - 1.0.7 + 1.0.8 jar @@ -538,7 +538,7 @@ org.hibernate hibernate-validator - 5.3.4.Final + 6.0.1.Final test http://git-wip-us.apache.org/repos/asf/wicket/blob/dad47df0/testing/wicket-arquillian/pom.xml -- diff --git a/testing/wicket-arquillian/pom.xml b/testing/wicket-arquillian/pom.xml index 73d148d..94613da 100644 --- a/testing/wicket-arquillian/pom.xml +++ b/testing/wicket-arquillian/pom.xml @@ -42,12 +42,12 @@ 11091 - 1.1.12.Final + 1.1.13.Final 2.10 UTF-8 8.2.1.Final 1.0.2.Final - 1.0.3.Final + 1.1.0.Final
[4/4] wicket git commit: Merge branch 'pr-228-WICKET-6437'
Merge branch 'pr-228-WICKET-6437' Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/549ff630 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/549ff630 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/549ff630 Branch: refs/heads/master Commit: 549ff6300985eab44dea59a3a6120e78632ebe6c Parents: 4a72c99 180fad1 Author: Martin Tzvetanov GrigorovAuthored: Sun Aug 6 14:51:24 2017 +0300 Committer: Martin Tzvetanov Grigorov Committed: Sun Aug 6 14:51:24 2017 +0300 -- pom.xml | 24 ++-- testing/wicket-arquillian/pom.xml | 4 ++-- .../wicket/model/CompoundPropertyModel.java | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/549ff630/wicket-core/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java -- diff --cc wicket-core/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java index 74bf429,6146529..6f821d8 --- a/wicket-core/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java +++ b/wicket-core/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java @@@ -157,10 -157,10 +157,10 @@@ public class CompoundPropertyModel e { return new CompoundPropertyModel<>(model); } - + /** * Type-infering factory method - * + * * @param * the type of the model's object * @param object
[3/4] wicket git commit: Clean up Clirr configurations.
Clean up Clirr configurations. For some reason wicket-cdi 7.x was compared against Wicket 6.1.0 (cherry picked from commit a89f2a7b7d4e915c86c2622cbf16f879fa7085da) Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/180fad12 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/180fad12 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/180fad12 Branch: refs/heads/master Commit: 180fad12e586d6e75aaa4528f72f3fb089244cc4 Parents: e1aa1a1 Author: Martin Tzvetanov GrigorovAuthored: Sun Aug 6 14:00:48 2017 +0300 Committer: Martin Tzvetanov Grigorov Committed: Sun Aug 6 14:45:20 2017 +0300 -- wicket-cdi/pom.xml | 29 - wicket-devutils/pom.xml | 13 - wicket-experimental/pom.xml | 17 - 3 files changed, 4 insertions(+), 55 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/180fad12/wicket-cdi/pom.xml -- diff --git a/wicket-cdi/pom.xml b/wicket-cdi/pom.xml index 21d4112..ffb927d 100644 --- a/wicket-cdi/pom.xml +++ b/wicket-cdi/pom.xml @@ -61,33 +61,4 @@ junit - - - - - org.codehaus.mojo - clirr-maven-plugin - - - clirr-check - compile - - check - - - 6.1.0 - true - true - - - - - 6.1.0 - true - true - - - - - http://git-wip-us.apache.org/repos/asf/wicket/blob/180fad12/wicket-devutils/pom.xml -- diff --git a/wicket-devutils/pom.xml b/wicket-devutils/pom.xml index b5bee39..b21d499 100644 --- a/wicket-devutils/pom.xml +++ b/wicket-devutils/pom.xml @@ -41,17 +41,4 @@ wicket-extensions - - - - - org.codehaus.mojo - clirr-maven-plugin - - true - - - - - http://git-wip-us.apache.org/repos/asf/wicket/blob/180fad12/wicket-experimental/pom.xml -- diff --git a/wicket-experimental/pom.xml b/wicket-experimental/pom.xml index 1c9c529..ff4012a 100644 --- a/wicket-experimental/pom.xml +++ b/wicket-experimental/pom.xml @@ -32,17 +32,8 @@ wicket-http2 wicket-metrics - - - - - org.codehaus.mojo - clirr-maven-plugin - - true - - - - - + + + true +
[jira] [Commented] (WICKET-6438) 8.x reference guide needs a few minor improvements
[ https://issues.apache.org/jira/browse/WICKET-6438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16115778#comment-16115778 ] ASF GitHub Bot commented on WICKET-6438: Github user martin-g commented on a diff in the pull request: https://github.com/apache/wicket/pull/229#discussion_r131541043 --- Diff: wicket-user-guide/src/main/asciidoc/introduction.adoc --- @@ -27,8 +26,7 @@ Editors: *Joachim Rohde* -*PS*: this guide is based on Wicket 6. However if you are using an older version you should find this guide useful as well, but it's likely that the code and the snippets won't work with your version. - +*PS*: this guide is based on Wicket 6. However if you are using an older version you should find this guide useful as well, but it's likely that the code and the snippets won't work with your version. + --- End diff -- Note to the one merging this PR: It should be `Wicket 8` instead of `6` > 8.x reference guide needs a few minor improvements > -- > > Key: WICKET-6438 > URL: https://issues.apache.org/jira/browse/WICKET-6438 > Project: Wicket > Issue Type: Improvement > Components: guide >Affects Versions: 8.0.0 >Reporter: Ahmet Yaşar Özer >Assignee: Andrea Del Bene >Priority: Minor > Labels: documentation > > Minor fix in helloWorld.adoc: Removed irrelevant line to avoid warning during > maven packaging phase: > WARNING: image to embed not found or not readable: > F:/wicket/wicket-user-guide/src/main/asciidoc/images/uml-component.svg > Minor fix in contributing.adoc: Revised the generated document target > directory for the user guide documentation. > Cropped top and bottom blank parts in comsysto-logo.png to have the > Introduction page fit in one page in PDF. Made minor changes in > helloWorld_2.adoc, helloWorld_3.adoc and introduction.adoc. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Assigned] (WICKET-6437) Libraries should be updated to most recent versions
[ https://issues.apache.org/jira/browse/WICKET-6437?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Grigorov reassigned WICKET-6437: --- Assignee: Martin Grigorov > Libraries should be updated to most recent versions > --- > > Key: WICKET-6437 > URL: https://issues.apache.org/jira/browse/WICKET-6437 > Project: Wicket > Issue Type: Improvement > Components: release >Affects Versions: 8.0.0-M6 >Reporter: Maxim Solodovnik >Assignee: Martin Grigorov > > Libraries should be updated to most recent versions -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (WICKET-6432) SignInPanel causes infinite redirect loop if session id is suppressed in URL
[ https://issues.apache.org/jira/browse/WICKET-6432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16115776#comment-16115776 ] Martin Grigorov commented on WICKET-6432: - http works fine but I am not able to load the page with https neither in Chrome 59.0.3071.115, nor in Firefox 54.0 > SignInPanel causes infinite redirect loop if session id is suppressed in URL > > > Key: WICKET-6432 > URL: https://issues.apache.org/jira/browse/WICKET-6432 > Project: Wicket > Issue Type: Bug > Components: wicket-auth-roles >Affects Versions: 7.8.0 >Reporter: Simon Erhardt >Assignee: Martin Grigorov > Attachments: redirect-loop.zip > > > The attached, very simple quickstart causes an infinite redirection loop. It > consists of a _AuthenticatedPage_, which is annotated by > _@AuthorizeInstantiation_, and a _LoginPage_, using a SingInPanel, which is > set up as home page. > The trouble begins if one opens the HTTP URL after signing in with HTTPS. > It happens only if Jetty is forced to suppress the session id as URL > parameter (see [Jetty 9.2.X > documentation|http://www.eclipse.org/jetty/documentation/9.2.22.v20170531/session-management.html#setting-session-characteristics]): > {code} > WebAppContext bb = new WebAppContext(); > // The following line causes the trouble > > bb.setInitParameter("org.eclipse.jetty.servlet.SessionIdPathParameterName", > "none"); > {code} > Steps to reproduce: > # Start the application in test/java/quickstart/Start > # Open https://localhost:8443 > # Sign in using "user" and "password" > # After redirected to the AuthenticatedPage, open http://localhost:8080 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (WICKET-6432) SignInPanel causes infinite redirect loop if session id is suppressed in URL
[ https://issues.apache.org/jira/browse/WICKET-6432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16115771#comment-16115771 ] Martin Grigorov commented on WICKET-6432: - For some reason I am not able to open the HTTPS page at all. The console says: GET https://localhost:8443/ net::ERR_EMPTY_RESPONSE > SignInPanel causes infinite redirect loop if session id is suppressed in URL > > > Key: WICKET-6432 > URL: https://issues.apache.org/jira/browse/WICKET-6432 > Project: Wicket > Issue Type: Bug > Components: wicket-auth-roles >Affects Versions: 7.8.0 >Reporter: Simon Erhardt >Assignee: Martin Grigorov > Attachments: redirect-loop.zip > > > The attached, very simple quickstart causes an infinite redirection loop. It > consists of a _AuthenticatedPage_, which is annotated by > _@AuthorizeInstantiation_, and a _LoginPage_, using a SingInPanel, which is > set up as home page. > The trouble begins if one opens the HTTP URL after signing in with HTTPS. > It happens only if Jetty is forced to suppress the session id as URL > parameter (see [Jetty 9.2.X > documentation|http://www.eclipse.org/jetty/documentation/9.2.22.v20170531/session-management.html#setting-session-characteristics]): > {code} > WebAppContext bb = new WebAppContext(); > // The following line causes the trouble > > bb.setInitParameter("org.eclipse.jetty.servlet.SessionIdPathParameterName", > "none"); > {code} > Steps to reproduce: > # Start the application in test/java/quickstart/Start > # Open https://localhost:8443 > # Sign in using "user" and "password" > # After redirected to the AuthenticatedPage, open http://localhost:8080 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
wicket git commit: Clean up Clirr configurations.
Repository: wicket Updated Branches: refs/heads/master f9a9bf9c3 -> 4a72c9909 Clean up Clirr configurations. For some reason wicket-cdi 7.x was compared against Wicket 6.1.0 (cherry picked from commit a89f2a7b7d4e915c86c2622cbf16f879fa7085da) Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/4a72c990 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/4a72c990 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/4a72c990 Branch: refs/heads/master Commit: 4a72c990902bb4853e0aa9438564a742358da0ad Parents: f9a9bf9 Author: Martin Tzvetanov GrigorovAuthored: Sun Aug 6 14:00:48 2017 +0300 Committer: Martin Tzvetanov Grigorov Committed: Sun Aug 6 14:10:14 2017 +0300 -- wicket-cdi/pom.xml | 29 - wicket-devutils/pom.xml | 13 - wicket-experimental/pom.xml | 17 - 3 files changed, 4 insertions(+), 55 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/4a72c990/wicket-cdi/pom.xml -- diff --git a/wicket-cdi/pom.xml b/wicket-cdi/pom.xml index 21d4112..ffb927d 100644 --- a/wicket-cdi/pom.xml +++ b/wicket-cdi/pom.xml @@ -61,33 +61,4 @@ junit - - - - - org.codehaus.mojo - clirr-maven-plugin - - - clirr-check - compile - - check - - - 6.1.0 - true - true - - - - - 6.1.0 - true - true - - - - - http://git-wip-us.apache.org/repos/asf/wicket/blob/4a72c990/wicket-devutils/pom.xml -- diff --git a/wicket-devutils/pom.xml b/wicket-devutils/pom.xml index b5bee39..b21d499 100644 --- a/wicket-devutils/pom.xml +++ b/wicket-devutils/pom.xml @@ -41,17 +41,4 @@ wicket-extensions - - - - - org.codehaus.mojo - clirr-maven-plugin - - true - - - - - http://git-wip-us.apache.org/repos/asf/wicket/blob/4a72c990/wicket-experimental/pom.xml -- diff --git a/wicket-experimental/pom.xml b/wicket-experimental/pom.xml index 1c9c529..ff4012a 100644 --- a/wicket-experimental/pom.xml +++ b/wicket-experimental/pom.xml @@ -32,17 +32,8 @@ wicket-http2 wicket-metrics - - - - - org.codehaus.mojo - clirr-maven-plugin - - true - - - - - + + + true +
wicket git commit: Clean up Clirr configurations.
Repository: wicket Updated Branches: refs/heads/wicket-7.x 8b07dc754 -> a89f2a7b7 Clean up Clirr configurations. For some reason wicket-cdi 7.x was compared against Wicket 6.1.0 Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/a89f2a7b Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/a89f2a7b Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/a89f2a7b Branch: refs/heads/wicket-7.x Commit: a89f2a7b7d4e915c86c2622cbf16f879fa7085da Parents: 8b07dc7 Author: Martin Tzvetanov GrigorovAuthored: Sun Aug 6 14:00:48 2017 +0300 Committer: Martin Tzvetanov Grigorov Committed: Sun Aug 6 14:00:48 2017 +0300 -- wicket-cdi/pom.xml | 29 - wicket-devutils/pom.xml | 13 - wicket-experimental/pom.xml | 17 - 3 files changed, 4 insertions(+), 55 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/a89f2a7b/wicket-cdi/pom.xml -- diff --git a/wicket-cdi/pom.xml b/wicket-cdi/pom.xml index ec8df65..c1ced90 100644 --- a/wicket-cdi/pom.xml +++ b/wicket-cdi/pom.xml @@ -61,33 +61,4 @@ junit - - - - - org.codehaus.mojo - clirr-maven-plugin - - - clirr-check - compile - - check - - - 6.1.0 - true - true - - - - - 6.1.0 - true - true - - - - - http://git-wip-us.apache.org/repos/asf/wicket/blob/a89f2a7b/wicket-devutils/pom.xml -- diff --git a/wicket-devutils/pom.xml b/wicket-devutils/pom.xml index 45b879d..1cab720 100644 --- a/wicket-devutils/pom.xml +++ b/wicket-devutils/pom.xml @@ -41,17 +41,4 @@ wicket-extensions - - - - - org.codehaus.mojo - clirr-maven-plugin - - true - - - - - http://git-wip-us.apache.org/repos/asf/wicket/blob/a89f2a7b/wicket-experimental/pom.xml -- diff --git a/wicket-experimental/pom.xml b/wicket-experimental/pom.xml index 2df70cb..a1e11bb 100644 --- a/wicket-experimental/pom.xml +++ b/wicket-experimental/pom.xml @@ -32,17 +32,8 @@ wicket-atmosphere wicket-metrics - - - - - org.codehaus.mojo - clirr-maven-plugin - - true - - - - - + + + true +
[jira] [Assigned] (WICKET-6432) SignInPanel causes infinite redirect loop if session id is suppressed in URL
[ https://issues.apache.org/jira/browse/WICKET-6432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Grigorov reassigned WICKET-6432: --- Assignee: Martin Grigorov > SignInPanel causes infinite redirect loop if session id is suppressed in URL > > > Key: WICKET-6432 > URL: https://issues.apache.org/jira/browse/WICKET-6432 > Project: Wicket > Issue Type: Bug > Components: wicket-auth-roles >Affects Versions: 7.8.0 >Reporter: Simon Erhardt >Assignee: Martin Grigorov > Attachments: redirect-loop.zip > > > The attached, very simple quickstart causes an infinite redirection loop. It > consists of a _AuthenticatedPage_, which is annotated by > _@AuthorizeInstantiation_, and a _LoginPage_, using a SingInPanel, which is > set up as home page. > The trouble begins if one opens the HTTP URL after signing in with HTTPS. > It happens only if Jetty is forced to suppress the session id as URL > parameter (see [Jetty 9.2.X > documentation|http://www.eclipse.org/jetty/documentation/9.2.22.v20170531/session-management.html#setting-session-characteristics]): > {code} > WebAppContext bb = new WebAppContext(); > // The following line causes the trouble > > bb.setInitParameter("org.eclipse.jetty.servlet.SessionIdPathParameterName", > "none"); > {code} > Steps to reproduce: > # Start the application in test/java/quickstart/Start > # Open https://localhost:8443 > # Sign in using "user" and "password" > # After redirected to the AuthenticatedPage, open http://localhost:8080 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (WICKET-6432) SignInPanel causes infinite redirect loop if session id is suppressed in URL
[ https://issues.apache.org/jira/browse/WICKET-6432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16115757#comment-16115757 ] Martin Grigorov commented on WICKET-6432: - The commit above references this ticket by mistake. It was about WICKET-6436. > SignInPanel causes infinite redirect loop if session id is suppressed in URL > > > Key: WICKET-6432 > URL: https://issues.apache.org/jira/browse/WICKET-6432 > Project: Wicket > Issue Type: Bug > Components: wicket-auth-roles >Affects Versions: 7.8.0 >Reporter: Simon Erhardt > Attachments: redirect-loop.zip > > > The attached, very simple quickstart causes an infinite redirection loop. It > consists of a _AuthenticatedPage_, which is annotated by > _@AuthorizeInstantiation_, and a _LoginPage_, using a SingInPanel, which is > set up as home page. > The trouble begins if one opens the HTTP URL after signing in with HTTPS. > It happens only if Jetty is forced to suppress the session id as URL > parameter (see [Jetty 9.2.X > documentation|http://www.eclipse.org/jetty/documentation/9.2.22.v20170531/session-management.html#setting-session-characteristics]): > {code} > WebAppContext bb = new WebAppContext(); > // The following line causes the trouble > > bb.setInitParameter("org.eclipse.jetty.servlet.SessionIdPathParameterName", > "none"); > {code} > Steps to reproduce: > # Start the application in test/java/quickstart/Start > # Open https://localhost:8443 > # Sign in using "user" and "password" > # After redirected to the AuthenticatedPage, open http://localhost:8080 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Resolved] (WICKET-6436) Please add CompoundPropertyModel.of(T object) method
[ https://issues.apache.org/jira/browse/WICKET-6436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sven Meier resolved WICKET-6436. Resolution: Fixed Assignee: Sven Meier Fix Version/s: 8.0.0-M7 I've added a factory method as proposed. ChainingModel logs a warning now, if the target object isn't serializable. > Please add CompoundPropertyModel.of(T object) method > > > Key: WICKET-6436 > URL: https://issues.apache.org/jira/browse/WICKET-6436 > Project: Wicket > Issue Type: Improvement > Components: wicket >Affects Versions: 8.0.0-M6 >Reporter: Kamil >Assignee: Sven Meier >Priority: Minor > Fix For: 8.0.0-M7 > > > org.apache.wicket.model.Model has very convenient method: > {code} > public static Model of(T object) > {code} > Could you please add simmilar method : > {code} > public static CompoundPropertyModel of(final T > object) { > return new CompoundPropertyModel<>(object); > } > {code} > to org.apache.wicket.model.CompoundPropertyModel ? > By the way CompoundPropertyModel has already > {code} > public static CompoundPropertyModel of(IModel model) > { > return new CompoundPropertyModel<>(model); > } > {code} > method, where Z is not Serializable. Is this ok? -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (WICKET-6436) Please add CompoundPropertyModel.of(T object) method
[ https://issues.apache.org/jira/browse/WICKET-6436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16115682#comment-16115682 ] Sven Meier commented on WICKET-6436: The factory method for IModel is correct, it's the model's duty to handle serialization of its model object (e.g. by nullifying its reference on detach). > Please add CompoundPropertyModel.of(T object) method > > > Key: WICKET-6436 > URL: https://issues.apache.org/jira/browse/WICKET-6436 > Project: Wicket > Issue Type: Improvement > Components: wicket >Affects Versions: 8.0.0-M6 >Reporter: Kamil >Priority: Minor > > org.apache.wicket.model.Model has very convenient method: > {code} > public static Model of(T object) > {code} > Could you please add simmilar method : > {code} > public static CompoundPropertyModel of(final T > object) { > return new CompoundPropertyModel<>(object); > } > {code} > to org.apache.wicket.model.CompoundPropertyModel ? > By the way CompoundPropertyModel has already > {code} > public static CompoundPropertyModel of(IModel model) > { > return new CompoundPropertyModel<>(model); > } > {code} > method, where Z is not Serializable. Is this ok? -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (WICKET-6432) SignInPanel causes infinite redirect loop if session id is suppressed in URL
[ https://issues.apache.org/jira/browse/WICKET-6432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16115681#comment-16115681 ] ASF subversion and git services commented on WICKET-6432: - Commit f9a9bf9c3fb0b1390b6600d027bb64ae7e4f3c03 in wicket's branch refs/heads/master from [~svenmeier] [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=f9a9bf9 ] WICKET-6432 added factory method for non-model targetChainingModel logs warning now if target is not serializable > SignInPanel causes infinite redirect loop if session id is suppressed in URL > > > Key: WICKET-6432 > URL: https://issues.apache.org/jira/browse/WICKET-6432 > Project: Wicket > Issue Type: Bug > Components: wicket-auth-roles >Affects Versions: 7.8.0 >Reporter: Simon Erhardt > Attachments: redirect-loop.zip > > > The attached, very simple quickstart causes an infinite redirection loop. It > consists of a _AuthenticatedPage_, which is annotated by > _@AuthorizeInstantiation_, and a _LoginPage_, using a SingInPanel, which is > set up as home page. > The trouble begins if one opens the HTTP URL after signing in with HTTPS. > It happens only if Jetty is forced to suppress the session id as URL > parameter (see [Jetty 9.2.X > documentation|http://www.eclipse.org/jetty/documentation/9.2.22.v20170531/session-management.html#setting-session-characteristics]): > {code} > WebAppContext bb = new WebAppContext(); > // The following line causes the trouble > > bb.setInitParameter("org.eclipse.jetty.servlet.SessionIdPathParameterName", > "none"); > {code} > Steps to reproduce: > # Start the application in test/java/quickstart/Start > # Open https://localhost:8443 > # Sign in using "user" and "password" > # After redirected to the AuthenticatedPage, open http://localhost:8080 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
wicket git commit: WICKET-6432 added factory method for non-model targetChainingModel logs warning now if target is not serializable
Repository: wicket Updated Branches: refs/heads/master c5f758e4a -> f9a9bf9c3 WICKET-6432 added factory method for non-model targetChainingModel logs warning now if target is not serializable Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/f9a9bf9c Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/f9a9bf9c Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/f9a9bf9c Branch: refs/heads/master Commit: f9a9bf9c3fb0b1390b6600d027bb64ae7e4f3c03 Parents: c5f758e Author: Sven MeierAuthored: Sun Aug 6 09:24:04 2017 +0200 Committer: Sven Meier Committed: Sun Aug 6 09:24:39 2017 +0200 -- .../java/org/apache/wicket/model/ChainingModel.java | 6 ++ .../apache/wicket/model/CompoundPropertyModel.java | 16 2 files changed, 22 insertions(+) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/f9a9bf9c/wicket-core/src/main/java/org/apache/wicket/model/ChainingModel.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/model/ChainingModel.java b/wicket-core/src/main/java/org/apache/wicket/model/ChainingModel.java index 8d8df3f..fa0ca7a 100644 --- a/wicket-core/src/main/java/org/apache/wicket/model/ChainingModel.java +++ b/wicket-core/src/main/java/org/apache/wicket/model/ChainingModel.java @@ -16,6 +16,8 @@ */ package org.apache.wicket.model; +import java.io.Serializable; + import org.apache.wicket.Session; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -46,6 +48,10 @@ public class ChainingModel implements IChainingModel + "in models directly as it may lead to serialization problems. " + "If you need to access a property of the session via the model use the " + "page instance as the model object and 'session.attribute' as the path."); + } else if (modelObject instanceof Serializable == false) + { + LOG.warn("It is not a good idea to reference a non-serializable instance " + + "in models directly as it may lead to serialization problems."); } target = modelObject; http://git-wip-us.apache.org/repos/asf/wicket/blob/f9a9bf9c/wicket-core/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java b/wicket-core/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java index 50bd4a0..74bf429 100644 --- a/wicket-core/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java +++ b/wicket-core/src/main/java/org/apache/wicket/model/CompoundPropertyModel.java @@ -16,6 +16,8 @@ */ package org.apache.wicket.model; +import java.io.Serializable; + import org.apache.wicket.Component; /** @@ -155,4 +157,18 @@ public class CompoundPropertyModel extends ChainingModel implements ICompo { return new CompoundPropertyModel<>(model); } + + /** +* Type-infering factory method +* +* @param +* the type of the model's object +* @param object +*model object +* @return {@link CompoundPropertyModel} instance +*/ + public static CompoundPropertyModel of(Z object) + { + return new CompoundPropertyModel<>(object); + } }