Re: WebApplication.get().getSharedResources.remove()
can i ask why are you dismounting? create your resourcereference that returns your resource,use resourcereference for mounting and Key key =new Key(your ResourceReference) you should also read a very nice martin-g's article on how to mount resources in wicket 1.5 http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/comment-page-1/ On Wed, Dec 7, 2011 at 12:28 PM, John Toncart wrote: > Hi folks, > > in 1.4 I was doing (pseudo code, real code is longer): > > public class MyPage extends WebPage > { > public MyPage() > { > ... > DynamicImageResource image = new DynamicImageResource(); > image.setImageData(_my_generated_byte_array_); > ... > MyApp.get().getSharedResources().remove("/my/custom/resource.jpg"); > MyApp.get().getSharedResources().add("/my/custom/resource_new", > image); > ... > } > } > > Not know if it's optimal but it works and resources are dynamicaly > mounted and dismounted. > > In 1.5 I can't do: > MyApp.get().getSharedResources().remove("/my/custom/resource.jpg"); > because remove() method in 1.5 needs "ResourceReference.Key" > > Is there example how to work with remove() in 1.5 or how to rewrite > my code in example above? > > Thanks, > > JT > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- thank you, regards, Vineet Semwal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Integrating Google maps with wicket web application
Thanks Martin. On Wed, Dec 7, 2011 at 10:13 AM, Martin Grigorov wrote: > http://repo1.maven.org/maven2/org/wicketstuff/wicketstuff-gmap2/1.5.3/ > > This is the latest version > > On Wed, Dec 7, 2011 at 8:12 AM, raju.ch > wrote: > > Thank you very much josh > > > > -- > > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Integrating-Google-maps-with-wicket-web-application-tp4167839p4167944.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: Integrating Google maps with wicket web application
http://repo1.maven.org/maven2/org/wicketstuff/wicketstuff-gmap2/1.5.3/ This is the latest version On Wed, Dec 7, 2011 at 8:12 AM, raju.ch wrote: > Thank you very much josh > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Integrating-Google-maps-with-wicket-web-application-tp4167839p4167944.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: Integrating Google maps with wicket web application
Thank you very much josh -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Integrating-Google-maps-with-wicket-web-application-tp4167839p4167944.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
WebApplication.get().getSharedResources.remove()
Hi folks, in 1.4 I was doing (pseudo code, real code is longer): public class MyPage extends WebPage { public MyPage() { ... DynamicImageResource image = new DynamicImageResource(); image.setImageData(_my_generated_byte_array_); ... MyApp.get().getSharedResources().remove("/my/custom/resource.jpg"); MyApp.get().getSharedResources().add("/my/custom/resource_new", image); ... } } Not know if it's optimal but it works and resources are dynamicaly mounted and dismounted. In 1.5 I can't do: MyApp.get().getSharedResources().remove("/my/custom/resource.jpg"); because remove() method in 1.5 needs "ResourceReference.Key" Is there example how to work with remove() in 1.5 or how to rewrite my code in example above? Thanks, JT - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Integrating Google maps with wicket web application
The URL https://wicket-stuff.svn.sf.net/svnroot/wicket-stuff/trunk/wicketstuff-core/gmap2-parent is not working it seems -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Integrating-Google-maps-with-wicket-web-application-tp4167839p4167883.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: Integrating Google maps with wicket web application
where can i find this JAR or Can you share me the url? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Integrating-Google-maps-with-wicket-web-application-tp4167839p4167880.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: Integrating Google maps with wicket web application
Yes . Google for Wicket gmap2 component. I think its in wicketstuff project. regards. Josh. On Wed, Dec 7, 2011 at 9:36 AM, raju.ch wrote: > Hi folks, > Is there any plugin or component directly in wicket for Integrating Google > maps? > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Integrating-Google-maps-with-wicket-web-application-tp4167839p4167839.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 > >
Convert wicket ajax posts do wicket ajax get requests
I am having issues with IE and ajax post requests. The issue is reported here: http://support.microsoft.com/kb/895954 As a way to address the issue, I was thinking of addressing the application. There are several places with ajax post requests. I was trying to see if I can convert those requests to wicket ajax gets requests. I am talking about radio buttons and onchange drop down boxes. In this behavior, how would I make a change to use wicketAjaxGet and keep the general functionality? public abstract class AjaxFormChoiceComponentUpdatingBehavior extends AbstractDefaultAjaxBehavior: protected final CharSequence getEventHandler() { return generateCallbackScript(new AppendingStringBuffer("wicketAjaxPost('").append( getCallbackUrl()).append( "', wicketSerializeForm(document.getElementById('" + getComponent().getMarkupId() + "',false))")); }
RE: ConcurrentModificationException
Should I use scheduleRequestHandlerAfterCurrent instead of replaceAllRequestHandlers ? -Original Message- From: Fang Lin [mailto:fang...@u.washington.edu] Sent: Tuesday, December 06, 2011 3:39 PM To: users@wicket.apache.org Subject: RE: ConcurrentModificationException I have just run into the ConcurrentModificationException on my dev server. Not that I can reproduce it, but I got more details: 1. my session has expired 2. the PageExpiredErrorPage SessionErr was invoked. Internally it executed this statement: public SessionErr () { super (); log.info ("Before replaceAllRequestHandlers"); getRequestCycle().replaceAllRequestHandlers (new SessionErrHandler()); // <=== } 3. SessionErrHandler was created, public SessionErrHandler() { super(LOG_BACKIN_URL); log.info ("RedirectRequest"); } Log: INFO 06 15:23:58.755 Before replaceAllRequestHandlers [m.p.SessionErr] INFO 06 15:23:58.755 RedirectRequest [m.SessionErrHandler] INFO 06 15:23:58.760 Before replaceAllRequestHandlers [m.p.SessionErr] INFO 06 15:23:58.760 RedirectRequest [m.SessionErrHandler] On the browser, HTTP Status 500 - java.util.ConcurrentModificationException java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372) java.util.AbstractList$Itr.next(AbstractList.java:343) org.apache.wicket.request.RequestHandlerStack.detach(RequestHandlerStack.java:176) org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.java:565) org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java:508) org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:284) org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162) org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218) -Original Message- From: Fang Lin [mailto:fang...@u.washington.edu] Sent: Tuesday, December 06, 2011 2:06 PM To: users@wicket.apache.org Subject: RE: ConcurrentModificationException I have been trying to reproduce it on our dev server this morning, but could not. However I did run into it twice on our production server yesterday. I wonder if you could answer my question "Is this exception handler invoked before or after the ErrorPages ?" -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Tuesday, December 06, 2011 12:47 PM To: users@wicket.apache.org Subject: Re: ConcurrentModificationException No, I don't see anything wrong here. If you are able to reproduce it then we can debug it. On Tue, Dec 6, 2011 at 9:40 PM, Fang Lin wrote: > Thanks, Martin! > > In the init(), I have: > { > getMarkupSettings().setStripWicketTags(true); > > IApplicationSettings settings = getApplicationSettings(); > settings.setAccessDeniedPage(AccessErr.class); > settings.setPageExpiredErrorPage(SessionErr.class); > settings.setInternalErrorPage(InternalErr.class); > > // #2 starts > getRequestCycleListeners().add(new AbstractRequestCycleListener() > { > > public IRequestHandler onException(RequestCycle cycle, > Exception e) > { > return new RedirectRequestHandler (ERROR_PAGE_URL); > } > }); > // #2 ends > } > Could the #2 code block be the cause? Is this exception handler invoked > before or after the ErrorPages ? > > Our authentication strategy is set up at Apache level. > This is what SessionErr class does: > getRequestCycle().replaceAllRequestHandlers (new SessionErrHandler()); > > And SessionErrHandler redirect to the Login Servlet. And the Login Servlet > will be routed to the WebLogin server. > > -Original Message- > From: Martin Grigorov [mailto:mgrigo...@apache.org] > Sent: Monday, December 05, 2011 11:59 PM > To: users@wicket.apache.org > Subject: Re: ConcurrentModificationException > > Hi, > > I don't see how this may happen. > The execution of RequestCycle is single threaded. > Do you have RequestCycleListener or something similar where you start another > thread and you use the same instance of RequestCycle ? > > On Tue, Dec 6, 2011 at 2:31 AM, Fang Lin wrote: >> When clicking on a link (i.e., ?5-1.ILinkListener-...) after a session >> expired, this error page shows up on my browser window: >> Exception report >> message >> description The server encountered an internal error () that prevented it >> from fulfilling this request. >> exception >> java.util.ConcurrentModificationException >> >> java.util.AbstractList$Itr.checkForComodification(AbstractList.java:3 >> 7 >> 2) >> >> java.util.AbstractList$Itr.next(AbstractList.java:343) >> >> org.apache.wicket.request.RequestHandlerStack.detach(RequestHandlerSt >> a >> ck.java:176) >> >> org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.ja >> v >> a:565) >> >> org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java: >> 508) >> >> org.apache.wicket.request.cycle.Reques
RE: ConcurrentModificationException
I have just run into the ConcurrentModificationException on my dev server. Not that I can reproduce it, but I got more details: 1. my session has expired 2. the PageExpiredErrorPage SessionErr was invoked. Internally it executed this statement: public SessionErr () { super (); log.info ("Before replaceAllRequestHandlers"); getRequestCycle().replaceAllRequestHandlers (new SessionErrHandler()); } 3. SessionErrHandler was created, public SessionErrHandler() { super(LOG_BACKIN_URL); log.info ("RedirectRequest"); } Log: INFO 06 15:23:58.755 Before replaceAllRequestHandlers [m.p.SessionErr] INFO 06 15:23:58.755 RedirectRequest [m.SessionErrHandler] INFO 06 15:23:58.760 Before replaceAllRequestHandlers [m.p.SessionErr] INFO 06 15:23:58.760 RedirectRequest [m.SessionErrHandler] On the browser, HTTP Status 500 - java.util.ConcurrentModificationException java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372) java.util.AbstractList$Itr.next(AbstractList.java:343) org.apache.wicket.request.RequestHandlerStack.detach(RequestHandlerStack.java:176) org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.java:565) org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java:508) org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:284) org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162) org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218) -Original Message- From: Fang Lin [mailto:fang...@u.washington.edu] Sent: Tuesday, December 06, 2011 2:06 PM To: users@wicket.apache.org Subject: RE: ConcurrentModificationException I have been trying to reproduce it on our dev server this morning, but could not. However I did run into it twice on our production server yesterday. I wonder if you could answer my question "Is this exception handler invoked before or after the ErrorPages ?" -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Tuesday, December 06, 2011 12:47 PM To: users@wicket.apache.org Subject: Re: ConcurrentModificationException No, I don't see anything wrong here. If you are able to reproduce it then we can debug it. On Tue, Dec 6, 2011 at 9:40 PM, Fang Lin wrote: > Thanks, Martin! > > In the init(), I have: > { > getMarkupSettings().setStripWicketTags(true); > > IApplicationSettings settings = getApplicationSettings(); > settings.setAccessDeniedPage(AccessErr.class); > settings.setPageExpiredErrorPage(SessionErr.class); > settings.setInternalErrorPage(InternalErr.class); > > // #2 starts > getRequestCycleListeners().add(new AbstractRequestCycleListener() { > > public IRequestHandler onException(RequestCycle cycle, Exception e) > { > return new RedirectRequestHandler (ERROR_PAGE_URL); > } > }); > // #2 ends > } > Could the #2 code block be the cause? Is this exception handler invoked > before or after the ErrorPages ? > > Our authentication strategy is set up at Apache level. > This is what SessionErr class does: > getRequestCycle().replaceAllRequestHandlers (new SessionErrHandler()); > > And SessionErrHandler redirect to the Login Servlet. And the Login Servlet > will be routed to the WebLogin server. > > -Original Message- > From: Martin Grigorov [mailto:mgrigo...@apache.org] > Sent: Monday, December 05, 2011 11:59 PM > To: users@wicket.apache.org > Subject: Re: ConcurrentModificationException > > Hi, > > I don't see how this may happen. > The execution of RequestCycle is single threaded. > Do you have RequestCycleListener or something similar where you start another > thread and you use the same instance of RequestCycle ? > > On Tue, Dec 6, 2011 at 2:31 AM, Fang Lin wrote: >> When clicking on a link (i.e., ?5-1.ILinkListener-...) after a session >> expired, this error page shows up on my browser window: >> Exception report >> message >> description The server encountered an internal error () that prevented it >> from fulfilling this request. >> exception >> java.util.ConcurrentModificationException >> >> java.util.AbstractList$Itr.checkForComodification(AbstractList.java:37 >> 2) >> >> java.util.AbstractList$Itr.next(AbstractList.java:343) >> >> org.apache.wicket.request.RequestHandlerStack.detach(RequestHandlerSta >> ck.java:176) >> >> org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.jav >> a:565) >> >> org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java: >> 508) >> >> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(R >> equestCycle.java:284) >> >> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilt >> er.java:162) >> >> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.jav >> a:218) >> at >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
RE: ConcurrentModificationException
I noticed that there are only two types of exceptions handled by this handler so far: 1. WicketRuntimeException : Method onFormSubmitted of interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at [SearchForm [Component id = search_form]] on component [SearchForm [Component id = search_form]] threw an exception 2. org.apache.wicket.request.mapper.StalePageException Could an expired session be the underline cause for both cases? -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Tuesday, December 06, 2011 2:29 PM To: users@wicket.apache.org Subject: Re: ConcurrentModificationException On Tue, Dec 6, 2011 at 11:06 PM, Fang Lin wrote: > I have been trying to reproduce it on our dev server this morning, but could > not. However I did run into it twice on our production server yesterday. > > I wonder if you could answer my question "Is this exception handler invoked > before or after the ErrorPages ?" It is called before. This is the place where your app can handle the problem. If this method return null then Wicket falls back to the default handling of exceptions (see DefaultExceptionMapper). But in your case you always redirect to another page - ERROR_PAGE_URL. > > -Original Message- > From: Martin Grigorov [mailto:mgrigo...@apache.org] > Sent: Tuesday, December 06, 2011 12:47 PM > To: users@wicket.apache.org > Subject: Re: ConcurrentModificationException > > No, I don't see anything wrong here. > If you are able to reproduce it then we can debug it. > > On Tue, Dec 6, 2011 at 9:40 PM, Fang Lin wrote: >> Thanks, Martin! >> >> In the init(), I have: >> { >> getMarkupSettings().setStripWicketTags(true); >> >> IApplicationSettings settings = getApplicationSettings(); >> settings.setAccessDeniedPage(AccessErr.class); >> settings.setPageExpiredErrorPage(SessionErr.class); >> settings.setInternalErrorPage(InternalErr.class); >> >> // #2 starts >> getRequestCycleListeners().add(new AbstractRequestCycleListener() >> { >> >> public IRequestHandler onException(RequestCycle cycle, >> Exception e) >> { >> return new RedirectRequestHandler (ERROR_PAGE_URL); >> } >> }); >> // #2 ends >> } >> Could the #2 code block be the cause? Is this exception handler invoked >> before or after the ErrorPages ? >> >> Our authentication strategy is set up at Apache level. >> This is what SessionErr class does: >> getRequestCycle().replaceAllRequestHandlers (new >> SessionErrHandler()); >> >> And SessionErrHandler redirect to the Login Servlet. And the Login Servlet >> will be routed to the WebLogin server. >> >> -Original Message- >> From: Martin Grigorov [mailto:mgrigo...@apache.org] >> Sent: Monday, December 05, 2011 11:59 PM >> To: users@wicket.apache.org >> Subject: Re: ConcurrentModificationException >> >> Hi, >> >> I don't see how this may happen. >> The execution of RequestCycle is single threaded. >> Do you have RequestCycleListener or something similar where you start >> another thread and you use the same instance of RequestCycle ? >> >> On Tue, Dec 6, 2011 at 2:31 AM, Fang Lin wrote: >>> When clicking on a link (i.e., ?5-1.ILinkListener-...) after a session >>> expired, this error page shows up on my browser window: >>> Exception report >>> message >>> description The server encountered an internal error () that prevented it >>> from fulfilling this request. >>> exception >>> java.util.ConcurrentModificationException >>> >>> java.util.AbstractList$Itr.checkForComodification(AbstractList.java: >>> 37 >>> 2) >>> >>> java.util.AbstractList$Itr.next(AbstractList.java:343) >>> >>> org.apache.wicket.request.RequestHandlerStack.detach(RequestHandlerS >>> ta >>> ck.java:176) >>> >>> org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.j >>> av >>> a:565) >>> >>> org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java: >>> 508) >>> >>> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach >>> (R >>> equestCycle.java:284) >>> >>> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFi >>> lt >>> er.java:162) >>> >>> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.j >>> av >>> a:218) >>> at >>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App >>> li >>> cationFilterChain.java:235) >>> at >>> org.apache.catalina.core.ApplicationFilterChain.doFilter(Application >>> Fi >>> lterChain.java:206) >>> at >>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapper >>> Va >>> lve.java:233) >>> at >>> org.apache.catalina.core.StandardContextValve.invoke(StandardContext >>> Va >>> lve.java:191) >>> at >>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve. >>> ja >>> va:127) >>> at >>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve. >>> ja >>> va:102) >>> at >>> org.apache.catalina.core.StandardE
Re: ConcurrentModificationException
On Tue, Dec 6, 2011 at 11:06 PM, Fang Lin wrote: > I have been trying to reproduce it on our dev server this morning, but could > not. However I did run into it twice on our production server yesterday. > > I wonder if you could answer my question "Is this exception handler invoked > before or after the ErrorPages ?" It is called before. This is the place where your app can handle the problem. If this method return null then Wicket falls back to the default handling of exceptions (see DefaultExceptionMapper). But in your case you always redirect to another page - ERROR_PAGE_URL. > > -Original Message- > From: Martin Grigorov [mailto:mgrigo...@apache.org] > Sent: Tuesday, December 06, 2011 12:47 PM > To: users@wicket.apache.org > Subject: Re: ConcurrentModificationException > > No, I don't see anything wrong here. > If you are able to reproduce it then we can debug it. > > On Tue, Dec 6, 2011 at 9:40 PM, Fang Lin wrote: >> Thanks, Martin! >> >> In the init(), I have: >> { >> getMarkupSettings().setStripWicketTags(true); >> >> IApplicationSettings settings = getApplicationSettings(); >> settings.setAccessDeniedPage(AccessErr.class); >> settings.setPageExpiredErrorPage(SessionErr.class); >> settings.setInternalErrorPage(InternalErr.class); >> >> // #2 starts >> getRequestCycleListeners().add(new AbstractRequestCycleListener() { >> >> public IRequestHandler onException(RequestCycle cycle, Exception e) >> { >> return new RedirectRequestHandler (ERROR_PAGE_URL); >> } >> }); >> // #2 ends >> } >> Could the #2 code block be the cause? Is this exception handler invoked >> before or after the ErrorPages ? >> >> Our authentication strategy is set up at Apache level. >> This is what SessionErr class does: >> getRequestCycle().replaceAllRequestHandlers (new SessionErrHandler()); >> >> And SessionErrHandler redirect to the Login Servlet. And the Login Servlet >> will be routed to the WebLogin server. >> >> -Original Message- >> From: Martin Grigorov [mailto:mgrigo...@apache.org] >> Sent: Monday, December 05, 2011 11:59 PM >> To: users@wicket.apache.org >> Subject: Re: ConcurrentModificationException >> >> Hi, >> >> I don't see how this may happen. >> The execution of RequestCycle is single threaded. >> Do you have RequestCycleListener or something similar where you start >> another thread and you use the same instance of RequestCycle ? >> >> On Tue, Dec 6, 2011 at 2:31 AM, Fang Lin wrote: >>> When clicking on a link (i.e., ?5-1.ILinkListener-...) after a session >>> expired, this error page shows up on my browser window: >>> Exception report >>> message >>> description The server encountered an internal error () that prevented it >>> from fulfilling this request. >>> exception >>> java.util.ConcurrentModificationException >>> >>> java.util.AbstractList$Itr.checkForComodification(AbstractList.java:37 >>> 2) >>> >>> java.util.AbstractList$Itr.next(AbstractList.java:343) >>> >>> org.apache.wicket.request.RequestHandlerStack.detach(RequestHandlerSta >>> ck.java:176) >>> >>> org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.jav >>> a:565) >>> >>> org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java: >>> 508) >>> >>> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(R >>> equestCycle.java:284) >>> >>> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilt >>> er.java:162) >>> >>> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.jav >>> a:218) >>> at >>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli >>> cationFilterChain.java:235) >>> at >>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi >>> lterChain.java:206) >>> at >>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa >>> lve.java:233) >>> at >>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa >>> lve.java:191) >>> at >>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja >>> va:127) >>> at >>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja >>> va:102) >>> at >>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv >>> e.java:109) >>> at >>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java >>> :298) >>> at >>> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) >>> at >>> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) >>> at >>> org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774) >>> at >>> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.jav >>> a:703) >>> at >>> org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocke >>> t.java:896) >>> at >>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPo >>> ol.java:690) >>> a
RE: ConcurrentModificationException
I have been trying to reproduce it on our dev server this morning, but could not. However I did run into it twice on our production server yesterday. I wonder if you could answer my question "Is this exception handler invoked before or after the ErrorPages ?" -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Tuesday, December 06, 2011 12:47 PM To: users@wicket.apache.org Subject: Re: ConcurrentModificationException No, I don't see anything wrong here. If you are able to reproduce it then we can debug it. On Tue, Dec 6, 2011 at 9:40 PM, Fang Lin wrote: > Thanks, Martin! > > In the init(), I have: > { > getMarkupSettings().setStripWicketTags(true); > > IApplicationSettings settings = getApplicationSettings(); > settings.setAccessDeniedPage(AccessErr.class); > settings.setPageExpiredErrorPage(SessionErr.class); > settings.setInternalErrorPage(InternalErr.class); > > // #2 starts > getRequestCycleListeners().add(new AbstractRequestCycleListener() { > > public IRequestHandler onException(RequestCycle cycle, Exception e) > { > return new RedirectRequestHandler (ERROR_PAGE_URL); > } > }); > // #2 ends > } > Could the #2 code block be the cause? Is this exception handler invoked > before or after the ErrorPages ? > > Our authentication strategy is set up at Apache level. > This is what SessionErr class does: > getRequestCycle().replaceAllRequestHandlers (new SessionErrHandler()); > > And SessionErrHandler redirect to the Login Servlet. And the Login Servlet > will be routed to the WebLogin server. > > -Original Message- > From: Martin Grigorov [mailto:mgrigo...@apache.org] > Sent: Monday, December 05, 2011 11:59 PM > To: users@wicket.apache.org > Subject: Re: ConcurrentModificationException > > Hi, > > I don't see how this may happen. > The execution of RequestCycle is single threaded. > Do you have RequestCycleListener or something similar where you start another > thread and you use the same instance of RequestCycle ? > > On Tue, Dec 6, 2011 at 2:31 AM, Fang Lin wrote: >> When clicking on a link (i.e., ?5-1.ILinkListener-...) after a session >> expired, this error page shows up on my browser window: >> Exception report >> message >> description The server encountered an internal error () that prevented it >> from fulfilling this request. >> exception >> java.util.ConcurrentModificationException >> >> java.util.AbstractList$Itr.checkForComodification(AbstractList.java:37 >> 2) >> >> java.util.AbstractList$Itr.next(AbstractList.java:343) >> >> org.apache.wicket.request.RequestHandlerStack.detach(RequestHandlerSta >> ck.java:176) >> >> org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.jav >> a:565) >> >> org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java: >> 508) >> >> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(R >> equestCycle.java:284) >> >> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilt >> er.java:162) >> >> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.jav >> a:218) >> at >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli >> cationFilterChain.java:235) >> at >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi >> lterChain.java:206) >> at >> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa >> lve.java:233) >> at >> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa >> lve.java:191) >> at >> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja >> va:127) >> at >> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja >> va:102) >> at >> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv >> e.java:109) >> at >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java >> :298) >> at >> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) >> at >> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) >> at >> org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774) >> at >> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.jav >> a:703) >> at >> org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocke >> t.java:896) >> at >> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPo >> ol.java:690) >> at java.lang.Thread.run(Thread.java:662) >> This ConcurrentModificationException occurs about 70+ times on an >> application server daily. >> Wicket version 1.5.3. >> Any suggestion on how to avoid this? >> In the init method of sub-class of the WebApplication , I have: >> IApplicationSettings settings = getApplicationSettings(); >> settings.setAccessDeniedPage(AccessErr.class); >> settings.setPageExpiredErrorPage(SessionErr.class); >> settings.setIn
Re: ConcurrentModificationException
No, I don't see anything wrong here. If you are able to reproduce it then we can debug it. On Tue, Dec 6, 2011 at 9:40 PM, Fang Lin wrote: > Thanks, Martin! > > In the init(), I have: > { > getMarkupSettings().setStripWicketTags(true); > > IApplicationSettings settings = getApplicationSettings(); > settings.setAccessDeniedPage(AccessErr.class); > settings.setPageExpiredErrorPage(SessionErr.class); > settings.setInternalErrorPage(InternalErr.class); > > // #2 starts > getRequestCycleListeners().add(new AbstractRequestCycleListener() { > > public IRequestHandler onException(RequestCycle cycle, Exception e) > { > return new RedirectRequestHandler (ERROR_PAGE_URL); > } > }); > // #2 ends > } > Could the #2 code block be the cause? Is this exception handler invoked > before or after the ErrorPages ? > > Our authentication strategy is set up at Apache level. > This is what SessionErr class does: > getRequestCycle().replaceAllRequestHandlers (new SessionErrHandler()); > > And SessionErrHandler redirect to the Login Servlet. And the Login Servlet > will be routed to the WebLogin server. > > -Original Message- > From: Martin Grigorov [mailto:mgrigo...@apache.org] > Sent: Monday, December 05, 2011 11:59 PM > To: users@wicket.apache.org > Subject: Re: ConcurrentModificationException > > Hi, > > I don't see how this may happen. > The execution of RequestCycle is single threaded. > Do you have RequestCycleListener or something similar where you start another > thread and you use the same instance of RequestCycle ? > > On Tue, Dec 6, 2011 at 2:31 AM, Fang Lin wrote: >> When clicking on a link (i.e., ?5-1.ILinkListener-...) after a session >> expired, this error page shows up on my browser window: >> Exception report >> message >> description The server encountered an internal error () that prevented it >> from fulfilling this request. >> exception >> java.util.ConcurrentModificationException >> >> java.util.AbstractList$Itr.checkForComodification(AbstractList.java:37 >> 2) >> >> java.util.AbstractList$Itr.next(AbstractList.java:343) >> >> org.apache.wicket.request.RequestHandlerStack.detach(RequestHandlerSta >> ck.java:176) >> >> org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.jav >> a:565) >> >> org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java: >> 508) >> >> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(R >> equestCycle.java:284) >> >> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilt >> er.java:162) >> >> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.jav >> a:218) >> at >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli >> cationFilterChain.java:235) >> at >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi >> lterChain.java:206) >> at >> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa >> lve.java:233) >> at >> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa >> lve.java:191) >> at >> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja >> va:127) >> at >> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja >> va:102) >> at >> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv >> e.java:109) >> at >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java >> :298) >> at >> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) >> at >> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) >> at >> org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774) >> at >> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.jav >> a:703) >> at >> org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocke >> t.java:896) >> at >> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPo >> ol.java:690) >> at java.lang.Thread.run(Thread.java:662) >> This ConcurrentModificationException occurs about 70+ times on an >> application server daily. >> Wicket version 1.5.3. >> Any suggestion on how to avoid this? >> In the init method of sub-class of the WebApplication , I have: >> IApplicationSettings settings = getApplicationSettings(); >> settings.setAccessDeniedPage(AccessErr.class); >> settings.setPageExpiredErrorPage(SessionErr.class); >> settings.setInternalErrorPage(InternalErr.class); >> When a session expired, should it invoke the PageExpiredErrorPage? > > Yes. You make a request to a page, Wicket searches for this page in the > stores, doesn't find it and throws PageExpiredException. > But, if the request url has the mount path then Wicket will create a new Page > instance instead. If you have authentication strategy set up then you go to > the Login page, otherwise this page will be rendered. > >
RE: ConcurrentModificationException
Thanks, Martin! In the init(), I have: { getMarkupSettings().setStripWicketTags(true); IApplicationSettings settings = getApplicationSettings(); settings.setAccessDeniedPage(AccessErr.class); settings.setPageExpiredErrorPage(SessionErr.class); settings.setInternalErrorPage(InternalErr.class); // #2 starts getRequestCycleListeners().add(new AbstractRequestCycleListener() { public IRequestHandler onException(RequestCycle cycle, Exception e) { return new RedirectRequestHandler (ERROR_PAGE_URL); } }); // #2 ends } Could the #2 code block be the cause? Is this exception handler invoked before or after the ErrorPages ? Our authentication strategy is set up at Apache level. This is what SessionErr class does: getRequestCycle().replaceAllRequestHandlers (new SessionErrHandler()); And SessionErrHandler redirect to the Login Servlet. And the Login Servlet will be routed to the WebLogin server. -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Monday, December 05, 2011 11:59 PM To: users@wicket.apache.org Subject: Re: ConcurrentModificationException Hi, I don't see how this may happen. The execution of RequestCycle is single threaded. Do you have RequestCycleListener or something similar where you start another thread and you use the same instance of RequestCycle ? On Tue, Dec 6, 2011 at 2:31 AM, Fang Lin wrote: > When clicking on a link (i.e., ?5-1.ILinkListener-...) after a session > expired, this error page shows up on my browser window: > Exception report > message > description The server encountered an internal error () that prevented it > from fulfilling this request. > exception > java.util.ConcurrentModificationException > > java.util.AbstractList$Itr.checkForComodification(AbstractList.java:37 > 2) > > java.util.AbstractList$Itr.next(AbstractList.java:343) > > org.apache.wicket.request.RequestHandlerStack.detach(RequestHandlerSta > ck.java:176) > > org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.jav > a:565) > > org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java: > 508) > > org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(R > equestCycle.java:284) > > org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilt > er.java:162) > > org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.jav > a:218) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli > cationFilterChain.java:235) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi > lterChain.java:206) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa > lve.java:233) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa > lve.java:191) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja > va:127) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja > va:102) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv > e.java:109) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java > :298) > at > org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) > at > org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) > at > org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774) > at > org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.jav > a:703) > at > org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocke > t.java:896) > at > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPo > ol.java:690) > at java.lang.Thread.run(Thread.java:662) > This ConcurrentModificationException occurs about 70+ times on an application > server daily. > Wicket version 1.5.3. > Any suggestion on how to avoid this? > In the init method of sub-class of the WebApplication , I have: > IApplicationSettings settings = getApplicationSettings(); > settings.setAccessDeniedPage(AccessErr.class); > settings.setPageExpiredErrorPage(SessionErr.class); > settings.setInternalErrorPage(InternalErr.class); > When a session expired, should it invoke the PageExpiredErrorPage? Yes. You make a request to a page, Wicket searches for this page in the stores, doesn't find it and throws PageExpiredException. But, if the request url has the mount path then Wicket will create a new Page instance instead. If you have authentication strategy set up then you go to the Login page, otherwise this page will be rendered. If you are able to reproduce the problem in a quickstart attach it to Jira so we can debug it. Thanks! > -Fang > > -- Ma
AjaxPagingNavigation not updating DataView
I have created AjaxPagingNavigation which is supposed to update a DataView The problem is that when clicking on a page number link to go to another page, the data view does not get updated. When the page is loaded for the first time there are no problems.. but when clicking on the page number link, the onBeforeRender() of the dataview is never called again, so it doesn't even call the populate method of the dataview or the iterator method of the data provider. but I have noticed that AjaxPagingNavigationLink.onClick(AjaxRequestTarget target) is being called. Any ideas? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxPagingNavigation-not-updating-DataView-tp4166358p4166358.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: Event or Notice when a ListView's Model changes
But when the event is processed, I'm not in an AjaxRequest. Anyway, I have something working, now, I am able to update a version field (by sending an inter-component event in the onBeforeRender() of the ListView that has it's own Form; the Event is processed by another Form at the top of the same Panel - that's where the version field is), but I still need an AbstractAjaxTimerBehavior - now at 3 seconds - to make the updates visible for the user. That worries me, I would like to have an update interval of a second, or even less, but I wonder if this is wise. My solution now on the receiving side looks something like: add(new AbstractAjaxTimerBehavior(Duration.seconds(3)) { // add to the Fom @Override public void onEvent(Component component, IEvent event) { if (event.getPayload() instanceof ProcessReadyNotfication) { ==> Update VersionField super.onEvent(component, event); } } @Override protected void onTimer(AjaxRequestTarget target) { // This can take up to 3 seconds! target.add(VersionField); } }); Of course, I would like something like: @Override public void onEvent(Component component, IEvent event) { if (event.getPayload() instanceof ProcessReadyNotfication) { ==> Update VersionField target.add(VersionField); super.onEvent(component, event); } } But I don't have a AjaxRequestTarget there, and obtaining one by AjaxRequestTarget.get() causes an IllegalStateException (As far as I can remember). -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Event-or-Notice-when-a-ListView-s-Model-changes-tp4157030p4166278.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: problems with AjaxFallbackLink on IE
In fallback mode the entire page is being rendered, so there's no need to identify particular components that changed. Why it's falling back is perhaps an IE issue, but I think you should be prepared for null as Nicklas suggests. On Tue, Dec 6, 2011 at 11:02 AM, cosmindumy wrote: > > Yes, IE is famous with its restrictions installed on a Server version > of Windows. > Some setting disallows Ajax.. > > But why on other machines it works. Is a problem with my IE? > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/problems-with-AjaxFallbackLink-on-IE-tp4165457p4166036.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: problems with AjaxFallbackLink on IE
On Tue, Dec 6, 2011 at 8:02 PM, cosmindumy wrote: > > Yes, IE is famous with its restrictions installed on a Server version > of Windows. > Some setting disallows Ajax.. > > But why on other machines it works. Is a problem with my IE? I think so. Play with its settings (options) and see whether this will help. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/problems-with-AjaxFallbackLink-on-IE-tp4165457p4166036.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: problems with AjaxFallbackLink on IE
> I believe target is null when you're in "fallback" mode with an > AjaxFallbackLink. You'll need to check for null and handle things > accordingly, as though it were a normal link. What means fallback mode? how can I refresh the component if target is null? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/problems-with-AjaxFallbackLink-on-IE-tp4165457p4166045.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: problems with AjaxFallbackLink on IE
Yes, IE is famous with its restrictions installed on a Server version of Windows. Some setting disallows Ajax.. But why on other machines it works. Is a problem with my IE? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/problems-with-AjaxFallbackLink-on-IE-tp4165457p4166036.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: problems with AjaxFallbackLink on IE
On Tue, Dec 6, 2011 at 7:48 PM, Nicklas Johnson wrote: > I believe target is null when you're in "fallback" mode with an > AjaxFallbackLink. You'll need to check for null and handle things > accordingly, as though it were a normal link. Yes, IE is famous with its restrictions installed on a Server version of Windows. Some setting disallows Ajax.. > > > On 12/6/11 10:24 AM, "cosmindumy" wrote: > >> I'm not at office now but most surely this line is Registration.java:787 : >> >> target.addComponent(captchaImage); and I think target is null. >> >> I think I had this problem before in another context, but then target was >> null all the time, on all browsers. >> I changed AjaxFallbackLink with AjaxLink and it worked. >> >> -- >> View this message in context: >> http://apache-wicket.1842946.n4.nabble.com/problems-with-AjaxFallbackLink-on-I >> E-tp4165457p4165836.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 >> > > -- > Nicklas Johnson -=- N6OL > TIBU CTX Software Engineer > "Ask" is not a noun. You mean "request," "requirement," or "question." > > > - > 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: problems with AjaxFallbackLink on IE
I believe target is null when you're in "fallback" mode with an AjaxFallbackLink. You'll need to check for null and handle things accordingly, as though it were a normal link. On 12/6/11 10:24 AM, "cosmindumy" wrote: > I'm not at office now but most surely this line is Registration.java:787 : > > target.addComponent(captchaImage); and I think target is null. > > I think I had this problem before in another context, but then target was > null all the time, on all browsers. > I changed AjaxFallbackLink with AjaxLink and it worked. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/problems-with-AjaxFallbackLink-on-I > E-tp4165457p4165836.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 > -- Nicklas Johnson -=- N6OL TIBU CTX Software Engineer "Ask" is not a noun. You mean "request," "requirement," or "question." - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: problems with AjaxFallbackLink on IE
I'm not at office now but most surely this line is Registration.java:787 : target.addComponent(captchaImage); and I think target is null. I think I had this problem before in another context, but then target was null all the time, on all browsers. I changed AjaxFallbackLink with AjaxLink and it worked. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/problems-with-AjaxFallbackLink-on-IE-tp4165457p4165836.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: problems with AjaxFallbackLink on IE
On Tue, Dec 6, 2011 at 5:41 PM, cosmindumy wrote: > Hi, > I have a problem wih AjaxFallbackLink on IE. I have a captcha image and I > want when I click on image to chage the image. > Everything worked fine, but I noted on another machine that on my production > server on IE when I click on image I got a null pointer exception. The > problem is that on my development machine I don't get the exception and i > cannot reproduce this bug. This doesn't happen on FF or Chrome, nor on IE > on my computer. > Does anyone know wich can be the cause. Here is the code: > > @Override > public void onClick(AjaxRequestTarget target) > { > captchaImageResource = new CaptchaImageResource(); > captchaImage.setImageResource(captchaImageResource); > > equalInputValidator.setFieldValue(captchaImageResource.getChallengeId()); > target.addComponent(captchaImage); > } which line is Registration.java:787 ? > > and a part of stacktrace : > > org.apache.wicket.WicketRuntimeException: Method onLinkClicked of interface > org.apache.wicket.markup.html.link.ILinkListener targeted at component > [MarkupContainer [Component id = changepicture]] threw an exception > at > org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:193) > at > org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73) > at > org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92) > at > org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1252)... > . > . > Caused by: java.lang.NullPointerException > at > com.lingo24.orderingsystem.customer.web.wicket.registration.Registration$CaptchaImageFallbackLink.onClick(Registration.java:787) > at > org.apache.wicket.ajax.markup.html.AjaxFallbackLink.onClick(AjaxFallbackLink.java:119) > at org.apache.wicket.markup.html.link.Link.onLinkClicked(Link.java:225) > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/problems-with-AjaxFallbackLink-on-IE-tp4165457p4165457.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: CSRF protection and preserving page mount names
That works, thanks! On Tue, Dec 6, 2011 at 1:06 AM, Martin Grigorov wrote: > Hi, > > See https://issues.apache.org/jira/browse/WICKET-4140 > There is a quickstart that shows how to do it. > > On Mon, Dec 5, 2011 at 11:40 PM, Dan Alvizu > wrote: > > Hello, > > > > I'm migrating from wicket 1.4 to 1.5 and I am looking to port the cross > > site request forgery (CSRF) protection from wicket 1.4. > > > > In 1.4, the recommended way[1] is to use > CryptedUrlWebRequestCodingStrategy: > > > > // MyWebApplication.java > > > >@Override > >protected IRequestCycleProcessor newRequestCycleProcessor() > >{ > >return new WebRequestCycleProcessor() > >{ > >protected IRequestCodingStrategy newRequestCodingStrategy() > >{ > >return new CryptedUrlWebRequestCodingStrategy(new > > WebRequestCodingStrategy()); > >} > >}; > >} > > > > In 1.5, this has been removed and we're asked to use > > org.apache.wicket.request.mapper.CryptoMapper[2] > > instead: > > > > // MyWebApplication.java > >@Override > >protected void init() > >{ > >... > >mountPage("login", LoginPage.class); > >... > >// must be last call in init() > >IRequestMapper cryptoMapper = new > > CryptoMapper(getRootRequestMapper(), this); > >setRootRequestMapper(cryptoMapper); > >} > > > > While this solves the CSRF problem, there is a big issue with this: there > > is no longer a page mapped to "login". If this were a quickstart, > > http://localhost:8080/login gives a 404. > > > > In wicket 1.4, LoginPage would be accessible via > http://localhost:8080/login, > > and any other page similarly mounted would give a friendly URL if you > > landed on it. The only time anything would be encrypted would be during > > form posts, which was perfect because that was the only time I'd need it. > > > > In wicket 1.5, is there a way to bring this behavior back? Or am I doing > > something wrong? Or is there another recommended way of protecting > against > > CSRF attacks? > > > > Thanks for any help, > > > > - Dan > > > > [1] > > From comments in https://issues.apache.org/jira/browse/WICKET-1885 > > [2] > > > https://cwiki.apache.org/WICKET/migration-to-wicket-15.html#MigrationtoWicket1.5-Listofrenamedclassesandmethods > > > > -- > 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 > >
problems with AjaxFallbackLink on IE
Hi, I have a problem wih AjaxFallbackLink on IE. I have a captcha image and I want when I click on image to chage the image. Everything worked fine, but I noted on another machine that on my production server on IE when I click on image I got a null pointer exception. The problem is that on my development machine I don't get the exception and i cannot reproduce this bug. This doesn't happen on FF or Chrome, nor on IE on my computer. Does anyone know wich can be the cause. Here is the code: @Override public void onClick(AjaxRequestTarget target) { captchaImageResource = new CaptchaImageResource(); captchaImage.setImageResource(captchaImageResource); equalInputValidator.setFieldValue(captchaImageResource.getChallengeId()); target.addComponent(captchaImage); } and a part of stacktrace : org.apache.wicket.WicketRuntimeException: Method onLinkClicked of interface org.apache.wicket.markup.html.link.ILinkListener targeted at component [MarkupContainer [Component id = changepicture]] threw an exception at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:193) at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1252)... . . Caused by: java.lang.NullPointerException at com.lingo24.orderingsystem.customer.web.wicket.registration.Registration$CaptchaImageFallbackLink.onClick(Registration.java:787) at org.apache.wicket.ajax.markup.html.AjaxFallbackLink.onClick(AjaxFallbackLink.java:119) at org.apache.wicket.markup.html.link.Link.onLinkClicked(Link.java:225) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/problems-with-AjaxFallbackLink-on-IE-tp4165457p4165457.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: how to implement a Form with Ajax Paginated List of Checkboxes?
Hi, I have the same problem and I would appreciate if you could post a code example of how you solved your problem? Specifically what you put into the AjaxCheckBox' onUpdate() method? Thanks 2011/8/11 bad boy > AjaxFormChoiceComponentUpdatingBehavior did not work. For some reason ir > would only ccept the first checkbox. when I checked say 5 checkboxe, it > would only remember the first fone > > > But changing Check to AjaxCheckBox worked perfectly. > > > Thanks > > > > > > - Original Message - > From: Martin Grigorov > To: users@wicket.apache.org; bad boy > Cc: > Sent: Wednesday, August 10, 2011 7:35 AM > Subject: Re: how to implement a Form with Ajax Paginated List of > Checkboxes? > > Add AjaxFormChoiceComponentUpdatingBehavior to the CheckGroup > > On Wed, Aug 10, 2011 at 4:38 AM, bad boy wrote: > > On my Wicket page, I have a form with a couple of TextFields and a > paginated List of Checkboxes implemented with Dataview and and a sortable > data provider. The ajax pagination of the dataview works fine. > > > > The problem is that when I select a few items on Page 1 and then go to > Page 2 and then return to Page 1 using the AjaxPagingNavigator, the > selection is lost : the items that were checked on Page 1 initially do no > have the "check mark" anymore. > > > > What should I do so that the items that were selected on a page of > Dataview do not get lost when the AjaxPagnigaion is used to traverse the > pages of the Dataview ? > > > > > > > > public final class AjaxFormWithPaginatedCheckBoxPage extends BasePage { > > > > static Logger logger = > Logger.getLogger(AjaxFormWithPaginatedCheckBoxPage.class); > > private Person person = new Person(); > > int counter = 0; > > > > WebMarkupContainer webMC; > > static List pList=Person.getPersons(100); > > int maxListCount=5; > > DataView dv; > > CheckGroup group; > > public AjaxFormWithPaginatedCheckBoxPage() { > > super(); > > final Form form = new Form("form", new > CompoundPropertyModel(person)) { > > > > protected void onSubmit() { > > logger.info("form recived"); > > logger.info(" person name " + person.getName()); > > > > setResponsePage(new AjaxTogglePanelTestPage()); > > } > > }; > > final TextField name = new TextField("name"); > > final TextField age = new TextField("age"); > > form.add(name); > > form.add(age); > > > > > > group=new CheckGroup("group", new ArrayList()); > > form.add(group); > > > > webMC= new WebMarkupContainer("webMC"); > > webMC.setOutputMarkupId(true); > > > > > > SortablePersonDataProvider personDataProvider=new > SortablePersonDataProvider(pList); > > dv = new DataView("persons", personDataProvider) { > > > > @Override > > protected void populateItem(Item item) { > > item.add(new Check("check", item.getModel())); > > > > item.add(new Label("id", new PropertyModel(item.getModel(), > "id"))); > > item.add(new Label("name", new > PropertyModel(item.getModel(), "name"))); > > item.add(new Label("age", new PropertyModel(item.getModel(), > "age"))); > > } > > > > > > }; > > dv.setItemsPerPage(maxListCount); > > > > > > webMC.add(new AjaxFallbackOrderByBorder("orderByID", "id", > personDataProvider) > > { > > @Override > > protected void onSortChanged() > > { > > dv.setCurrentPage(0); > > } > > > > @Override > > protected void onAjaxClick(AjaxRequestTarget target) { > > target.addComponent(webMC); > > } > > }); > > > > webMC.add(new AjaxFallbackOrderByBorder("orderByName", "name", > personDataProvider) > > { > > @Override > > protected void onSortChanged() > > { > > dv.setCurrentPage(0); > > } > > > > @Override > > protected void onAjaxClick(AjaxRequestTarget target) { > > target.addComponent(webMC); > > } > > }); > > webMC.add(new AjaxFallbackOrderByBorder("orderByAge", "age", > personDataProvider) > > { > > @Override > > protected void onSortChanged() > > { > > dv.setCurrentPage(0); > > } > > > > @Override > > protected void onAjaxClick(AjaxRequestTarget target) { > > target.addComponent(webMC); > > } > > }); > > > > > > webMC.add(dv); > > webMC.add(new AjaxPagingNavigator("navigator",dv)); > > group.add(webMC); > > > > AjaxButton ab = new AjaxButton("ajax-button", new > PropertyModel(this, > > "counter"), form) { > > > > @Override > > protected void onSubmit(AjaxRequestTarget target, Form form) { > > counter++; > > logger.info("ajx form recived"); > > logger.info("ajx person name " + person.getName()); > > > > target.addComponent(this); > > > > } > > }; > >
Re: AjaxPagingNavigation.newPagingNavigationLink returning Link instead of AbstractLink?
Hi, It looks like a bug. Create a ticket please. On Tue, Dec 6, 2011 at 4:36 PM, infiniter wrote: > I've got staleless paging navigation that stores stuff in the page > parameters. Now I need to create its AJAX version... > When creating the AjaxPagingNavigation.newPagingNavigationLink I realized it > returns a Link instance instead of an AjaxLink or AbstractLink > (PagingNavition returns an AbstractLink) ... As you know AjaxLink doesn't > extend from Link, so does anyone what the reason for this is? I need to > update the pageable component using Ajax, so how can that be accomplished > then? > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/AjaxPagingNavigation-newPagingNavigationLink-returning-Link-instead-of-AbstractLink-tp4165149p4165149.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
AjaxPagingNavigation.newPagingNavigationLink returning Link instead of AbstractLink?
I've got staleless paging navigation that stores stuff in the page parameters. Now I need to create its AJAX version... When creating the AjaxPagingNavigation.newPagingNavigationLink I realized it returns a Link instance instead of an AjaxLink or AbstractLink (PagingNavition returns an AbstractLink) ... As you know AjaxLink doesn't extend from Link, so does anyone what the reason for this is? I need to update the pageable component using Ajax, so how can that be accomplished then? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxPagingNavigation-newPagingNavigationLink-returning-Link-instead-of-AbstractLink-tp4165149p4165149.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: Updating Child Component Markup from Ajax
Finally figured it out. I was calling the AjaxRequestTarget.addCopmonent() inside a modal content, instead of from the page where I created the modal. Basically, it was trying update the wrong page (wrong set of markup). Thanks for the insights. From: Martin Grigorov To: users@wicket.apache.org Date: 12/06/2011 08:28 AM Subject:Re: Updating Child Component Markup from Ajax Check Ajax Debug Window for any errors. Maybe the parent component is connected with or also have .setRenderBodyOnly(true). Check that the produced markup for the parent component has id attribute. On Tue, Dec 6, 2011 at 3:25 PM, Richard W. Adams wrote: > Ok, that's what I thought. > > My problem is that my child components AREN'T being updated. I've verified > that the parent component (a group box) has a markup ID, and I'm adding > the parent component to the AjaxRequestTarget. I set break points in the > model class for the child value getter methods & verified they're being > called. > > Any suggestions on where to look to figure out why the child components > aren't re-rendered after the Ajax call is finished? > > > > > From: Sven Meier > To: users@wicket.apache.org > Date: 12/06/2011 08:06 AM > Subject:Re: Updating Child Component Markup from Ajax > > > >>Do I need to call setOutputMarkupId(true) on each individual >>child as well? > > no, just the top most component you want to be redrawn has to have a > markup id. All its decendants will be updated as well. > > Sven > > > Am 06.12.2011 14:54, schrieb Richard W. Adams: >> I know that I need to call AjaxRequestTarget.addComponent() to re-render > a >> component from Ajax, and that I must have previously called >> component.setOutputMarkupId(true). But the javadocs for > AjaxRequestTarget >> aren't clear on whether only this single component is updated, or > whether >> all its children are updated as well. >> >> My intent it to update all the children, too, but I haven't gotten it to >> work yet. Do I need to call setOutputMarkupId(true) on each individual >> child as well? >> >> ** >> >> This email and any attachments may contain information that is > confidential and/or privileged for the sole use of the intended recipient. > Any use, review, disclosure, copying, distribution or reliance by others, > and any forwarding of this email or its contents, without the express > permission of the sender is strictly prohibited by law. If you are not > the intended recipient, please contact the sender immediately, delete the > e-mail and destroy all copies. >> ** >> > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > ** > > This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies. > ** -- 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 ** This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies. **
Re: Updating Child Component Markup from Ajax
Check Ajax Debug Window for any errors. Maybe the parent component is connected with or also have .setRenderBodyOnly(true). Check that the produced markup for the parent component has id attribute. On Tue, Dec 6, 2011 at 3:25 PM, Richard W. Adams wrote: > Ok, that's what I thought. > > My problem is that my child components AREN'T being updated. I've verified > that the parent component (a group box) has a markup ID, and I'm adding > the parent component to the AjaxRequestTarget. I set break points in the > model class for the child value getter methods & verified they're being > called. > > Any suggestions on where to look to figure out why the child components > aren't re-rendered after the Ajax call is finished? > > > > > From: Sven Meier > To: users@wicket.apache.org > Date: 12/06/2011 08:06 AM > Subject: Re: Updating Child Component Markup from Ajax > > > >>Do I need to call setOutputMarkupId(true) on each individual >>child as well? > > no, just the top most component you want to be redrawn has to have a > markup id. All its decendants will be updated as well. > > Sven > > > Am 06.12.2011 14:54, schrieb Richard W. Adams: >> I know that I need to call AjaxRequestTarget.addComponent() to re-render > a >> component from Ajax, and that I must have previously called >> component.setOutputMarkupId(true). But the javadocs for > AjaxRequestTarget >> aren't clear on whether only this single component is updated, or > whether >> all its children are updated as well. >> >> My intent it to update all the children, too, but I haven't gotten it to >> work yet. Do I need to call setOutputMarkupId(true) on each individual >> child as well? >> >> ** >> >> This email and any attachments may contain information that is > confidential and/or privileged for the sole use of the intended recipient. > Any use, review, disclosure, copying, distribution or reliance by others, > and any forwarding of this email or its contents, without the express > permission of the sender is strictly prohibited by law. If you are not > the intended recipient, please contact the sender immediately, delete the > e-mail and destroy all copies. >> ** >> > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > ** > > This email and any attachments may contain information that is confidential > and/or privileged for the sole use of the intended recipient. Any use, > review, disclosure, copying, distribution or reliance by others, and any > forwarding of this email or its contents, without the express permission of > the sender is strictly prohibited by law. If you are not the intended > recipient, please contact the sender immediately, delete the e-mail and > destroy all copies. > ** -- 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: Updating Child Component Markup from Ajax
Ok, that's what I thought. My problem is that my child components AREN'T being updated. I've verified that the parent component (a group box) has a markup ID, and I'm adding the parent component to the AjaxRequestTarget. I set break points in the model class for the child value getter methods & verified they're being called. Any suggestions on where to look to figure out why the child components aren't re-rendered after the Ajax call is finished? From: Sven Meier To: users@wicket.apache.org Date: 12/06/2011 08:06 AM Subject:Re: Updating Child Component Markup from Ajax >Do I need to call setOutputMarkupId(true) on each individual >child as well? no, just the top most component you want to be redrawn has to have a markup id. All its decendants will be updated as well. Sven Am 06.12.2011 14:54, schrieb Richard W. Adams: > I know that I need to call AjaxRequestTarget.addComponent() to re-render a > component from Ajax, and that I must have previously called > component.setOutputMarkupId(true). But the javadocs for AjaxRequestTarget > aren't clear on whether only this single component is updated, or whether > all its children are updated as well. > > My intent it to update all the children, too, but I haven't gotten it to > work yet. Do I need to call setOutputMarkupId(true) on each individual > child as well? > > ** > > This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies. > ** > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org ** This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies. **
Re: Updating Child Component Markup from Ajax
Do I need to call setOutputMarkupId(true) on each individual child as well? no, just the top most component you want to be redrawn has to have a markup id. All its decendants will be updated as well. Sven Am 06.12.2011 14:54, schrieb Richard W. Adams: I know that I need to call AjaxRequestTarget.addComponent() to re-render a component from Ajax, and that I must have previously called component.setOutputMarkupId(true). But the javadocs for AjaxRequestTarget aren't clear on whether only this single component is updated, or whether all its children are updated as well. My intent it to update all the children, too, but I haven't gotten it to work yet. Do I need to call setOutputMarkupId(true) on each individual child as well? ** This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies. ** - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Updating Child Component Markup from Ajax
I know that I need to call AjaxRequestTarget.addComponent() to re-render a component from Ajax, and that I must have previously called component.setOutputMarkupId(true). But the javadocs for AjaxRequestTarget aren't clear on whether only this single component is updated, or whether all its children are updated as well. My intent it to update all the children, too, but I haven't gotten it to work yet. Do I need to call setOutputMarkupId(true) on each individual child as well? ** This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies. **
Re: Event or Notice when a ListView's Model changes
Hi, hfriederichs wrote > > I'm trying to do this, to send an Event in the DataView's > onBeforeRender(), but now I encounter another issue. On the receiving > side of the Event, in the onEvent(Component component, IEvent event), I > need a > AjaxRequestTarget. Can I create an AjaxRequestTarget and pass it with the > Event? > I tried this with new AjaxRequestTarget(getPage()), but it doesn't work. > Inside an Ajax-Request you can do AjaxRequestTarget.get() at any time - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Event-or-Notice-when-a-ListView-s-Model-changes-tp4157030p4164694.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: Internationalization on panels
Hi again, I have a curiosity. It's not my problem, but I want to know if is there a solution for the following problem. Now when I change the locale I refresh the whole page. (target.add(MyPage)). But I loose all the changes the user has made. (if he completed some fields) But how can I make to refresh only some components but allso the wicket:message properties as they have no java corespondent. I want to to something like this: target.add(component1); target.add(component2); and also refresh the wicket:message. Is there a solution. I hope is clear what I ask. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Internationalization-on-panels-tp2299768p4164652.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
Tree selection form component? (was: Re: Component for chained/dependent drop downs?)
On 11/19/2011 05:09 PM, Emmanouil Batsis (Manos) wrote: > I was wondering if anyone has implemented a reusable component for > handling hierarchical/dependent dropdowns as I'm thinking of having a go > at it... I hijacked the thread as it seems relevant. At first I was after a component that adds an arbitrary number of chained selects (the example bellow was just that), but a tree makes a lot more sense in many cases. Any examples of a tree used to update a text field? I'd happily turn that to a FormComponentPanel if none is available. Manos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Event or Notice when a ListView's Model changes
I'm trying to do this, to send an Event in the DataView's onBeforeRender(), but now I encounter another issue. On the receiving side of the Event, in the onEvent(Component component, IEvent event), I need a AjaxRequestTarget. Can I create an AjaxRequestTarget and pass it with the Event? I tried this with new AjaxRequestTarget(getPage()), but it doesn't work. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Event-or-Notice-when-a-ListView-s-Model-changes-tp4157030p4164550.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: Freemarker+ExtJS vs Wicket questions
> Plus another problem I see is if I have to use separate > templates for each
Re: CSRF protection and preserving page mount names
Hi, See https://issues.apache.org/jira/browse/WICKET-4140 There is a quickstart that shows how to do it. On Mon, Dec 5, 2011 at 11:40 PM, Dan Alvizu wrote: > Hello, > > I'm migrating from wicket 1.4 to 1.5 and I am looking to port the cross > site request forgery (CSRF) protection from wicket 1.4. > > In 1.4, the recommended way[1] is to use CryptedUrlWebRequestCodingStrategy: > > // MyWebApplication.java > > @Override > protected IRequestCycleProcessor newRequestCycleProcessor() > { > return new WebRequestCycleProcessor() > { > protected IRequestCodingStrategy newRequestCodingStrategy() > { > return new CryptedUrlWebRequestCodingStrategy(new > WebRequestCodingStrategy()); > } > }; > } > > In 1.5, this has been removed and we're asked to use > org.apache.wicket.request.mapper.CryptoMapper[2] > instead: > > // MyWebApplication.java > @Override > protected void init() > { > ... > mountPage("login", LoginPage.class); > ... > // must be last call in init() > IRequestMapper cryptoMapper = new > CryptoMapper(getRootRequestMapper(), this); > setRootRequestMapper(cryptoMapper); > } > > While this solves the CSRF problem, there is a big issue with this: there > is no longer a page mapped to "login". If this were a quickstart, > http://localhost:8080/login gives a 404. > > In wicket 1.4, LoginPage would be accessible via http://localhost:8080/login, > and any other page similarly mounted would give a friendly URL if you > landed on it. The only time anything would be encrypted would be during > form posts, which was perfect because that was the only time I'd need it. > > In wicket 1.5, is there a way to bring this behavior back? Or am I doing > something wrong? Or is there another recommended way of protecting against > CSRF attacks? > > Thanks for any help, > > - Dan > > [1] > From comments in https://issues.apache.org/jira/browse/WICKET-1885 > [2] > https://cwiki.apache.org/WICKET/migration-to-wicket-15.html#MigrationtoWicket1.5-Listofrenamedclassesandmethods -- 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