replace getRequestCycle().scheduleRequestHandlerAfterCurrent
Hi we're using getRequestCycle().scheduleRequestHandlerAfterCurrent, various places in our application which causes 500 error, is there any we to replace, lines below because my solution which is: String url = RequestCycle.get().urlFor(rs).toString(); throw new RedirectToUrlException(url); doesn't work. /// ResourceStreamRequestHandler rs = new ResourceStreamRequestHandler( new StringResourceStream(work, text/csv)); rs.setFileName(Workdone_ + projectModel.getObject().getName().replaceAll([^a-zA-Z0-9], ) + .csv); this.getRequestCycle().scheduleRequestHandlerAfterCurrent(rs); or another example I was trying to replace ResourceStreamRequestHandler rs = new ResourceStreamRequestHandler(new FileResourceStream(new File(file.getAbsolutePath(; rs.setFileName(df.getFileName()); this.getRequestCycle().scheduleRequestHandlerAfterCurrent(rs); with this, but doesnt work either: String url = (RequestCycle.get().urlFor(rs)).toString(); throw new RedirectToUrlException(url); thanks for any help
Re: replace getRequestCycle().scheduleRequestHandlerAfterCurrent
thanks for a replay, yes there is an exception in a log here's an example HTTP Status 500 - Cannot call sendRedirect() after the response has been committed -- *type* Exception report *message* *Cannot call sendRedirect() after the response has been committed* *description* *The server encountered an internal error that prevented it from fulfilling this request.* *exception* java.lang.IllegalStateException: Cannot call sendRedirect() after the response has been committed org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:482) javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:137) hub.app.servlet.RelativeUrlFilter$RelativeUrlServletResponseFilter.sendRedirect(RelativeUrlFilter.java:106) org.apache.wicket.protocol.http.servlet.ServletWebResponse.sendRedirect(ServletWebResponse.java:268) org.apache.wicket.protocol.http.BufferedWebResponse$SendRedirectAction.invoke(BufferedWebResponse.java:400) org.apache.wicket.protocol.http.BufferedWebResponse.writeTo(BufferedWebResponse.java:588) org.apache.wicket.protocol.http.HeaderBufferingWebResponse.stopBuffering(HeaderBufferingWebResponse.java:60) org.apache.wicket.protocol.http.HeaderBufferingWebResponse.flush(HeaderBufferingWebResponse.java:97) org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:269) org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201) org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282) hub.app.servlet.RelativeUrlFilter.doFilter(RelativeUrlFilter.java:54) com.wideplay.warp.persist.PersistenceFilter$3.run(PersistenceFilter.java:141) com.wideplay.warp.persist.internal.Lifecycles.failEarlyAndLeaveNoOneBehind(Lifecycles.java:29) com.wideplay.warp.persist.PersistenceFilter.doFilter(PersistenceFilter.java:155) *note* *The full stack trace of the root cause is available in the Apache Tomcat/7.0.55 logs.* 2015-01-26 13:59 GMT+00:00 Martin Grigorov mgrigo...@apache.org: Hi, Error 500 means that there must be an exception in the logs. What is it ? What exactly doesn't work means in your case ? Another exception, or no-op behavior, or ... ? Please give more details. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Jan 26, 2015 at 3:45 PM, Roland Dobsai roland.dob...@gmail.com wrote: Hi we're using getRequestCycle().scheduleRequestHandlerAfterCurrent, various places in our application which causes 500 error, is there any we to replace, lines below because my solution which is: String url = RequestCycle.get().urlFor(rs).toString(); throw new RedirectToUrlException(url); doesn't work. /// ResourceStreamRequestHandler rs = new ResourceStreamRequestHandler( new StringResourceStream(work, text/csv)); rs.setFileName(Workdone_ + projectModel.getObject().getName().replaceAll([^a-zA-Z0-9], ) + .csv); this.getRequestCycle().scheduleRequestHandlerAfterCurrent(rs); or another example I was trying to replace ResourceStreamRequestHandler rs = new ResourceStreamRequestHandler(new FileResourceStream(new File(file.getAbsolutePath(; rs.setFileName(df.getFileName()); this.getRequestCycle().scheduleRequestHandlerAfterCurrent(rs); with this, but doesnt work either: String url = (RequestCycle.get().urlFor(rs)).toString(); throw new RedirectToUrlException(url); thanks for any help
Re: replace getRequestCycle().scheduleRequestHandlerAfterCurrent
Wicket by default buffers the write/flush of the markup to the browser until the end of the the request cycle. The exception says that the application has already written some bytes/characters to the browser and it is not possible to make a redirect, because the response headers are already sent. Put a breakpoint at RelativeUrlServletResponseFilter#write() methods and see when and why it is being called earlier. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Jan 26, 2015 at 4:06 PM, Roland Dobsai roland.dob...@gmail.com wrote: thanks for a replay, yes there is an exception in a log here's an example HTTP Status 500 - Cannot call sendRedirect() after the response has been committed -- *type* Exception report *message* *Cannot call sendRedirect() after the response has been committed* *description* *The server encountered an internal error that prevented it from fulfilling this request.* *exception* java.lang.IllegalStateException: Cannot call sendRedirect() after the response has been committed org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:482) javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:137) hub.app.servlet.RelativeUrlFilter$RelativeUrlServletResponseFilter.sendRedirect(RelativeUrlFilter.java:106) org.apache.wicket.protocol.http.servlet.ServletWebResponse.sendRedirect(ServletWebResponse.java:268) org.apache.wicket.protocol.http.BufferedWebResponse$SendRedirectAction.invoke(BufferedWebResponse.java:400) org.apache.wicket.protocol.http.BufferedWebResponse.writeTo(BufferedWebResponse.java:588) org.apache.wicket.protocol.http.HeaderBufferingWebResponse.stopBuffering(HeaderBufferingWebResponse.java:60) org.apache.wicket.protocol.http.HeaderBufferingWebResponse.flush(HeaderBufferingWebResponse.java:97) org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:269) org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201) org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282) hub.app.servlet.RelativeUrlFilter.doFilter(RelativeUrlFilter.java:54) com.wideplay.warp.persist.PersistenceFilter$3.run(PersistenceFilter.java:141) com.wideplay.warp.persist.internal.Lifecycles.failEarlyAndLeaveNoOneBehind(Lifecycles.java:29) com.wideplay.warp.persist.PersistenceFilter.doFilter(PersistenceFilter.java:155) *note* *The full stack trace of the root cause is available in the Apache Tomcat/7.0.55 logs.* 2015-01-26 13:59 GMT+00:00 Martin Grigorov mgrigo...@apache.org: Hi, Error 500 means that there must be an exception in the logs. What is it ? What exactly doesn't work means in your case ? Another exception, or no-op behavior, or ... ? Please give more details. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Jan 26, 2015 at 3:45 PM, Roland Dobsai roland.dob...@gmail.com wrote: Hi we're using getRequestCycle().scheduleRequestHandlerAfterCurrent, various places in our application which causes 500 error, is there any we to replace, lines below because my solution which is: String url = RequestCycle.get().urlFor(rs).toString(); throw new RedirectToUrlException(url); doesn't work. /// ResourceStreamRequestHandler rs = new ResourceStreamRequestHandler( new StringResourceStream(work, text/csv)); rs.setFileName(Workdone_ + projectModel.getObject().getName().replaceAll([^a-zA-Z0-9], ) + .csv); this.getRequestCycle().scheduleRequestHandlerAfterCurrent(rs); or another example I was trying to replace ResourceStreamRequestHandler rs = new ResourceStreamRequestHandler(new FileResourceStream(new File(file.getAbsolutePath(; rs.setFileName(df.getFileName()); this.getRequestCycle().scheduleRequestHandlerAfterCurrent(rs); with this, but doesnt work either: String url = (RequestCycle.get().urlFor(rs)).toString(); throw new RedirectToUrlException(url); thanks for any help
Re: replace getRequestCycle().scheduleRequestHandlerAfterCurrent
It seems we cannot reproduce this locally - only in production. Difference being apache is in front of tomcat. If we comment out the following code we have no issues: setPageRendererProvider(new IPageRendererProvider() { @Override public PageRenderer get(final RenderPageRequestHandler context) { return new WebPageRenderer(context) { @Override protected RedirectPolicy getRedirectPolicy() { RedirectPolicy result; if (!((WebRequest) RequestCycle.get().getRequest()).isAjax() (context.getPage() instanceof ExternalShareSecurePage || context.getPage() instanceof ExternalShareDocumentPage)) { result = RedirectPolicy.NEVER_REDIRECT; } else { result = super.getRedirectPolicy(); } return result; } }; } }); 2015-01-26 14:17 GMT+00:00 Martin Grigorov mgrigo...@apache.org: Wicket by default buffers the write/flush of the markup to the browser until the end of the the request cycle. The exception says that the application has already written some bytes/characters to the browser and it is not possible to make a redirect, because the response headers are already sent. Put a breakpoint at RelativeUrlServletResponseFilter#write() methods and see when and why it is being called earlier. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Jan 26, 2015 at 4:06 PM, Roland Dobsai roland.dob...@gmail.com wrote: thanks for a replay, yes there is an exception in a log here's an example HTTP Status 500 - Cannot call sendRedirect() after the response has been committed -- *type* Exception report *message* *Cannot call sendRedirect() after the response has been committed* *description* *The server encountered an internal error that prevented it from fulfilling this request.* *exception* java.lang.IllegalStateException: Cannot call sendRedirect() after the response has been committed org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:482) javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:137) hub.app.servlet.RelativeUrlFilter$RelativeUrlServletResponseFilter.sendRedirect(RelativeUrlFilter.java:106) org.apache.wicket.protocol.http.servlet.ServletWebResponse.sendRedirect(ServletWebResponse.java:268) org.apache.wicket.protocol.http.BufferedWebResponse$SendRedirectAction.invoke(BufferedWebResponse.java:400) org.apache.wicket.protocol.http.BufferedWebResponse.writeTo(BufferedWebResponse.java:588) org.apache.wicket.protocol.http.HeaderBufferingWebResponse.stopBuffering(HeaderBufferingWebResponse.java:60) org.apache.wicket.protocol.http.HeaderBufferingWebResponse.flush(HeaderBufferingWebResponse.java:97) org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:269) org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201) org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282) hub.app.servlet.RelativeUrlFilter.doFilter(RelativeUrlFilter.java:54) com.wideplay.warp.persist.PersistenceFilter$3.run(PersistenceFilter.java:141) com.wideplay.warp.persist.internal.Lifecycles.failEarlyAndLeaveNoOneBehind(Lifecycles.java:29) com.wideplay.warp.persist.PersistenceFilter.doFilter(PersistenceFilter.java:155) *note* *The full stack trace of the root cause is available in the Apache Tomcat/7.0.55 logs.* 2015-01-26 13:59 GMT+00:00 Martin Grigorov mgrigo...@apache.org: Hi, Error 500 means that there must be an exception in the logs. What is it ? What exactly doesn't work means in your case ? Another exception, or no-op behavior, or ... ? Please give more details. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Jan 26, 2015 at 3:45 PM, Roland Dobsai roland.dob...@gmail.com wrote: Hi we're using getRequestCycle().scheduleRequestHandlerAfterCurrent, various places in our application which causes 500 error, is there any we to replace, lines below because my solution which is: String url = RequestCycle.get().urlFor(rs).toString(); throw new RedirectToUrlException(url); doesn't work. /// ResourceStreamRequestHandler rs = new ResourceStreamRequestHandler( new StringResourceStream(work, text/csv)); rs.setFileName(Workdone_ + projectModel.getObject().getName().replaceAll([^a-zA-Z0-9], ) + .csv); this.getRequestCycle().scheduleRequestHandlerAfterCurrent(rs); or another example I was trying to replace ResourceStreamRequestHandler rs = new
Re: replace getRequestCycle().scheduleRequestHandlerAfterCurrent
Hi, Error 500 means that there must be an exception in the logs. What is it ? What exactly doesn't work means in your case ? Another exception, or no-op behavior, or ... ? Please give more details. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Jan 26, 2015 at 3:45 PM, Roland Dobsai roland.dob...@gmail.com wrote: Hi we're using getRequestCycle().scheduleRequestHandlerAfterCurrent, various places in our application which causes 500 error, is there any we to replace, lines below because my solution which is: String url = RequestCycle.get().urlFor(rs).toString(); throw new RedirectToUrlException(url); doesn't work. /// ResourceStreamRequestHandler rs = new ResourceStreamRequestHandler( new StringResourceStream(work, text/csv)); rs.setFileName(Workdone_ + projectModel.getObject().getName().replaceAll([^a-zA-Z0-9], ) + .csv); this.getRequestCycle().scheduleRequestHandlerAfterCurrent(rs); or another example I was trying to replace ResourceStreamRequestHandler rs = new ResourceStreamRequestHandler(new FileResourceStream(new File(file.getAbsolutePath(; rs.setFileName(df.getFileName()); this.getRequestCycle().scheduleRequestHandlerAfterCurrent(rs); with this, but doesnt work either: String url = (RequestCycle.get().urlFor(rs)).toString(); throw new RedirectToUrlException(url); thanks for any help
HTML5 CSS Shapes
Hi everyone, I was just playing around a little bit with shape-outside and wrapped the css stuff into a small wicket component. https://github.com/klopfdreh/wicket-components-playground (Search for HTML5 Shapes) The browsers which support this functionality are listed here: http://caniuse.com/#search=shape-outside I also provided a little demo page org.wicketstuff.html5.shape.example.ShapeCircleExamplePage. It's a fluent API / an example is listed in the repository. kind regards Tobias - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Internationalized Validators
Hi, I don't see any better way. Either you use a simple switch statement or a special factory class it is almost the same - you have to keep it up-to-date with the list of supported locales/markets. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Jan 27, 2015 at 8:38 AM, Christian Schröter christian.schroe...@1und1.de wrote: Thank you Tobias, but this will unfortunately just solve the problem having the same validator with different parameters. To add a market specific validator, I still would need to switch case the locale. Any other ideas? Hi, you could place the values in the locale file and parse them. Integer.parseInt(getString(maxvalue)); kind regards Tobias Am 26.01.2015 um 11:01 schrieb Christian Schröter christian.schroe...@1und1.de: Hey, I would be interested to know if there is a builtin mechanism to add specific validators for a certain locale. For example: de_DE - StringValidator.maximumLength(100) en_GB - StringValidator.maximumLength(200); en_US - StringValidator.maximumLength(200); AnotherValidatorOnlyForUS(); My current solution is a switch-case over the locale to add the correct validators. With more locales and more validators this solution feels kind of sloppy. What does your solution looks like? Cheers, Chris - 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: Internationalized Validators
Thank you Tobias, but this will unfortunately just solve the problem having the same validator with different parameters. To add a market specific validator, I still would need to switch case the locale. Any other ideas? Hi, you could place the values in the locale file and parse them. Integer.parseInt(getString(maxvalue)); kind regards Tobias Am 26.01.2015 um 11:01 schrieb Christian Schröter christian.schroe...@1und1.de: Hey, I would be interested to know if there is a builtin mechanism to add specific validators for a certain locale. For example: de_DE - StringValidator.maximumLength(100) en_GB - StringValidator.maximumLength(200); en_US - StringValidator.maximumLength(200); AnotherValidatorOnlyForUS(); My current solution is a switch-case over the locale to add the correct validators. With more locales and more validators this solution feels kind of sloppy. What does your solution looks like? Cheers, Chris - 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: Internationalized Validators
Hi, you could switch the locale of the session http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/protocol/http/WebSession.html setLocale(Locale locale) Here is an example in which the locale is switched by a link click: https://cwiki.apache.org/confluence/display/WICKET/Manually+switching+locale For normal the locale is resolved by the preferred language of the browser. You may switch the locale based on the market which is currently displayed. I don't know if it is possible to switch the locale of a component Hierarchy. Here the link to the user guide for i18n: http://wicket.apache.org/guide/guide/i18n.html kind regards Tobias Am 27.01.2015 um 07:38 schrieb Christian Schröter christian.schroe...@1und1.de: Thank you Tobias, but this will unfortunately just solve the problem having the same validator with different parameters. To add a market specific validator, I still would need to switch case the locale. Any other ideas? Hi, you could place the values in the locale file and parse them. Integer.parseInt(getString(maxvalue)); kind regards Tobias Am 26.01.2015 um 11:01 schrieb Christian Schröter christian.schroe...@1und1.de: Hey, I would be interested to know if there is a builtin mechanism to add specific validators for a certain locale. For example: de_DE - StringValidator.maximumLength(100) en_GB - StringValidator.maximumLength(200); en_US - StringValidator.maximumLength(200); AnotherValidatorOnlyForUS(); My current solution is a switch-case over the locale to add the correct validators. With more locales and more validators this solution feels kind of sloppy. What does your solution looks like? Cheers, Chris - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Internationalized Validators
Ah, just one addition: No you would not require to switch the parameter, because the parameter would remain the same - in the property files it would look like this: Propertyfile for en_GB: maxvalue=200 Propertyfile for de_DE: maxvalue=100 in the code you would receive the max value based on the current locale getString(maxvalue) kind regards Tobias Am 27.01.2015 um 07:38 schrieb Christian Schröter christian.schroe...@1und1.de: Thank you Tobias, but this will unfortunately just solve the problem having the same validator with different parameters. To add a market specific validator, I still would need to switch case the locale. Any other ideas? Hi, you could place the values in the locale file and parse them. Integer.parseInt(getString(maxvalue)); kind regards Tobias Am 26.01.2015 um 11:01 schrieb Christian Schröter christian.schroe...@1und1.de: Hey, I would be interested to know if there is a builtin mechanism to add specific validators for a certain locale. For example: de_DE - StringValidator.maximumLength(100) en_GB - StringValidator.maximumLength(200); en_US - StringValidator.maximumLength(200); AnotherValidatorOnlyForUS(); My current solution is a switch-case over the locale to add the correct validators. With more locales and more validators this solution feels kind of sloppy. What does your solution looks like? Cheers, Chris - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Internationalized Validators
On Tue, Jan 27, 2015 at 9:16 AM, Tobias Soloschenko tobiassolosche...@googlemail.com wrote: Ah, just one addition: No you would not require to switch the parameter, because the parameter would remain the same - in the property files it would look like this: Propertyfile for en_GB: maxvalue=200 Propertyfile for de_DE: maxvalue=100 in the code you would receive the max value based on the current locale getString(maxvalue) This will work if the app code uses the same type of validator with different arguments, but it won't work if for some locales/markets it has to use a completely different validator (like AnotherValidatorOnlyForUS). But yes, it would simplify the switch! kind regards Tobias Am 27.01.2015 um 07:38 schrieb Christian Schröter christian.schroe...@1und1.de: Thank you Tobias, but this will unfortunately just solve the problem having the same validator with different parameters. To add a market specific validator, I still would need to switch case the locale. Any other ideas? Hi, you could place the values in the locale file and parse them. Integer.parseInt(getString(maxvalue)); kind regards Tobias Am 26.01.2015 um 11:01 schrieb Christian Schröter christian.schroe...@1und1.de: Hey, I would be interested to know if there is a builtin mechanism to add specific validators for a certain locale. For example: de_DE - StringValidator.maximumLength(100) en_GB - StringValidator.maximumLength(200); en_US - StringValidator.maximumLength(200); AnotherValidatorOnlyForUS(); My current solution is a switch-case over the locale to add the correct validators. With more locales and more validators this solution feels kind of sloppy. What does your solution looks like? Cheers, Chris - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: HTML5 CSS Shapes
Hi Tobias, Have you considered using https://github.com/adobe-webplatform/css-shapes-polyfill as a fallback for the browsers which do not yet support the new feature ? About the API: #shapeType(new CircleShapeType(...)) #transitionShapeType(new CircleShapeType(50%)) I find the names a bit repetitive - too many shapeTypes to write/read :-) Maybe #shape(new Circle(...)) and #transition(new Circle(...)) will be enough ?! It would be easier for us to understand what you are talking about if we see the demo in action :-) I am a happy user of RedHat's OpenShift as a free service for deploying Java apps. Thank you for all your contributions to Wicket and WicketStuff you do lately! Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Jan 26, 2015 at 10:07 PM, Tobias Soloschenko tobiassolosche...@googlemail.com wrote: Hi everyone, I was just playing around a little bit with shape-outside and wrapped the css stuff into a small wicket component. https://github.com/klopfdreh/wicket-components-playground (Search for HTML5 Shapes) The browsers which support this functionality are listed here: http://caniuse.com/#search=shape-outside I also provided a little demo page org.wicketstuff.html5.shape.example.ShapeCircleExamplePage. It's a fluent API / an example is listed in the repository. kind regards Tobias - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: HTML5 CSS Shapes
Hi, very good points! I am going to change the API calls the way you suggested. Demo: Nice service - I'm looking forward to also be a happy user of RedHat's OpenShift. ;-D kind regards Tobias Am 27.01.2015 um 08:37 schrieb Martin Grigorov mgrigo...@apache.org: Hi Tobias, Have you considered using https://github.com/adobe-webplatform/css-shapes-polyfill as a fallback for the browsers which do not yet support the new feature ? About the API: #shapeType(new CircleShapeType(...)) #transitionShapeType(new CircleShapeType(50%)) I find the names a bit repetitive - too many shapeTypes to write/read :-) Maybe #shape(new Circle(...)) and #transition(new Circle(...)) will be enough ?! It would be easier for us to understand what you are talking about if we see the demo in action :-) I am a happy user of RedHat's OpenShift as a free service for deploying Java apps. Thank you for all your contributions to Wicket and WicketStuff you do lately! Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Jan 26, 2015 at 10:07 PM, Tobias Soloschenko tobiassolosche...@googlemail.com wrote: Hi everyone, I was just playing around a little bit with shape-outside and wrapped the css stuff into a small wicket component. https://github.com/klopfdreh/wicket-components-playground (Search for HTML5 Shapes) The browsers which support this functionality are listed here: http://caniuse.com/#search=shape-outside I also provided a little demo page org.wicketstuff.html5.shape.example.ShapeCircleExamplePage. It's a fluent API / an example is listed in the repository. kind regards Tobias - 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
Internationalized Validators
Hey, I would be interested to know if there is a builtin mechanism to add specific validators for a certain locale. For example: de_DE - StringValidator.maximumLength(100) en_GB - StringValidator.maximumLength(200); en_US - StringValidator.maximumLength(200); AnotherValidatorOnlyForUS(); My current solution is a switch-case over the locale to add the correct validators. With more locales and more validators this solution feels kind of sloppy. What does your solution looks like? Cheers, Chris
Re: Internationalized Validators
Hi, you could place the values in the locale file and parse them. Integer.parseInt(getString(maxvalue)); kind regards Tobias Am 26.01.2015 um 11:01 schrieb Christian Schröter christian.schroe...@1und1.de: Hey, I would be interested to know if there is a builtin mechanism to add specific validators for a certain locale. For example: de_DE - StringValidator.maximumLength(100) en_GB - StringValidator.maximumLength(200); en_US - StringValidator.maximumLength(200); AnotherValidatorOnlyForUS(); My current solution is a switch-case over the locale to add the correct validators. With more locales and more validators this solution feels kind of sloppy. What does your solution looks like? Cheers, Chris - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: CheckGroup in a DataTable
Hi, I find it tacky to have to wrap the entire DataTable in a span or a Div for check group usually your web designer will use enough DIVs in the markup anyway, so you rarely have to add an additional one just for your Wicket component. AjaxFormChoiceComponentUpdatingBehavior get called for each CheckBox ... if you check the CheckGroupSelector Each selected checkbox will trigger an event, which is then received by the AjaxFormChoiceComponentUpdatingBehavior. You might be able to work around this by configuring AjaxRequestAttributes#throttleSettings. Regards Sven On 25.01.2015 21:54, Arjun Dhar wrote: Thanks ... I edited my post. I'll simplify my questions further: 1. I find it tacky to have to wrap the entire DataTable in a span or a Div for check group. Is there any way I can apply it on the column level. Its hard to imagine. 2. AjaxFormChoiceComponentUpdatingBehavior get called for each CheckBox it checks automatically, if you check the CheckGroupSelector. ... I'd like only 1 Event fired if any One CheckBox is selected in the entire group. ... anyway to filter the event lsitener? thanks - Software documentation is like sex: when it is good, it is very, very good; and when it is bad, it is still better than nothing! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/CheckGroup-in-a-DataTable-tp4669111p4669113.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: Ajax download stops AjaxSelfUpdatingTimer
Hello again, Thank you for your hints. Ajax debug shows nothing interesting. It seems it has to do with target.appendJavaScript(setTimeout(\window.location.href=' + url + '\, 100);); from AjaxDownload. If I comment this the timer works but not file is downloaded. I refreshed manually the component with the attached AjaxSelfUpdatingTimer and after the download finished the behavior's property 'hasTimeout' is true. If i manually call target.appendJavaScript(setTimeout(\window.location.href=' + getCallbackUrl() + '\, 100);); in an ajax behavior (after the download finished) the timer is back to normal. Do you have any ideas? Thank you. On Mon, Jan 12, 2015 at 3:10 PM, Martin Grigorov mgrigo...@apache.org wrote: Enable Ajax debug panel and see whether there are any interesting log messages. For example: https://github.com/apache/wicket/blob/4d2e5680b23e55984e8ac159bdce63629e57df12/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js#L288 If your JS knowledge is good enough then you may try to debug Wicket.Ajax.ajax() yourself. The timer should fire calls to this method but they are suppressed for some reason. Either the channel is busy, or there is a precondition that stops the ajax calls. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Jan 12, 2015 at 1:58 PM, elvis.ciocoiu elvis.cioc...@synthesys.ro wrote: Hi again, Basically I have a label refreshed automatically with: It is refreshed automatically by the timer until I click an ajax link like the following: After I click the download link the file is downloaded but the ajax timer behavior is not triggered anymore. Thank you. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Ajax-download-stops-AjaxSelfUpdatingTimer-tp4668978p4668983.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 -- _ Elvis Ciocoiu Senior Consultant Everlight Solutions ROMANIA address: http://www.everlight.ro http://www.synthesys.ro/ e-mail: elvis.cioc...@everlight.ro elvis.cioc...@synthesys.ro mobile : (40) 0745 13 75 85 This message and any attachments contain information, which may be confidential or privileged. If you are not the intended recipient, please refrain from any disclosure, copying, distribution or use of this information. Please be aware that such actions are prohibited. If you have received this transmission in error, kindly notify us by email to off...@everlight.ro off...@synthesys.ro. We appreciate your cooperation.