Re: user activity disabled during page load
Thanks, but it is not the confirmation dialog itself that is the problem, it is the fact that the browser tries to leave the page. If I disable the confirmation dialog, all that will happen is that the user is thrown off the page without any confirmation. That is not what is intended. I have not called setResponsePage. All that I have done is overriden the CloseButtonCallback, and that somehow causes a page switch (with a confirmation dialog), which it -- in my humbe opinion -- should not. That is, I am not just getting this annoying confirmation dialog. The user is also thrown out (login page appears) if leave page is chosen. That is the main problem. The confirmation dialog is secondary to that. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/user-activity-disabled-during-page-load-tp4662891p4662908.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: user activity disabled during page load
Hi, Do you use *Ajax* button to submit the form ? If you use normal (non-Ajax) submit button then you will leave the page. On Wed, Dec 11, 2013 at 10:12 AM, J.K. Baltzersen jornb...@pvv.org wrote: Thanks, but it is not the confirmation dialog itself that is the problem, it is the fact that the browser tries to leave the page. If I disable the confirmation dialog, all that will happen is that the user is thrown off the page without any confirmation. That is not what is intended. I have not called setResponsePage. All that I have done is overriden the CloseButtonCallback, and that somehow causes a page switch (with a confirmation dialog), which it -- in my humbe opinion -- should not. That is, I am not just getting this annoying confirmation dialog. The user is also thrown out (login page appears) if leave page is chosen. That is the main problem. The confirmation dialog is secondary to that. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/user-activity-disabled-during-page-load-tp4662891p4662908.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: user activity disabled during page load
I am not submitting a form. There is no submit button. I am invoking the modal window upon wait for load of the page to complete (non-Ajax). However, the setCloseButtonCallback includes an onCloseButtonClicked defined and declared with an AjaxRequestTarget parameter. If I remove the overridden callback, I don't have that problem, but then the user may close the window at will and hence be able to do edit before the page is completely loaded, which undermines the purpose of the dialog box. Martin Grigorov-4 wrote Hi, Do you use *Ajax* button to submit the form ? If you use normal (non-Ajax) submit button then you will leave the page. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/user-activity-disabled-during-page-load-tp4662891p4662910.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: user activity disabled during page load
https://github.com/apache/wicket/blob/master/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.java?source=c#L91 does something similar. It uses alert() additionally. You can test it at http://www.wicket-library.com/wicket-examples-6.0.x/ajax/modal-window?0 (Show dialog with a page, the inner modal). I'm not sure why it tries to leave the page in your case. You can also hide the x button with CSS rule, so your user won't be able to click it. On Wed, Dec 11, 2013 at 10:56 AM, J.K. Baltzersen jornb...@pvv.org wrote: I am not submitting a form. There is no submit button. I am invoking the modal window upon wait for load of the page to complete (non-Ajax). However, the setCloseButtonCallback includes an onCloseButtonClicked defined and declared with an AjaxRequestTarget parameter. If I remove the overridden callback, I don't have that problem, but then the user may close the window at will and hence be able to do edit before the page is completely loaded, which undermines the purpose of the dialog box. Martin Grigorov-4 wrote Hi, Do you use *Ajax* button to submit the form ? If you use normal (non-Ajax) submit button then you will leave the page. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/user-activity-disabled-during-page-load-tp4662891p4662910.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: user activity disabled during page load
Thanks. I have the same concept with a different text in the alert. As I cannot resolve why the page is being abandoned, I think the better approach is, as you suggest, to make the close (x) button unavailable to the user. I've had a look in this forum and elsewhere for specific solutions for that. Any concrete examples of implementations? Martin Grigorov-4 wrote I'm not sure why it tries to leave the page in your case. You can also hide the x button with CSS rule, so your user won't be able to click it. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/user-activity-disabled-during-page-load-tp4662891p4662912.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: user activity disabled during page load
.wicket-modal .w_close { display: none } You may make this CSS rule even more specific because it will affect all modal windows when it is applied. On Wed, Dec 11, 2013 at 1:29 PM, J.K. Baltzersen jornb...@pvv.org wrote: Thanks. I have the same concept with a different text in the alert. As I cannot resolve why the page is being abandoned, I think the better approach is, as you suggest, to make the close (x) button unavailable to the user. I've had a look in this forum and elsewhere for specific solutions for that. Any concrete examples of implementations? Martin Grigorov-4 wrote I'm not sure why it tries to leave the page in your case. You can also hide the x button with CSS rule, so your user won't be able to click it. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/user-activity-disabled-during-page-load-tp4662891p4662912.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Little issue with tree component
Hi I write this post for sven as a feedback for his excellent tree component from wicket 6. I encounter a problem with the tree component (nothing happens on expand) in the conversion process of NextReports from wicket 1.5 to wicket 6. My problem happened because the NestedTree.updateBranch method compares two model objects (with equals): if (model.equals(branch.getModel())) // line 118 in wicket 6.12.0 My EntityModel (the model returned by ITreeProvider.(Entity object)) hasn't an equals method because I didn't find usefully to implement this method in my (wicket) models. For this reason the above line return false in all scenario; I don't know if it's a better idea to compare the model objects instead models (I see a little performance with model objects comparation - my EntityModel extends extends LoadableDetachableModelEntity) but in the current implementation it's hard to debug what it's wrong with my tree. Obviously, I resolved my problem with a simple equals method added in my EntityModel but take me some time to found what wasn't wrong with my tree. Best regards, Decebal -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Little-issue-with-tree-component-tp4662914.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Converting 1.4.7 to 6.12 - Login Error
So I am past my compile errors and am now running my shiny new 6.12 application. But it breaks down before I can get it off the dealer's lot. :( The problem is that the error is kind of ambiguous. The console says: [12/11/13 14:47:30:437 EST] 0026 servlet I com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0242I: [EquitableSharingEAR] [/EquitableSharing] [FilterProxyServlet]: Initialization successful. [12/11/13 14:47:30:440 EST] 0026 webappE com.ibm.ws.webcontainer.webapp.WebApp reportRecursiveError Error Page Exception The server cannot use the error page specified for your application because of the exception printed below. [12/11/13 14:47:30:442 EST] 0026 webappE com.ibm.ws.webcontainer.webapp.WebApp reportRecursiveError Error Page Exception: So instead of using the error page, or printing the stack trace in the console, the following shows up in the browser. I stepped through in debug and the error happens after our code. So contrary to the claim, it DID find the java. The html is right next to it as usual. No method in our error page is invoked, though I can see that we do set it with the following: IApplicationSettings settings = getApplicationSettings(); settings.setInternalErrorPage(ESPApplicationErrorPage.class); getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE); The error: Original Exception: Error Message: SRVE0190E: File not found: /gov.usdoj.afms.esp.modules.login.LoginPage Error Code: 404 Target Servlet: DefaultExtensionProcessor Error Stack: java.io.FileNotFoundException: /gov.usdoj.afms.esp.modules.login.LoginPage at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:572) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3933) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931) at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604) Error Page Exception: Error Message: SRVE0190E: File not found: /404 Error Code: 404 Target Servlet: DefaultExtensionProcessor Error Stack: java.io.FileNotFoundException: /404 at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:572) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:353) at com.ibm.ws.webcontainer.webapp.WebApp.sendError(WebApp.java:3368) at com.ibm.ws.webcontainer.webapp.WebAppDispatcherContext.sendError(WebAppDispatcherContext.java:634) at com.ibm.ws.webcontainer.srt.SRTServletResponse.sendError(SRTServletResponse.java:1187) at com.ibm.ws.webcontainer.servlet.FilterProxyServlet.dispatch(FilterProxyServlet.java:139) at com.ibm.ws.webcontainer.servlet.FilterProxyServlet.service(FilterProxyServlet.java:62) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131) at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:263) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116) at
How do I access Wicket's string resources in a non component class ?
I want to access Wicket's string resources in a non component class. I am aware of getLocalizer().getString(...) for a component, but how do you do this in a non Component based class and how do you make Wicket aware of the message bundle ? All of the Localizer#getString(...) methods require a Component. I am using Wicket version 6.10.0. I have a REST resource named UserResource.java and messages in UserResource.properties. Thanks Warren -- This email was Virus checked by Clark's Nutrition's Astaro Security Gateway. lt;div style='font-size:11.0pt;font-family:quot;Tahomaquot;'gt;The information contained in this e-mail is intended only for use of the individual or entity named above. This e-mail, and any documents, files, previous e-mails or other information attached to it, may contain confidential information that is legally privileged. If you are not the intended recipient of this e-mail, or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, dissemination, distribution, copying or other use of this e-mail or any of the information contained in or attached to it is strictly prohibited. If you have received this e-mail in error, please immediately notify us by return e-mail or by telephone at (951)321-1960, and destroy the original e-mail and its attachments without reading or saving it in any manner. Thank you.lt;/divgt; lt;div align=quot;centerquot; style='font-size:12.0pt;font-family:quot;Tahomaquot;,quot;sans-serifquot;'gt;lt;stronggt;Clarkâs Nutrition is a registered trademark of Clarks Nutritional Centers, Inc.lt;/stronggt;lt;/divgt; - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How do I access Wicket's string resources in a non component class ?
Hi, you can pass a null component to Localizer's methods. You have to put the string resources in YourApplication.properties or YourInitializer.properties though. Hope this helps Sven On 12/11/2013 09:10 PM, Warren Bell wrote: I want to access Wicket's string resources in a non component class. I am aware of getLocalizer().getString(...) for a component, but how do you do this in a non Component based class and how do you make Wicket aware of the message bundle ? All of the Localizer#getString(...) methods require a Component. I am using Wicket version 6.10.0. I have a REST resource named UserResource.java and messages in UserResource.properties. Thanks Warren - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Little issue with tree component
Hi Decebal, yes, the tree's models should implement equals() and hashcode(). Usually it's sufficient to forward these calls to the wrapped entity. We're doing it this way to allow some optimization: If the model is able to identify an entity by its identifier, then it can shortcut the comparison by comparing the ids instead. Note that a) ITreeProvider#model()'s javadoc has a note on implementing these methods b) model equality is used in IItemReuseStrategy too. Many thanks for your feedback. Sven On 12/11/2013 03:07 PM, Decebal Suiu wrote: Hi I write this post for sven as a feedback for his excellent tree component from wicket 6. I encounter a problem with the tree component (nothing happens on expand) in the conversion process of NextReports from wicket 1.5 to wicket 6. My problem happened because the NestedTree.updateBranch method compares two model objects (with equals): if (model.equals(branch.getModel())) // line 118 in wicket 6.12.0 My EntityModel (the model returned by ITreeProvider.(Entity object)) hasn't an equals method because I didn't find usefully to implement this method in my (wicket) models. For this reason the above line return false in all scenario; I don't know if it's a better idea to compare the model objects instead models (I see a little performance with model objects comparation - my EntityModel extends extends LoadableDetachableModelEntity) but in the current implementation it's hard to debug what it's wrong with my tree. Obviously, I resolved my problem with a simple equals method added in my EntityModel but take me some time to found what wasn't wrong with my tree. Best regards, Decebal -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Little-issue-with-tree-component-tp4662914.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Converting 1.4.7 to 6.12 - Login Error
Hi, /gov.usdoj.afms.esp.modules.login.LoginPage doesn't look like a Wicket url. Are you mounting your pages with the full package path? It seems your container is redirecting to a login, which it can't find. Is your webapp running under a context path? Sven On 12/11/2013 08:58 PM, Entropy wrote: So I am past my compile errors and am now running my shiny new 6.12 application. But it breaks down before I can get it off the dealer's lot. :( The problem is that the error is kind of ambiguous. The console says: [12/11/13 14:47:30:437 EST] 0026 servlet I com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0242I: [EquitableSharingEAR] [/EquitableSharing] [FilterProxyServlet]: Initialization successful. [12/11/13 14:47:30:440 EST] 0026 webappE com.ibm.ws.webcontainer.webapp.WebApp reportRecursiveError Error Page Exception The server cannot use the error page specified for your application because of the exception printed below. [12/11/13 14:47:30:442 EST] 0026 webappE com.ibm.ws.webcontainer.webapp.WebApp reportRecursiveError Error Page Exception: So instead of using the error page, or printing the stack trace in the console, the following shows up in the browser. I stepped through in debug and the error happens after our code. So contrary to the claim, it DID find the java. The html is right next to it as usual. No method in our error page is invoked, though I can see that we do set it with the following: IApplicationSettings settings = getApplicationSettings(); settings.setInternalErrorPage(ESPApplicationErrorPage.class); getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE); The error: Original Exception: Error Message: SRVE0190E: File not found: /gov.usdoj.afms.esp.modules.login.LoginPage Error Code: 404 Target Servlet: DefaultExtensionProcessor Error Stack: java.io.FileNotFoundException: /gov.usdoj.afms.esp.modules.login.LoginPage at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:572) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3933) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931) at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604) Error Page Exception: Error Message: SRVE0190E: File not found: /404 Error Code: 404 Target Servlet: DefaultExtensionProcessor Error Stack: java.io.FileNotFoundException: /404 at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:572) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:353) at com.ibm.ws.webcontainer.webapp.WebApp.sendError(WebApp.java:3368) at com.ibm.ws.webcontainer.webapp.WebAppDispatcherContext.sendError(WebAppDispatcherContext.java:634) at com.ibm.ws.webcontainer.srt.SRTServletResponse.sendError(SRTServletResponse.java:1187) at com.ibm.ws.webcontainer.servlet.FilterProxyServlet.dispatch(FilterProxyServlet.java:139) at com.ibm.ws.webcontainer.servlet.FilterProxyServlet.service(FilterProxyServlet.java:62) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131) at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:263) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201) at
Re: How do I access Wicket's string resources in a non component class ?
Hi, maybe you can have a look here: https://github.com/wicketstuff/core/blob/master/jdk-1.6-parent/wicketstuff-restannotations-parent/restannotations/src/main/java/org/wicketstuff/rest/utils/wicket/bundle/DefaultBundleResolver.java That's a resource bundle resolver that works with the stringResourceLoaders of the Application. I want to access Wicket's string resources in a non component class. I am aware of getLocalizer().getString(...) for a component, but how do you do this in a non Component based class and how do you make Wicket aware of the message bundle ? All of the Localizer#getString(...) methods require a Component. I am using Wicket version 6.10.0. I have a REST resource named UserResource.java and messages in UserResource.properties. Thanks Warren - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How do I access Wicket's string resources in a non component class ?
I think this is exactly what I am looking for. I had an older version of Wicket REST Annotations that did not have this class. I do have a question about its usage. I did the following in my resource class and it does work. DefaultBundleResolver defaultBundleResolver = new DefaultBundleResolver(MyRestResource.class); String message = defaultBundleResolver.getMessage(test, null); Is this the correct way to use this class or is their a way for it to plug into Wicket via Application#Init() method and then get the Localizer and use it? Thanks, Warren On Dec 11, 2013, at 1:30 PM, Andrea Del Bene wrote: Hi, maybe you can have a look here: https://github.com/wicketstuff/core/blob/master/jdk-1.6-parent/wicketstuff-restannotations-parent/restannotations/src/main/java/org/wicketstuff/rest/utils/wicket/bundle/DefaultBundleResolver.java That's a resource bundle resolver that works with the stringResourceLoaders of the Application. I want to access Wicket's string resources in a non component class. I am aware of getLocalizer().getString(...) for a component, but how do you do this in a non Component based class and how do you make Wicket aware of the message bundle ? All of the Localizer#getString(...) methods require a Component. I am using Wicket version 6.10.0. I have a REST resource named UserResource.java and messages in UserResource.properties. Thanks Warren - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- This email was Virus checked by Clark's Nutrition's Astaro Security Gateway. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How do I access Wicket's string resources in a non component class ?
Answered my own question. Found this in Wicket REST Annotation tests. DefaultBundleResolver resolver = new DefaultBundleResolver(RestResourceFullAnnotated.class); assertEquals(resolver.getMessage(CustomValidator, Collections.EMPTY_MAP), response); On Dec 11, 2013, at 2:26 PM, Warren Bell wrote: I think this is exactly what I am looking for. I had an older version of Wicket REST Annotations that did not have this class. I do have a question about its usage. I did the following in my resource class and it does work. DefaultBundleResolver defaultBundleResolver = new DefaultBundleResolver(MyRestResource.class); String message = defaultBundleResolver.getMessage(test, null); Is this the correct way to use this class or is their a way for it to plug into Wicket via Application#Init() method and then get the Localizer and use it? Thanks, Warren On Dec 11, 2013, at 1:30 PM, Andrea Del Bene wrote: Hi, maybe you can have a look here: https://github.com/wicketstuff/core/blob/master/jdk-1.6-parent/wicketstuff-restannotations-parent/restannotations/src/main/java/org/wicketstuff/rest/utils/wicket/bundle/DefaultBundleResolver.java That's a resource bundle resolver that works with the stringResourceLoaders of the Application. I want to access Wicket's string resources in a non component class. I am aware of getLocalizer().getString(...) for a component, but how do you do this in a non Component based class and how do you make Wicket aware of the message bundle ? All of the Localizer#getString(...) methods require a Component. I am using Wicket version 6.10.0. I have a REST resource named UserResource.java and messages in UserResource.properties. Thanks Warren - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- This email was Virus checked by Clark's Nutrition's Astaro Security Gateway. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
SSL Offloading and Wicket
I'm sure I'm missing something simple as there are certainly many others using similar setups, but I cannot figure out what I'm doing wrong. We force all requests from the public internet to use HTTPS when accessing our app.We terminate SSL at the load balancer and the request that actually hits Apache and then Tomcat is straight HTTP. The load balancer adds the proper X-Forwarded-Proto headers to the requests heading back to the app server and Wicket and we've confirmed that these are being received. We've setup the XForwardedRequestWrapperFactory in our web application init. We can even confirm that request.getScheme() is properly returning https inside our application. Where things break down is when Wicket issues a redirect, which of course it does all of the time as people navigate from page to page. For some reason, the issued redirects are always HTTP, instead of HTTPS. These HTTP redirects themselves eventually get redirected back to HTTPS by our load balancer on their return trip from the client, but many of our customers are ultra security conscious and have firewalls in place that won't even allow those initial HTTP requests through, so we've got a problem. We've traced through the Tomcat code and the cause is in org.apache.catalina.connector.Response. This is the original response that was created when the container first began processing the request. It carries a pointer to the original request as well and it uses this request with its getScheme(), getServerPort(), and getServerName() to generate the redirect that is eventually returned. It does not use the wrapped request that contains the values determined from processing the X-Forwarded headers. As I said, I'm sure this is working as intended and that we've just missed something somewhere, but for the life of me, I can figure out what it is. Any ideas? We need Wicket/Tomcat to produce HTTPS redirects. Matt