Re: Simple non ajax callback

2011-08-20 Thread nino martinez wael
Just add a behavior that had an on event callback, i know what you suggested are sort of the same. But the other would be simpler to grasp? On Aug 18, 2011 5:06 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: how could it possibly be _even_ simpler? -igor On Thu, Aug 18, 2011 at 12:33 AM,

java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle even through WicketSessionFilter

2011-08-20 Thread martin . asenov
Hello, guys, I experience a strange problem with trying to provide a custom servlet with the wicket session. Here is my web.xml conf: filter filter-namewicketFilter/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param

Re: Simple non ajax callback

2011-08-20 Thread Martin Grigorov
It sounds like you want to re-invent the Link ... On Sat, Aug 20, 2011 at 10:16 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: Just add a behavior that had an on event callback, i know what you suggested are sort of the same. But the other would be simpler to grasp? On Aug 18, 2011

Re: java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle even through WicketSessionFilter

2011-08-20 Thread Martin Grigorov
Try with url-mapping: /friends/* both for the session filter and the servlet On Sat, Aug 20, 2011 at 12:03 PM, martin.ase...@mail.bg wrote: Hello, guys, I experience a strange problem with trying to provide a custom servlet with the wicket session. Here is my web.xml conf: filter      

Re: java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle even through WicketSessionFilter

2011-08-20 Thread martin . asenov
Hi, namesake :) Already tried that, no result. Best, Martin - Цитат от Martin Grigorov (mgrigo...@apache.org), на 20.08.2011 в 12:09 - Try with url-mapping: /friends/* both for the session filter and the servlet On Sat, Aug 20, 2011 at 12:03 PM, wrote: Hello, guys,

Re: java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle even through WicketSessionFilter

2011-08-20 Thread Martin Grigorov
paste the last few lines of the exception On Sat, Aug 20, 2011 at 12:11 PM, martin.ase...@mail.bg wrote: Hi, namesake :) Already tried that, no result. Best, Martin - Цитат от Martin Grigorov (mgrigo...@apache.org), на 20.08.2011 в 12:09 -   Try with url-mapping:

Re: java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle even through WicketSessionFilter

2011-08-20 Thread martin . asenov
Here is the exception: java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle at org.apache.wicket.Session.findOrCreate(Session.java:209) at org.apache.wicket.Session.get(Session.java:253) at

Re: java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle even through WicketSessionFilter

2011-08-20 Thread Martin Grigorov
the mapping is OK. we see WicketSessionFilter in the stack there is the following code in WSF#bindSession(): if (session == null) { if (logger.isDebugEnabled()) { logger.debug(could

Re: Strange error

2011-08-20 Thread Martin Grigorov
For 1.5 I can say that this is definitely true, the code is in org.apache.wicket.page.PageAccessSynchronizer.adapt(...).new PageManagerDecorator() {...}.commitRequest() The related code in 1.4 is in org.apache.wicket.Session.requestDetached() but I'm not sure what exactly happens there. On Sat,

Re: java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle even through WicketSessionFilter

2011-08-20 Thread martin . asenov
Actually I load a wicket page at root context and obtain a session. Afterwards I hit a button that posts to the servlet. I think I'm supposed to have HttpSession at the time. Best, Martin - Цитат от Martin Grigorov (mgrigo...@apache.org), на 20.08.2011 в 12:44 - the mapping is

Re: java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle even through WicketSessionFilter

2011-08-20 Thread Martin Grigorov
try with getWebRequest().getHttpServletRequest().getHttpSession(false) in your page before making the call to the servlet. It should return non-null. Additionally turn on DEBUG logging for WSF On Sat, Aug 20, 2011 at 12:54 PM, martin.ase...@mail.bg wrote: Actually I load a wicket page at

Re: Strange error

2011-08-20 Thread Martin Makundi
Yeah, is 1.4, but it should be behind pagemap lock.. ** Martin 2011/8/20 Martin Grigorov mgrigo...@apache.org For 1.5 I can say that this is definitely true, the code is in org.apache.wicket.page.PageAccessSynchronizer.adapt(...).new PageManagerDecorator() {...}.commitRequest() The related

Re: java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle even through WicketSessionFilter

2011-08-20 Thread martin . asenov
yes, really session is null :O at servlet: req.getSession() returns null and wicketsessionfilter in debug mode prints 20-08-2011 13:25:57,753 DEBUG org.apache.wicket.protocol.http.servlet.WicketSessionFilter.bindSession:180 - could not set Wicket session: key null not found in

Re: java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle even through WicketSessionFilter

2011-08-20 Thread martin . asenov
Sorry, my mistake... Session is not null at servlet. There I have: session is: org.apache.catalina.session.StandardSessionFacade@412f4b while the statement in logs from wicketsessionfilter is: 20-08-2011 13:25:57,753 DEBUG

Re: java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle even through WicketSessionFilter

2011-08-20 Thread martin . asenov
In the page, which calls the servlet afterwards, getWebRequestCycle().getWebRequest().getHttpServletRequest().getSession(false) returns null Do you have any ideas why this occurs? Thank you, Martin - Цитат от Martin Grigorov (mgrigo...@apache.org), на 20.08.2011 в 13:16 -

Wicket 1.4.18: Performance of unit test observation.

2011-08-20 Thread cablepuff
Hi can someone explain to me why performance of unit testing is faster using setUp and destory this way. @Before public void setup() { if (this.authenticatedWebApp == null) { this.authenticatedWebApp = new AuthenticatedTestApplication(); } if

Re: java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle even through WicketSessionFilter

2011-08-20 Thread Martin Grigorov
Call Session.get().bind() before the POST call and it will be fine. On Sat, Aug 20, 2011 at 1:57 PM, martin.ase...@mail.bg wrote: In the page, which calls the servlet afterwards, getWebRequestCycle().getWebRequest().getHttpServletRequest().getSession(false) returns null Do you have any

Re: java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle even through WicketSessionFilter

2011-08-20 Thread martin . asenov
Thanks a lot for your time, it did the trick :) Best regards, Martin - Цитат от Martin Grigorov (mgrigo...@apache.org), на 20.08.2011 в 14:31 - Call Session.get().bind() before the POST call and it will be fine. On Sat, Aug 20, 2011 at 1:57 PM, wrote: In the page, which

Re: Wicket Basics.

2011-08-20 Thread Andrea Del Bene
Hi Shunmuga, try with this http://web.itu.edu.tr/uyar/wicket-tutorial/wicket-tutorial.pdf it's a basic Wicket tutorial for beginners. Hi Per Newgro, Thanks for your valuable information. I dont know wicket basics also. If u have any tuorials or tutorial links means pls

Re: Wicket 1.4.18: Performance of unit test observation.

2011-08-20 Thread Igor Vaynberg
When you reuse the application instance across tests you are also reusing its caches. -igor On Aug 20, 2011 4:03 AM, cablepuff cablep...@gmail.com wrote: Hi can someone explain to me why performance of unit testing is faster using setUp and destory this way. @Before public void setup() { if

Re: Wicket 1.4.18: Performance of unit test observation.

2011-08-20 Thread Bruno Borges
Not exactly... JUnit calls @Before and @After for each test method. That's why... *Bruno Borges* (21) 7672-7099 *www.brunoborges.com* On Sat, Aug 20, 2011 at 1:59 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: When you reuse the application instance across tests you are also reusing its

Re: Wicket 1.4.18: Performance of unit test observation.

2011-08-20 Thread Bruno Borges
Oh... sorry Igor... :-) *Bruno Borges* (21) 7672-7099 *www.brunoborges.com* On Sat, Aug 20, 2011 at 2:20 PM, Bruno Borges bruno.bor...@gmail.comwrote: Not exactly... JUnit calls @Before and @After for each test method. That's why... *Bruno Borges* (21) 7672-7099 *www.brunoborges.com*