Re: Compressed 'ConcatResourceBundleReference'?
Hi, See what Emond suggested. Otherwise the problem is known: https://issues.apache.org/jira/browse/WICKET-4762 P.S. Is wicket-portlet:6.0.0 coming ? :-) On Tue, Sep 25, 2012 at 8:15 PM, pasto wrote: > Hi, > > Is there an easy way to use ConcatResourceBundleReference to merge > compressed JavaScriptResourceReferences? From the source code it seems, that > ConcatResourceBundle merges streams obtained by > 'getCacheableResourceStream', but those are not compressed, as compression > is done in 'processResponse', that is called from 'newResourceResponse' in > the PackageResource. > Wouldn't it be better just wrap the resource stream and override the > getInputStream in case of js/css compression? > Most probably I'm missing something, but I can't figure out, how to bundle > compressed package resource references without building my own > ConcatResourceBundle. > > Thank you, > Peter. > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Compressed-ConcatResourceBundleReference-tp4652338.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 > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Exception handling and testing
You have to return a IRequestHandler. See RenderPageRequestHandler On Wed, Sep 26, 2012 at 1:45 AM, Alec Swan wrote: > I am trying to implement Martin's @SubSite annotation approach to > redirect the user to the sub-site's home page when > AuthenticationException is thrown in Wicket 1.5. However, apparently I > cannot throw a RestartResponseAtInterceptPageException(annotation.homePage()) > from AbstractRequestCycleListener#onException. How else can I redirect > the user to the sub-site login page? > > The following RCH causes a 500 HTTP error page to be shown in the > browser when AuthenticationException is thrown. > > public class AuthenticationExceptionRequestCycleHandler extends > AbstractRequestCycleListener > { > @Override > public IRequestHandler onException(RequestCycle cycle, Exception ex) { > if (ex instanceof WicketRuntimeException && > ex.getCause().getCause() instanceof AuthenticationException) { > IPageRequestHandler lastHandler = > PageRequestHandlerTracker.getLastHandler(cycle); > Class pageClass = lastHandler > == null ? null : lastHandler.getPageClass(); > if (pageClass != null) { > SubSite annotation = pageClass.getAnnotation(SubSite.class); > if (annotation != null && annotation.homePage() != null) { > throw new > RestartResponseAtInterceptPageException(annotation.homePage()); > } > } > } > return super.onException(cycle, ex); > } > } > > Thanks, > > Alec > > On Fri, Jun 8, 2012 at 2:54 PM, Alec Swan wrote: >> I also use this approach, but with authentication exceptions thrown by >> Wicket it's hard to tell if the user was redirected to Login page >> because of authentication or some other exceptions. >> >> On Fri, Jun 8, 2012 at 1:15 PM, Michal Margiel >> wrote: >>> 2012/6/8 Alec Swan >>> That's clever. I will give it a try. What is the recommendation on verifying that an exception was thrown during page rendering using Wicket tester? I am not talking just about authentication here, but exceptions in general. >>> Hello, >>> Why you want to verify that exception was thrown in WicketTester? IMHO it >>> is not proper place to check that. >>> In my code I am verifying expcetions in services tests using >>> catch-exception library [1]. >>> >>> And then while testing Page I am mocking my service to throw exception and >>> I am verifying behaviour on exception (e.g. redirecting to login page, >>> showing error message etc...) >>> >>> That makes not only clearer code but also simplify testing. >>> you can see example of services tests in [2] and page tests in [3] >>> >>> [1] http://code.google.com/p/catch-exception/ >>> [2] >>> https://bitbucket.org/margielm/confitura/src/8599eae2ba00/src/test/java/jelatyna/services/UserServiceImplShould.java >>> [3] >>> https://bitbucket.org/margielm/confitura/src/8599eae2ba00/src/test/java/jelatyna/pages/admin/login/LoginPageShould.java >>> -- >>> Pozdrawiam/Best regards >>> Michał Margiel >>> >>> http://www.confitura.pl (dawniej Javarsovia) >>> http://www.linkedin.com/in/MichalMargiel >>> http://www.margiel.eu > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Datepicker with range selection support
It seems you use Wicket 1.5.x with wicket-jquery-ui 6.x which depends on Wicket 6.0.0 On Wed, Sep 26, 2012 at 3:48 AM, Sebastien Gautrin wrote: > Hi, > > Me again. I started looking into integrating your RangeDatePicker (with the > text field for now), but I get I an odd error when using the snapshots for > sonatype repository, which I also get when running the samples. I get it > with jetty:run and tomcat:run, with oracle jdk7, open jdk7 and open jdk6 > (see below for the stacktrace). > > However if I build the snapshots myself, it works smoothly, so there might > have been some kind of bug when you packaged them (well, to be honest I have > absolutely no idea where that can come from). > > Have a good night. > > Sébastien > > stacktrace === > > ERROR - DefaultExceptionMapper - Unexpected error occurred > org.apache.wicket.WicketRuntimeException: Method onRequest of interface > org.apache.wicket.behavior.IBehaviorListener targeted at > com.googlecode.wicket.jquery.ui.plugins.datepicker.RangeDatePicker$2@62565d57 > on component [ [Component id = datepicker]] threw an exception > at > org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:270) > at > org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:241) > at > org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:255) > at > org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:234) > at > org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784) > at > org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) > at > org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255) > at > org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212) > at > org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283) > at > org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188) > at > org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:244) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1332) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:477) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) > at org.eclipse.jetty.server.Server.handle(Server.java:348) > at > org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452) > at > org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:884) > at > org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:938) > at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:630) > at > org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230) > at > org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77) > at > org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606) > at > org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538) > at java.lang.Thread.run(Thread.java:722) > Caused by: java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.refle
Re: Datepicker with range selection support
Hi, Me again. I started looking into integrating your RangeDatePicker (with the text field for now), but I get I an odd error when using the snapshots for sonatype repository, which I also get when running the samples. I get it with jetty:run and tomcat:run, with oracle jdk7, open jdk7 and open jdk6 (see below for the stacktrace). However if I build the snapshots myself, it works smoothly, so there might have been some kind of bug when you packaged them (well, to be honest I have absolutely no idea where that can come from). Have a good night. Sébastien stacktrace === ERROR - DefaultExceptionMapper - Unexpected error occurred org.apache.wicket.WicketRuntimeException: Method onRequest of interface org.apache.wicket.behavior.IBehaviorListener targeted at com.googlecode.wicket.jquery.ui.plugins.datepicker.RangeDatePicker$2@62565d57 on component [ [Component id = datepicker]] threw an exception at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:270) at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:241) at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:255) at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:234) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:244) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1332) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:477) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) at org.eclipse.jetty.server.Server.handle(Server.java:348) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452) at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:884) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:938) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:630) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538) at java.lang.Thread.run(Thread.java:722) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:260) ... 35 more Caused by: java.lang.IncompatibleClassChangeError: Found class org.apache.wicket.ajax.AjaxRequestTarget, but interface was expected
Re: DatePicker Error
I didn't look in the >> .war#WEB-INF/lib folder. I had all sorts of junk in there! That did the trick though. Thank you again for educating a newbie. Very grateful for the Wicket community thus far. On Sep 25, 2012, at 16:59, Stephen Walsh wrote: > Martin, this is what I've got right now. > > > 6.0.0 > 7.5.0.v20110901 > > > > > org.apache.wicket > wicket-core > ${wicket.version} > > > > org.apache.wicket > wicket-extensions > ${wicket.version} > > > > org.apache.wicket > wicket-auth-roles > ${wicket.version} > > > > org.apache.wicket > wicket-datetime > ${wicket.version} > > > > > > > > > Stephen Walsh | http://connectwithawalsh.com > > On Sep 25, 2012, at 07:52, Stephen Walsh > wrote: > >> I'll take a look when I get home, but I have wicket 6.0.0 in core, >> extensions, date-time, auth-roles in my class path. I set this up in my pom. >> >> >> >> Stephen Walsh | http://connectwithawalsh.com >> >> >> >> On Tue, Sep 25, 2012 at 7:35 AM, Martin Grigorov >> wrote: >> The attachment didn't make it. >> Check what is in .war#WEB-INF/lib folder. >> >> On Tue, Sep 25, 2012 at 3:32 PM, Stephen Walsh >> wrote: >> > This is a screen shot of my referenced libraries. One interesting thing >> > that happens is that my Java will occasionally show 1.5 instead of what it >> > shows here. Not sure if this has anything to do with it >> > >> > >> > >> > On Sep 25, 2012, at 02:05, Martin Grigorov wrote: >> > >> > Hi, >> > >> > It seems you have mixed versions of wicket-datetime and wicket-core in >> > the classpath. >> > Make sure they are both the same version. >> > >> > On Tue, Sep 25, 2012 at 5:22 AM, Stephen Walsh >> > wrote: >> > >> > I've packaged and deployed the examples page to JBoss AS 7.1.1 and the date >> > picker page works just fine; however, when I package and deploy my own >> > application, I get the following error >> > >> > javax.servlet.ServletException: Filter execution threw an exception >> > >> > root cause >> > >> > java.lang.NoSuchMethodError: >> > org.apache.wicket.Session.getClientInfo()Lorg/apache/wicket/core/request/ClientInfo; >> > >> > org.apache.wicket.extensions.yui.calendar.DateTimeField.getClientTimeZone(DateTimeField.java:315) >> > >> > org.apache.wicket.extensions.yui.calendar.DateTimeField.onBeforeRender(DateTimeField.java:417) >> >org.apache.wicket.Component.internalBeforeRender(Component.java:993) >> >org.apache.wicket.Component.beforeRender(Component.java:1027) >> > >> > org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1743) >> >org.apache.wicket.Component.onBeforeRender(Component.java:3855) >> > >> > org.apache.wicket.markup.html.form.Form.onBeforeRender(Form.java:1706) >> >org.apache.wicket.Component.internalBeforeRender(Component.java:993) >> >org.apache.wicket.Component.beforeRender(Component.java:1027) >> > >> > org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1743) >> >org.apache.wicket.Component.onBeforeRender(Component.java:3855) >> >org.apache.wicket.Page.onBeforeRender(Page.java:826) >> >org.apache.wicket.Component.internalBeforeRender(Component.java:993) >> >org.apache.wicket.Component.beforeRender(Component.java:1027) >> > >> > org.apache.wicket.Component.internalPrepareForRender(Component.java:2228) >> >org.apache.wicket.Page.internalPrepareForRender(Page.java:279) >> >org.apache.wicket.Component.render(Component.java:2310) >> >org.apache.wicket.Page.renderPage(Page.java:1035) >> > >> > org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105) >> > >> > org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:182) >> > >> > org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167) >> > >> > org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784) >> > >> > org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) >> > >> > org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255) >> > >> > org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212) >> > >> > org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283) >> > >> > org.apache.wicket.protocol.http.WicketFilter.processRequest
Re: Exception handling and testing
I am trying to implement Martin's @SubSite annotation approach to redirect the user to the sub-site's home page when AuthenticationException is thrown in Wicket 1.5. However, apparently I cannot throw a RestartResponseAtInterceptPageException(annotation.homePage()) from AbstractRequestCycleListener#onException. How else can I redirect the user to the sub-site login page? The following RCH causes a 500 HTTP error page to be shown in the browser when AuthenticationException is thrown. public class AuthenticationExceptionRequestCycleHandler extends AbstractRequestCycleListener { @Override public IRequestHandler onException(RequestCycle cycle, Exception ex) { if (ex instanceof WicketRuntimeException && ex.getCause().getCause() instanceof AuthenticationException) { IPageRequestHandler lastHandler = PageRequestHandlerTracker.getLastHandler(cycle); Class pageClass = lastHandler == null ? null : lastHandler.getPageClass(); if (pageClass != null) { SubSite annotation = pageClass.getAnnotation(SubSite.class); if (annotation != null && annotation.homePage() != null) { throw new RestartResponseAtInterceptPageException(annotation.homePage()); } } } return super.onException(cycle, ex); } } Thanks, Alec On Fri, Jun 8, 2012 at 2:54 PM, Alec Swan wrote: > I also use this approach, but with authentication exceptions thrown by > Wicket it's hard to tell if the user was redirected to Login page > because of authentication or some other exceptions. > > On Fri, Jun 8, 2012 at 1:15 PM, Michal Margiel > wrote: >> 2012/6/8 Alec Swan >> >>> That's clever. I will give it a try. >>> >>> What is the recommendation on verifying that an exception was thrown >>> during page rendering using Wicket tester? I am not talking just about >>> authentication here, but exceptions in general. >>> >>> >> Hello, >> Why you want to verify that exception was thrown in WicketTester? IMHO it >> is not proper place to check that. >> In my code I am verifying expcetions in services tests using >> catch-exception library [1]. >> >> And then while testing Page I am mocking my service to throw exception and >> I am verifying behaviour on exception (e.g. redirecting to login page, >> showing error message etc...) >> >> That makes not only clearer code but also simplify testing. >> you can see example of services tests in [2] and page tests in [3] >> >> [1] http://code.google.com/p/catch-exception/ >> [2] >> https://bitbucket.org/margielm/confitura/src/8599eae2ba00/src/test/java/jelatyna/services/UserServiceImplShould.java >> [3] >> https://bitbucket.org/margielm/confitura/src/8599eae2ba00/src/test/java/jelatyna/pages/admin/login/LoginPageShould.java >> -- >> Pozdrawiam/Best regards >> Michał Margiel >> >> http://www.confitura.pl (dawniej Javarsovia) >> http://www.linkedin.com/in/MichalMargiel >> http://www.margiel.eu - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DatePicker Error
Martin, this is what I've got right now. 6.0.0 7.5.0.v20110901 org.apache.wicket wicket-core ${wicket.version} org.apache.wicket wicket-extensions ${wicket.version} org.apache.wicket wicket-auth-roles ${wicket.version} org.apache.wicket wicket-datetime ${wicket.version} Stephen Walsh | http://connectwithawalsh.com On Sep 25, 2012, at 07:52, Stephen Walsh wrote: > I'll take a look when I get home, but I have wicket 6.0.0 in core, > extensions, date-time, auth-roles in my class path. I set this up in my pom. > > > > Stephen Walsh | http://connectwithawalsh.com > > > > On Tue, Sep 25, 2012 at 7:35 AM, Martin Grigorov wrote: > The attachment didn't make it. > Check what is in .war#WEB-INF/lib folder. > > On Tue, Sep 25, 2012 at 3:32 PM, Stephen Walsh > wrote: > > This is a screen shot of my referenced libraries. One interesting thing > > that happens is that my Java will occasionally show 1.5 instead of what it > > shows here. Not sure if this has anything to do with it > > > > > > > > On Sep 25, 2012, at 02:05, Martin Grigorov wrote: > > > > Hi, > > > > It seems you have mixed versions of wicket-datetime and wicket-core in > > the classpath. > > Make sure they are both the same version. > > > > On Tue, Sep 25, 2012 at 5:22 AM, Stephen Walsh > > wrote: > > > > I've packaged and deployed the examples page to JBoss AS 7.1.1 and the date > > picker page works just fine; however, when I package and deploy my own > > application, I get the following error > > > > javax.servlet.ServletException: Filter execution threw an exception > > > > root cause > > > > java.lang.NoSuchMethodError: > > org.apache.wicket.Session.getClientInfo()Lorg/apache/wicket/core/request/ClientInfo; > > > > org.apache.wicket.extensions.yui.calendar.DateTimeField.getClientTimeZone(DateTimeField.java:315) > > > > org.apache.wicket.extensions.yui.calendar.DateTimeField.onBeforeRender(DateTimeField.java:417) > >org.apache.wicket.Component.internalBeforeRender(Component.java:993) > >org.apache.wicket.Component.beforeRender(Component.java:1027) > > > > org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1743) > >org.apache.wicket.Component.onBeforeRender(Component.java:3855) > > > > org.apache.wicket.markup.html.form.Form.onBeforeRender(Form.java:1706) > >org.apache.wicket.Component.internalBeforeRender(Component.java:993) > >org.apache.wicket.Component.beforeRender(Component.java:1027) > > > > org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1743) > >org.apache.wicket.Component.onBeforeRender(Component.java:3855) > >org.apache.wicket.Page.onBeforeRender(Page.java:826) > >org.apache.wicket.Component.internalBeforeRender(Component.java:993) > >org.apache.wicket.Component.beforeRender(Component.java:1027) > > > > org.apache.wicket.Component.internalPrepareForRender(Component.java:2228) > >org.apache.wicket.Page.internalPrepareForRender(Page.java:279) > >org.apache.wicket.Component.render(Component.java:2310) > >org.apache.wicket.Page.renderPage(Page.java:1035) > > > > org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105) > > > > org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:182) > > > > org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167) > > > > org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784) > > > > org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) > > > > org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255) > > > > org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212) > > > > org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283) > > > > org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188) > > > > org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:244) > > Any thoughts on why this might happen and how to fix it? > > > > Thanks in advance! > > > > > > Stephen Walsh | http://connectwithawalsh.com > > > > > > > > > > -- > > Martin Grigorov > > jWeekend > > Training, Consulting, Deve
Re: Separating a form
In ContactEditPanel, you can have a constructor with the AjaxSubmitLink as an argument. Hope that help, François Le 25 sept. 2012 à 09:15, ChambreNoire a écrit : > Hi, > > I have a simple ContactEditPanel which contains a form and a number of > textfields. Up until now I included an AjaxSubmitLink in this panel which, > if the form content is valid, saves/updates the Contact instance contained > in the Panel model. So far so simple. However now I'd like to remove the > link in order that I may, depending on the context in which I use the > ContactEditPanel, place the submit link at different levels of my overall > component hierarchy. For instance in one context I'd like to use to flip > between ContactEditPanel and ContactViewPanel with a bar of actions above > the current view (edit | save , cancel). Another context would be to use > ContactEditPanel in a standalone way (maybe part of a multi-step process) > with just a save link below. > > I was contemplating refactoring my ContactEditPanel to extends > FormComponentPanel rather than Panel as described here but I'm not sure > whether this is the right approach and I'm having trouble wrapping my head > around this. > > Any help would be most appreciated! > > Many Thanks, > > CN > > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Separating-a-form-tp4652301.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: [Announce] wicket-dashboard
If you look in the pom.xml, you will find the repo : jofc2.maven.repo JOFC2 GoogleCode.com Snapshot Repository http://jofc2.googlecode.com/svn/repository/snapshots/ -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Announce-wicket-dashboard-tp4652308p4652343.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
AjaxEditableLabel Issue (Application in Production Mode)
I have an interesting issue that crept up in the use of the AjaxEditableLabel component in Wicket 1.4.13 (I know, ancient). The component stopped processing the click event that is supposed to cause the editor to render. I was seeing different behavior depending upon the mode of the Wicket Application and wondered if anyone might have a clue as to what was going on. With the exact same source code, when the Wicket Application was configured to run in Production Mode, the AjaxEditableLabel would not, when clicked, render the editor, but when in Development mode, it worked as expected. In the server log there is a warning that the component is either not visible or not enabled, which I know isn't true because it works perfectly fine when the Wicket Application is in Development Mode. The only behavior that is being overridden on the AjaxEditableLabel instance is the onSubmit. I searched the forums and google and could not find anything that would explain the different behavior of this component when the application mode was changed from development to production. Interesting enough, the AjaxEditableLabel does work fine in Production mode in other areas of the application when no behaviors are overridden. Not sure if that has anything whatsoever to do with this issue. Ideas? J.D.
Re: [Announce] wicket-dashboard
I tried to run it with 1.0-0 version which is currently available, but I got compile error. Can you point to jar that your project currently depends on (or send it to me by email?). On Tue, Sep 25, 2012 at 7:47 PM, Paul Szulc wrote: > Tried to run it but stopped on dependcy jofc2 which is not in maven repo > > I found jar on http://code.google.com/p/jofc2/downloads/list > > but current release is 1.0, yet your code depends on 1.0.1. > > > On Tue, Sep 25, 2012 at 2:52 PM, Pierre Goupil wrote: > >> It looks nice, indeed! Are there any plans for a Wicket 6 version? >> >> Regards, >> >> Pierre >> >> >> >> On Tue, Sep 25, 2012 at 2:25 PM, Sebastien wrote: >> >> > https://github.com/decebals/wicket-dashboard >> > (small typo in your previous mail :) >> > >> > Nice job indeed, I will probably use it! :) >> > >> > Best regards, >> > Sebastien. >> > >> > On Tue, Sep 25, 2012 at 2:16 PM, Decebal Suiu >> wrote: >> > >> > > Hi >> > > >> > > I implemented a simple dashboard for wicket that can be found at >> > > https://github.com/decebals/wicket-dashbaord >> > > You can drag and drop widgets, perform some actions on each widget, >> add >> > or >> > > remove new widgets, change widget settings, collapse widgets. >> > > >> > > I have a tiny demo application. In this demo I have implemented two >> > widgets >> > > types: a chart widget (using open flash chart) and a text widget >> > (display a >> > > Lorem Ipsum). >> > > >> > > Best regards, >> > > Decebal >> > > >> > > >> > > >> > > >> > > -- >> > > View this message in context: >> > > >> > >> http://apache-wicket.1842946.n4.nabble.com/Announce-wicket-dashboard-tp4652308.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 >> > > >> > > >> > >> >> >> >> -- >> Le bonheur n'est pas une destination, mais une façon de voyager. >> >> Papa d'une petite Lou-Ann depuis le 30 juin. >> > >
Re: [Announce] wicket-dashboard
Tried to run it but stopped on dependcy jofc2 which is not in maven repo I found jar on http://code.google.com/p/jofc2/downloads/list but current release is 1.0, yet your code depends on 1.0.1. On Tue, Sep 25, 2012 at 2:52 PM, Pierre Goupil wrote: > It looks nice, indeed! Are there any plans for a Wicket 6 version? > > Regards, > > Pierre > > > > On Tue, Sep 25, 2012 at 2:25 PM, Sebastien wrote: > > > https://github.com/decebals/wicket-dashboard > > (small typo in your previous mail :) > > > > Nice job indeed, I will probably use it! :) > > > > Best regards, > > Sebastien. > > > > On Tue, Sep 25, 2012 at 2:16 PM, Decebal Suiu > wrote: > > > > > Hi > > > > > > I implemented a simple dashboard for wicket that can be found at > > > https://github.com/decebals/wicket-dashbaord > > > You can drag and drop widgets, perform some actions on each widget, add > > or > > > remove new widgets, change widget settings, collapse widgets. > > > > > > I have a tiny demo application. In this demo I have implemented two > > widgets > > > types: a chart widget (using open flash chart) and a text widget > > (display a > > > Lorem Ipsum). > > > > > > Best regards, > > > Decebal > > > > > > > > > > > > > > > -- > > > View this message in context: > > > > > > http://apache-wicket.1842946.n4.nabble.com/Announce-wicket-dashboard-tp4652308.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 > > > > > > > > > > > > -- > Le bonheur n'est pas une destination, mais une façon de voyager. > > Papa d'une petite Lou-Ann depuis le 30 juin. >
Model Binding Issue
Hi All, I'm a little stumped here, and would like anyone's input to see what I am doing wrong. I've created a new component that extends FormComponentPanel. It contains a TextField component. When my form is submitted back to the server, my model is not updated. :-( However, when I don't use this component, and I use a standard TextField component my model is updated when my form is submitted back to the server. I'm passing the model for my component into the TextField in my component, so I'm not sure why it doesn't link back up on post back. Here is my component (any comments on what I am doing wrong would be greatly appreciated): public class TextFieldPlaceHolder extends FormComponentPanel{ private TextField txtInput; public TextFieldPlaceHolder(String id, IModel model, String placeHolderText) throws Exception{ this(id,model,placeHolderText,false); } public TextFieldPlaceHolder(String id, IModel model, String placeHolderText, boolean isRequired) throws Exception { super(id, model); try{ this.setType(String.class); txtInput = new TextField("txtInput",model){ private static final long serialVersionUID = 1L; protected void onComponentTag(ComponentTag tag){ super.onComponentTag(tag); HashMap myAttrs = TextFieldPlaceHolder.this.setOnComponentTagTextField(); if(myAttrs != null){ for(Map.Entry entry : myAttrs.entrySet()){ String key = entry.getKey(); String value = entry.getValue(); String attrValue = tag.getAttribute(key); if(attrValue == null || attrValue.equals("")){ tag.put(key, value); }else{ tag.put(key, attrValue+" "+value); } } } String okKeyUpFunctionText = "if(this.value != ''){$j('#lbl_"+this.getMarkupId()+"').hide();}else{$j('#lbl_"+this.getMarkupId()+"').show();}"; tag.put("onkeyup",okKeyUpFunctionText); } }; txtInput.setOutputMarkupPlaceholderTag(true); txtInput.setLabel(new DetachableStringModel(placeHolderText)); FormComponentLabel lblLabel = new FormComponentLabel("lblLabel",txtInput){ private static final long serialVersionUID = 1L; @SuppressWarnings("rawtypes") protected void onComponentTag(ComponentTag tag){ super.onComponentTag(tag); TextField txtInput = (TextField) TextFieldPlaceHolder.this.get("txtInput"); tag.put("id","lbl_"+txtInput.getMarkupId()); } }; Label lblText = new Label("lblText",txtInput.getLabel()); lblText.setRenderBodyOnly(true); lblLabel.add(lblText); add(new RequiredFieldIndicator("reqFldInd",isRequired).setOutputMarkupPlaceholderTag(true)); add(lblLabel); add(txtInput); }catch(Exception e){ throw e; } } Thanks! Matt -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Model-Binding-Issue-tp4652337.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: X-Forwarded-For handling in method getRemoteAddr()
On Tue, Sep 25, 2012 at 2:10 AM, Benjamin Steinert wrote: > Hi everyone, > > I need you input regarding the Wicket WebClientInfo implementation of > getRemoteAddr() (extracted from Wicket 1.5.3 but I think it did not > change in release 6): > > ... > String remoteAddr = request.getHeader("X-Forwarded-For"); > if (remoteAddr == null) > { > remoteAddr = req.getRemoteAddr(); > } > else > { > if (remoteAddr.contains(",")) > { > // we just want the client > remoteAddr = remoteAddr.split(",")[0].trim(); > } > } > return remoteAddr; > > I am facing the problem that we get the String "unknown" set by some > Proxy in the Forwarded-For field. > According to the IETF draft this is in fact a valid value: > http://tools.ietf.org/html/draft-petersson-forwarded-for-02#section-6 > > Now unfortunately the the simple null check prevents falling back to the > Servlet request based getRemoteAddr which would be more helpful than > having a String that is no IP Address. how is an ip address of some proxy in your data center more useful? i dont think an external proxy would set such a header -igor > > I would suggest something like > if (remoteAddr == null || > !InetAddressValidator.getInstance().isValid(remoteAddr)) > { ... } > > to ensure that the given value is an IP. What would you say? Bug, > Feature or simply unnecessary? ;) > > Cheers > Ben > > - > 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: JavaScript slow load time
Follow up. I turned on the access valve on tomcat and I can see a request for each JavaScript file. Each request completes in a fraction of a second, so there is no one file that is causing the slowdown. However, about half way through requesting the files, it seems to take a 20 to 25 second break. So far I have observed this behaviour around the wicket_ajax.js and wicket_event.js requests. This could just be a coincidence. I initially thought perhaps one of these scripts was executing something and tying up the browser before it could request the next script; however, this problem doesn't occur once the JavaScript has been cached. Subsequent requests are very fast. Anyone have any thoughts? Something else I could try? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/JavaScript-slow-load-time-tp4652273p4652334.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: X-Forwarded-For handling in method getRemoteAddr()
Hi, Please file a ticket to improve this. Thanks! On Tue, Sep 25, 2012 at 12:10 PM, Benjamin Steinert wrote: > Hi everyone, > > I need you input regarding the Wicket WebClientInfo implementation of > getRemoteAddr() (extracted from Wicket 1.5.3 but I think it did not > change in release 6): > > ... > String remoteAddr = request.getHeader("X-Forwarded-For"); > if (remoteAddr == null) > { > remoteAddr = req.getRemoteAddr(); > } > else > { > if (remoteAddr.contains(",")) > { > // we just want the client > remoteAddr = remoteAddr.split(",")[0].trim(); > } > } > return remoteAddr; > > I am facing the problem that we get the String "unknown" set by some > Proxy in the Forwarded-For field. > According to the IETF draft this is in fact a valid value: > http://tools.ietf.org/html/draft-petersson-forwarded-for-02#section-6 > > Now unfortunately the the simple null check prevents falling back to the > Servlet request based getRemoteAddr which would be more helpful than > having a String that is no IP Address. > > I would suggest something like > if (remoteAddr == null || > !InetAddressValidator.getInstance().isValid(remoteAddr)) > { ... } > > to ensure that the given value is an IP. What would you say? Bug, > Feature or simply unnecessary? ;) > > Cheers > Ben > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket plugin architecture
Hi Jenkins/Hudson has this ability (do it with class loaders management). See more at http://kohsuke.org/2011/12/06/installing-plugins-to-jenkins-without-restart/. Jenkins is so popular because it uses a relative simple (vs osgi) with a good versatility plugin system. Probably it's possible to adapt jenkins plugin system to wicket but I don't know how big is this task. It's anybody here that can explains us how the plugin system is implemented in brixcms? Best regards, Decebal -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-plugin-architecture-tp4652305p4652327.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: Wicket plugin architecture
Good question and good answers :) I am searching for an answer too. In our product (NextReports server) we use spring framework for this purpose. You can add contributors as section, menu action, popup action, ... and at runtime a component (for example a menu panel) takes all contributors and generate the markup. It's ok but this approach requires extra library (spring) and it's not a true plugin system (no class loaders management). Personal, I like the plugin system for Jenkins/Hudson. This system uses a specific class loader for each plugin. For more information see https://wiki.jenkins-ci.org/display/JENKINS/Plugin+Structure. You can define extension points and you can write extension for an extension points (similar to brixcms). I suppose that the key is how to define an extension point. In jenkins an extension point implements ExtensionPoint and an extension has an @Extension annotation. At runtime, jenkins search all @Extension annotations (It seems to me a time consuming operation). As plugin framework you can use something like http://jpf.sourceforge.net/ Best regards, Decebal -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-plugin-architecture-tp4652305p4652321.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
Panel use same model as Parent page
How do i get a panel to use the some modelObject as the parent page? I have a form that uses an OwnedAccount as its model, and in the form i have a custom panel which has a refreshingview containing a list of financeAccount which belong to the OwnedAccount. The problem is that changes to the financeaccounts are not being changed in the modelobject of the form. I removed a lot of code where there is 3 dots "..." @Entity @Table(name = "ownedaccount") public class OwnedAccount implements Serializable { ... //used for multiple currencies @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "ownedAccount") private List financeAccounts = new ArrayList(); ... } - public class AssetsPage extends LoggedInPage { ... // bookmarkable constructor public AssetsPage(PageParameters parameters) { super(parameters); init(); } private void init() { final OwnedAccount ownedAccount = getCurrentSelections().getSelectedOwnedAccount(); add(new FeedbackPanel("feedback")); entityEdit = new OwnedAccountForm("entityEdit", ownedAccount); add(entityEdit); } @Override protected void selectionsChanged() { OwnedAccount selectedOwnedAccount = getCurrentSelections().getSelectedOwnedAccount(); CompoundPropertyModel model = new CompoundPropertyModel(selectedOwnedAccount); entityEdit.setModel(model); } ... class OwnedAccountForm extends BaseCreateEditForm { ... public OwnedAccountForm(String s, OwnedAccount entity) { super(s, entity, null); assetType = entity.getAssetType(); } @Override protected void initComponents(Void initParams) { ... multipleCurrenciesPanel = new MultipleCurrenciesPanel("multipleCurrenciesPanel", ownedAccountService, getCurrentSelections()); add(multipleCurrenciesPanel); ... } ... } - public class MultipleCurrenciesPanel extends Panel { OwnedAccountService ownedAccountService; CurrentSelections currentSelections; public MultipleCurrenciesPanel(String id, OwnedAccountService ownedAccountService, CurrentSelections currentSelections) { super(id); this.ownedAccountService = ownedAccountService; this.currentSelections = currentSelections; init(); } private void init() { DepositoryLabel currencyLabel = new DepositoryLabel("currency", new ResourceModel("currency")); add(currencyLabel); DepositoryLabel accountForSecuritasLabel = new DepositoryLabel("account.for.securitas", new ResourceModel("account.for.securitas")); add(accountForSecuritasLabel); DepositoryLabel accountForCashLabel = new DepositoryLabel("account.for.cash", new ResourceModel("account.for.cash")); add(accountForCashLabel); DepositoryLabel buttonDeleteLabel = new DepositoryLabel("button.delete", new ResourceModel("button.delete")); add(buttonDeleteLabel); CurrenciesView currenciesView = new CurrenciesView("financeAccounts", ownedAccountService, currentSelections, this); add(currenciesView); setOutputMarkupId(true); } } I used to have the contents of the panel directly within the AssetPage and i worked there, but this page will quickly become bloated because i need to add more stuff to it. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Panel-use-same-model-as-Parent-page-tp4652316.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: Wicket plugin architecture
Hi, You can also look at https://github.com/brix-cms/brix-cms. It is much simpler than hippo. Best regards, Dan On Tue, Sep 25, 2012 at 10:48 AM, Martin Grigorov wrote: > Hi, > > The simplest way is to use Wicket's org.apache.wicket.IInitializer class. > Just create a Jar (the plugin) that contains the plugin classes and > wicket.properties in the root package and a line inside: > initializer=com.example.MyInitializer > > MyInitializer#init(Application) will be called just before > MyApp#init(). In this method you can add whatever your plugin provides > to the global configuration > > On Tue, Sep 25, 2012 at 11:35 AM, Michal Wegrzyn > wrote: > > Dear developers, > > > > I need to prepare plugin architecture for a Wicket based project. > > I've found that open source Hippo CMS ( > http://svn.onehippo.org/repos/hippo/ ) does it, but I am > > curious if there are any other projects that do such a thing? > > > > Do you maybe know this kind of projects or frameworks? > > > > Are there any important in-depth aspects of Wicket of which should I be > aware of for creating plugin architecture? > > > > Best regards, > > Michal Wegrzyn > > > > -- > Martin Grigorov > jWeekend > Training, Consulting, Development > http://jWeekend.com > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: DatePicker Error
I'll take a look when I get home, but I have wicket 6.0.0 in core, extensions, date-time, auth-roles in my class path. I set this up in my pom. Stephen Walsh | http://connectwithawalsh.com On Tue, Sep 25, 2012 at 7:35 AM, Martin Grigorov wrote: > The attachment didn't make it. > Check what is in .war#WEB-INF/lib folder. > > On Tue, Sep 25, 2012 at 3:32 PM, Stephen Walsh > wrote: > > This is a screen shot of my referenced libraries. One interesting thing > > that happens is that my Java will occasionally show 1.5 instead of what > it > > shows here. Not sure if this has anything to do with it > > > > > > > > On Sep 25, 2012, at 02:05, Martin Grigorov wrote: > > > > Hi, > > > > It seems you have mixed versions of wicket-datetime and wicket-core in > > the classpath. > > Make sure they are both the same version. > > > > On Tue, Sep 25, 2012 at 5:22 AM, Stephen Walsh > > wrote: > > > > I've packaged and deployed the examples page to JBoss AS 7.1.1 and the > date > > picker page works just fine; however, when I package and deploy my own > > application, I get the following error > > > > javax.servlet.ServletException: Filter execution threw an exception > > > > root cause > > > > java.lang.NoSuchMethodError: > > > org.apache.wicket.Session.getClientInfo()Lorg/apache/wicket/core/request/ClientInfo; > > > > > org.apache.wicket.extensions.yui.calendar.DateTimeField.getClientTimeZone(DateTimeField.java:315) > > > > > org.apache.wicket.extensions.yui.calendar.DateTimeField.onBeforeRender(DateTimeField.java:417) > > > org.apache.wicket.Component.internalBeforeRender(Component.java:993) > >org.apache.wicket.Component.beforeRender(Component.java:1027) > > > > > org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1743) > >org.apache.wicket.Component.onBeforeRender(Component.java:3855) > > > > org.apache.wicket.markup.html.form.Form.onBeforeRender(Form.java:1706) > > > org.apache.wicket.Component.internalBeforeRender(Component.java:993) > >org.apache.wicket.Component.beforeRender(Component.java:1027) > > > > > org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1743) > >org.apache.wicket.Component.onBeforeRender(Component.java:3855) > >org.apache.wicket.Page.onBeforeRender(Page.java:826) > > > org.apache.wicket.Component.internalBeforeRender(Component.java:993) > >org.apache.wicket.Component.beforeRender(Component.java:1027) > > > > org.apache.wicket.Component.internalPrepareForRender(Component.java:2228) > >org.apache.wicket.Page.internalPrepareForRender(Page.java:279) > >org.apache.wicket.Component.render(Component.java:2310) > >org.apache.wicket.Page.renderPage(Page.java:1035) > > > > > org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105) > > > > > org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:182) > > > > > org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167) > > > > > org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784) > > > > > org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) > > > > > org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255) > > > > > org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212) > > > > > org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283) > > > > > org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188) > > > > > org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:244) > > Any thoughts on why this might happen and how to fix it? > > > > Thanks in advance! > > > > > > Stephen Walsh | http://connectwithawalsh.com > > > > > > > > > > -- > > Martin Grigorov > > jWeekend > > Training, Consulting, Development > > http://jWeekend.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 > > > > -- > Martin Grigorov > jWeekend > Training, Consulting, Development > http://jWeekend.com > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: [Announce] wicket-dashboard
It looks nice, indeed! Are there any plans for a Wicket 6 version? Regards, Pierre On Tue, Sep 25, 2012 at 2:25 PM, Sebastien wrote: > https://github.com/decebals/wicket-dashboard > (small typo in your previous mail :) > > Nice job indeed, I will probably use it! :) > > Best regards, > Sebastien. > > On Tue, Sep 25, 2012 at 2:16 PM, Decebal Suiu wrote: > > > Hi > > > > I implemented a simple dashboard for wicket that can be found at > > https://github.com/decebals/wicket-dashbaord > > You can drag and drop widgets, perform some actions on each widget, add > or > > remove new widgets, change widget settings, collapse widgets. > > > > I have a tiny demo application. In this demo I have implemented two > widgets > > types: a chart widget (using open flash chart) and a text widget > (display a > > Lorem Ipsum). > > > > Best regards, > > Decebal > > > > > > > > > > -- > > View this message in context: > > > http://apache-wicket.1842946.n4.nabble.com/Announce-wicket-dashboard-tp4652308.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 > > > > > -- Le bonheur n'est pas une destination, mais une façon de voyager. Papa d'une petite Lou-Ann depuis le 30 juin.
Re: DatePicker Error
The attachment didn't make it. Check what is in .war#WEB-INF/lib folder. On Tue, Sep 25, 2012 at 3:32 PM, Stephen Walsh wrote: > This is a screen shot of my referenced libraries. One interesting thing > that happens is that my Java will occasionally show 1.5 instead of what it > shows here. Not sure if this has anything to do with it > > > > On Sep 25, 2012, at 02:05, Martin Grigorov wrote: > > Hi, > > It seems you have mixed versions of wicket-datetime and wicket-core in > the classpath. > Make sure they are both the same version. > > On Tue, Sep 25, 2012 at 5:22 AM, Stephen Walsh > wrote: > > I've packaged and deployed the examples page to JBoss AS 7.1.1 and the date > picker page works just fine; however, when I package and deploy my own > application, I get the following error > > javax.servlet.ServletException: Filter execution threw an exception > > root cause > > java.lang.NoSuchMethodError: > org.apache.wicket.Session.getClientInfo()Lorg/apache/wicket/core/request/ClientInfo; > > org.apache.wicket.extensions.yui.calendar.DateTimeField.getClientTimeZone(DateTimeField.java:315) > > org.apache.wicket.extensions.yui.calendar.DateTimeField.onBeforeRender(DateTimeField.java:417) >org.apache.wicket.Component.internalBeforeRender(Component.java:993) >org.apache.wicket.Component.beforeRender(Component.java:1027) > > org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1743) >org.apache.wicket.Component.onBeforeRender(Component.java:3855) > > org.apache.wicket.markup.html.form.Form.onBeforeRender(Form.java:1706) >org.apache.wicket.Component.internalBeforeRender(Component.java:993) >org.apache.wicket.Component.beforeRender(Component.java:1027) > > org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1743) >org.apache.wicket.Component.onBeforeRender(Component.java:3855) >org.apache.wicket.Page.onBeforeRender(Page.java:826) >org.apache.wicket.Component.internalBeforeRender(Component.java:993) >org.apache.wicket.Component.beforeRender(Component.java:1027) > > org.apache.wicket.Component.internalPrepareForRender(Component.java:2228) >org.apache.wicket.Page.internalPrepareForRender(Page.java:279) >org.apache.wicket.Component.render(Component.java:2310) >org.apache.wicket.Page.renderPage(Page.java:1035) > > org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105) > > org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:182) > > org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167) > > org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784) > > org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) > > org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255) > > org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212) > > org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283) > > org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188) > > org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:244) > Any thoughts on why this might happen and how to fix it? > > Thanks in advance! > > > Stephen Walsh | http://connectwithawalsh.com > > > > > -- > Martin Grigorov > jWeekend > Training, Consulting, Development > http://jWeekend.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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DatePicker Error
This is a screen shot of my referenced libraries. One interesting thing that happens is that my Java will occasionally show 1.5 instead of what it shows here. Not sure if this has anything to do with it On Sep 25, 2012, at 02:05, Martin Grigorov wrote: Hi, It seems you have mixed versions of wicket-datetime and wicket-core in the classpath. Make sure they are both the same version. On Tue, Sep 25, 2012 at 5:22 AM, Stephen Walsh wrote: I've packaged and deployed the examples page to JBoss AS 7.1.1 and the date picker page works just fine; however, when I package and deploy my own application, I get the following error javax.servlet.ServletException: Filter execution threw an exception root cause java.lang.NoSuchMethodError: org.apache.wicket.Session.getClientInfo()Lorg/apache/wicket/core/request/ClientInfo; org.apache.wicket.extensions.yui.calendar.DateTimeField.getClientTimeZone(DateTimeField.java:315) org.apache.wicket.extensions.yui.calendar.DateTimeField.onBeforeRender(DateTimeField.java:417) org.apache.wicket.Component.internalBeforeRender(Component.java:993) org.apache.wicket.Component.beforeRender(Component.java:1027) org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1743) org.apache.wicket.Component.onBeforeRender(Component.java:3855) org.apache.wicket.markup.html.form.Form.onBeforeRender(Form.java:1706) org.apache.wicket.Component.internalBeforeRender(Component.java:993) org.apache.wicket.Component.beforeRender(Component.java:1027) org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1743) org.apache.wicket.Component.onBeforeRender(Component.java:3855) org.apache.wicket.Page.onBeforeRender(Page.java:826) org.apache.wicket.Component.internalBeforeRender(Component.java:993) org.apache.wicket.Component.beforeRender(Component.java:1027) org.apache.wicket.Component.internalPrepareForRender(Component.java:2228) org.apache.wicket.Page.internalPrepareForRender(Page.java:279) org.apache.wicket.Component.render(Component.java:2310) org.apache.wicket.Page.renderPage(Page.java:1035) org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105) org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:182) org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167) org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784) org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255) org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212) org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283) org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188) org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:244) Any thoughts on why this might happen and how to fix it? Thanks in advance! Stephen Walsh | http://connectwithawalsh.com -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.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: [Announce] wicket-dashboard
https://github.com/decebals/wicket-dashboard (small typo in your previous mail :) Nice job indeed, I will probably use it! :) Best regards, Sebastien. On Tue, Sep 25, 2012 at 2:16 PM, Decebal Suiu wrote: > Hi > > I implemented a simple dashboard for wicket that can be found at > https://github.com/decebals/wicket-dashbaord > You can drag and drop widgets, perform some actions on each widget, add or > remove new widgets, change widget settings, collapse widgets. > > I have a tiny demo application. In this demo I have implemented two widgets > types: a chart widget (using open flash chart) and a text widget (display a > Lorem Ipsum). > > Best regards, > Decebal > > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Announce-wicket-dashboard-tp4652308.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 > >
[Announce] wicket-dashboard
Hi I implemented a simple dashboard for wicket that can be found at https://github.com/decebals/wicket-dashbaord You can drag and drop widgets, perform some actions on each widget, add or remove new widgets, change widget settings, collapse widgets. I have a tiny demo application. In this demo I have implemented two widgets types: a chart widget (using open flash chart) and a text widget (display a Lorem Ipsum). Best regards, Decebal -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Announce-wicket-dashboard-tp4652308.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
X-Forwarded-For handling in method getRemoteAddr()
Hi everyone, I need you input regarding the Wicket WebClientInfo implementation of getRemoteAddr() (extracted from Wicket 1.5.3 but I think it did not change in release 6): ... String remoteAddr = request.getHeader("X-Forwarded-For"); if (remoteAddr == null) { remoteAddr = req.getRemoteAddr(); } else { if (remoteAddr.contains(",")) { // we just want the client remoteAddr = remoteAddr.split(",")[0].trim(); } } return remoteAddr; I am facing the problem that we get the String "unknown" set by some Proxy in the Forwarded-For field. According to the IETF draft this is in fact a valid value: http://tools.ietf.org/html/draft-petersson-forwarded-for-02#section-6 Now unfortunately the the simple null check prevents falling back to the Servlet request based getRemoteAddr which would be more helpful than having a String that is no IP Address. I would suggest something like if (remoteAddr == null || !InetAddressValidator.getInstance().isValid(remoteAddr)) { ... } to ensure that the given value is an IP. What would you say? Bug, Feature or simply unnecessary? ;) Cheers Ben - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket plugin architecture
Hi, The simplest way is to use Wicket's org.apache.wicket.IInitializer class. Just create a Jar (the plugin) that contains the plugin classes and wicket.properties in the root package and a line inside: initializer=com.example.MyInitializer MyInitializer#init(Application) will be called just before MyApp#init(). In this method you can add whatever your plugin provides to the global configuration On Tue, Sep 25, 2012 at 11:35 AM, Michal Wegrzyn wrote: > Dear developers, > > I need to prepare plugin architecture for a Wicket based project. > I've found that open source Hippo CMS ( http://svn.onehippo.org/repos/hippo/ > ) does it, but I am > curious if there are any other projects that do such a thing? > > Do you maybe know this kind of projects or frameworks? > > Are there any important in-depth aspects of Wicket of which should I be aware > of for creating plugin architecture? > > Best regards, > Michal Wegrzyn -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket plugin architecture
Dear developers, I need to prepare plugin architecture for a Wicket based project. I've found that open source Hippo CMS ( http://svn.onehippo.org/repos/hippo/ ) does it, but I am curious if there are any other projects that do such a thing? Do you maybe know this kind of projects or frameworks? Are there any important in-depth aspects of Wicket of which should I be aware of for creating plugin architecture? Best regards, Michal Wegrzyn
Re: Separating a form
Why not using the event handling mechanism ? A small idea : you can use a specific event as a constructor's argument for ContactEditPanel. This event would contain all the necessary information for the display, (what and where) and will also be resent by the onSubmit method. The listeners of this event will perform the post processing logic. François Le 25 sept. 2012 à 09:15, ChambreNoire a écrit : > Hi, > > I have a simple ContactEditPanel which contains a form and a number of > textfields. Up until now I included an AjaxSubmitLink in this panel which, > if the form content is valid, saves/updates the Contact instance contained > in the Panel model. So far so simple. However now I'd like to remove the > link in order that I may, depending on the context in which I use the > ContactEditPanel, place the submit link at different levels of my overall > component hierarchy. For instance in one context I'd like to use to flip > between ContactEditPanel and ContactViewPanel with a bar of actions above > the current view (edit | save , cancel). Another context would be to use > ContactEditPanel in a standalone way (maybe part of a multi-step process) > with just a save link below. > > I was contemplating refactoring my ContactEditPanel to extends > FormComponentPanel rather than Panel as described here but I'm not sure > whether this is the right approach and I'm having trouble wrapping my head > around this. > > Any help would be most appreciated! > > Many Thanks, > > CN > > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Separating-a-form-tp4652301.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: Autocomplete Problem on Chrome
Thanks. Although I would prefer to solve the bug in our framework, I'll take some time to integrate Igor's js library. I saw it in action and I was excited. Regards. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Autocomplete-Problem-on-Chrome-tp4652290p4652302.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
Separating a form
Hi, I have a simple ContactEditPanel which contains a form and a number of textfields. Up until now I included an AjaxSubmitLink in this panel which, if the form content is valid, saves/updates the Contact instance contained in the Panel model. So far so simple. However now I'd like to remove the link in order that I may, depending on the context in which I use the ContactEditPanel, place the submit link at different levels of my overall component hierarchy. For instance in one context I'd like to use to flip between ContactEditPanel and ContactViewPanel with a bar of actions above the current view (edit | save , cancel). Another context would be to use ContactEditPanel in a standalone way (maybe part of a multi-step process) with just a save link below. I was contemplating refactoring my ContactEditPanel to extends FormComponentPanel rather than Panel as described here but I'm not sure whether this is the right approach and I'm having trouble wrapping my head around this. Any help would be most appreciated! Many Thanks, CN -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Separating-a-form-tp4652301.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: DatePicker Error
Hi, It seems you have mixed versions of wicket-datetime and wicket-core in the classpath. Make sure they are both the same version. On Tue, Sep 25, 2012 at 5:22 AM, Stephen Walsh wrote: > I've packaged and deployed the examples page to JBoss AS 7.1.1 and the date > picker page works just fine; however, when I package and deploy my own > application, I get the following error > > javax.servlet.ServletException: Filter execution threw an exception > > root cause > > java.lang.NoSuchMethodError: > org.apache.wicket.Session.getClientInfo()Lorg/apache/wicket/core/request/ClientInfo; > > org.apache.wicket.extensions.yui.calendar.DateTimeField.getClientTimeZone(DateTimeField.java:315) > > org.apache.wicket.extensions.yui.calendar.DateTimeField.onBeforeRender(DateTimeField.java:417) > org.apache.wicket.Component.internalBeforeRender(Component.java:993) > org.apache.wicket.Component.beforeRender(Component.java:1027) > > org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1743) > org.apache.wicket.Component.onBeforeRender(Component.java:3855) > org.apache.wicket.markup.html.form.Form.onBeforeRender(Form.java:1706) > org.apache.wicket.Component.internalBeforeRender(Component.java:993) > org.apache.wicket.Component.beforeRender(Component.java:1027) > > org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1743) > org.apache.wicket.Component.onBeforeRender(Component.java:3855) > org.apache.wicket.Page.onBeforeRender(Page.java:826) > org.apache.wicket.Component.internalBeforeRender(Component.java:993) > org.apache.wicket.Component.beforeRender(Component.java:1027) > > org.apache.wicket.Component.internalPrepareForRender(Component.java:2228) > org.apache.wicket.Page.internalPrepareForRender(Page.java:279) > org.apache.wicket.Component.render(Component.java:2310) > org.apache.wicket.Page.renderPage(Page.java:1035) > > org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105) > > org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:182) > > org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167) > > org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784) > > org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) > > org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255) > > org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212) > > org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283) > > org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188) > > org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:244) > Any thoughts on why this might happen and how to fix it? > > Thanks in advance! > > > Stephen Walsh | http://connectwithawalsh.com > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org