Re: How to redirect to a page from an AJAX request?
hi! you could check it with the Wicket Ajax Debug - for the ajax redirect it should receive and process javascript instruction which resets location of the page. maybe there are some JS errors out there? On May 22, 2012 8:59 AM, Melinda Dweer melinda.dw...@gmail.com wrote: IFAIK setResponsePage(Page.class) should work: at least I remember using it successfully on an AJAX request cycle to redirect to a different page. Regards, Melinda On Tue, May 22, 2012 at 2:41 AM, Alec Swan alecs...@gmail.com wrote: Hello, I use AjaxSubmitLink to submit a form that has captcha. I refresh captcha by adding it to ajax request. However, when the user successfully submits the form I want to redirect the user to a different page. I tried setResponsePage and throw new RestartResponseException in AjaxSubmitLink#onSubmit, but they seem to have no effect. How can I redirect the user to a page from an ajax request? Thanks, Alec - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket 6 setting response page with page object and session expired error
On 22.05.2012 at 06:01 kamiseq wrote: step to reproduce 1. go to http://localhost:8080 and type any valid email (ie l...@oa.pl) and submit form 2. press accept and it will take you to third page 3. this should fail and show expire page error No, it doesn't. 3. works in your example, there is no exception thrown. 1. go to http://localhost:8080/user/email/l...@oa.pl 2. press accept 3. third page is loaded as expected Confirmed, but I can see no difference in the behavior of that two processes, both work for me in your provided quickstart. -Tom - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
DataTable and PagingNavigator problem
Hi, I probably found a bug in DataTable and PagingNavigator, or more likely I don't understand it correctly... I have page with one data table and two paging navigators in form, html part looks like this: form wicket:id=mainForm div wicket:id=pTop/ div wicket:id=table/ div wicket:id=pBottom/ /form Java code - constructor: public PageTest() { Form mainForm = new Form(mainForm); add(mainForm); DataTableUserType table = new DataTableUserType(table, initColumns(), new ObjectDataProvider(PageTest.this, UserType.class), 10); table.setOutputMarkupId(true); mainForm.add(table); PagingNavigator pTop = new PagingNavigator(pTop, table); mainForm.add(pTop); PagingNavigator pBottom = new PagingNavigator(pBottom, table); mainForm.add(pBottom); } After first page load, I can see in logs: 2012-05-22 17:45:11,049 TRACE (c.e.m.w.c.d.ObjectDataProvider): begin::size() 2012-05-22 17:45:12,081 TRACE (c.e.m.w.c.d.ObjectDataProvider): end::size() 2012-05-22 17:45:12,081 TRACE (c.e.m.w.c.d.ObjectDataProvider): begin::iterator() from 0 count 10. 2012-05-22 17:45:12,546 TRACE (c.e.m.w.c.d.ObjectDataProvider): end::iterator() After click on next page, I see in logs: 2012-05-22 17:45:19,620 TRACE (c.e.m.w.c.d.ObjectDataProvider): begin::size() 2012-05-22 17:45:20,693 TRACE (c.e.m.w.c.d.ObjectDataProvider): end::size() 2012-05-22 17:45:20,696 TRACE (c.e.m.w.c.d.ObjectDataProvider): begin::size() 2012-05-22 17:45:21,722 TRACE (c.e.m.w.c.d.ObjectDataProvider): end::size() 2012-05-22 17:45:21,722 TRACE (c.e.m.w.c.d.ObjectDataProvider): begin::iterator() from 10 count 10. 2012-05-22 17:45:22,164 TRACE (c.e.m.w.c.d.ObjectDataProvider): end::iterator() size() method in data provider is called twice, that's probably a bug. I have many objects in db (up to 500k), so it's a 1s-2s difference in response time. I'm suspecting that it's caused by AbstractPageableView.getCurrentPage(), because there is a check which calls getPageCount() which calls getItemCount(). There is some caching mechanism for count, but it's not working in this case... Can somebody help please, any ideas? Vilo - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket 6 setting response page with page object and session expired error
huh, then something is wrong with my environment, im running it with jetty invoking simple mvn clean install jetty:run pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DataTable and PagingNavigator problem
Could you please provide a quickstart that demonstrates your implementation? -Tom On 22.05.2012 at 17:54 Viliam Repan wrote: Hi, I probably found a bug in DataTable and PagingNavigator, or more likely I don't understand it correctly... I have page with one data table and two paging navigators in form, html part looks like this: form wicket:id=mainForm div wicket:id=pTop/ div wicket:id=table/ div wicket:id=pBottom/ /form Java code - constructor: public PageTest() { Form mainForm = new Form(mainForm); add(mainForm); DataTableUserType table = new DataTableUserType(table, initColumns(), new ObjectDataProvider(PageTest.this, UserType.class), 10); table.setOutputMarkupId(true); mainForm.add(table); PagingNavigator pTop = new PagingNavigator(pTop, table); mainForm.add(pTop); PagingNavigator pBottom = new PagingNavigator(pBottom, table); mainForm.add(pBottom); } After first page load, I can see in logs: 2012-05-22 17:45:11,049 TRACE (c.e.m.w.c.d.ObjectDataProvider): begin::size() 2012-05-22 17:45:12,081 TRACE (c.e.m.w.c.d.ObjectDataProvider): end::size() 2012-05-22 17:45:12,081 TRACE (c.e.m.w.c.d.ObjectDataProvider): begin::iterator() from 0 count 10. 2012-05-22 17:45:12,546 TRACE (c.e.m.w.c.d.ObjectDataProvider): end::iterator() After click on next page, I see in logs: 2012-05-22 17:45:19,620 TRACE (c.e.m.w.c.d.ObjectDataProvider): begin::size() 2012-05-22 17:45:20,693 TRACE (c.e.m.w.c.d.ObjectDataProvider): end::size() 2012-05-22 17:45:20,696 TRACE (c.e.m.w.c.d.ObjectDataProvider): begin::size() 2012-05-22 17:45:21,722 TRACE (c.e.m.w.c.d.ObjectDataProvider): end::size() 2012-05-22 17:45:21,722 TRACE (c.e.m.w.c.d.ObjectDataProvider): begin::iterator() from 10 count 10. 2012-05-22 17:45:22,164 TRACE (c.e.m.w.c.d.ObjectDataProvider): end::iterator() size() method in data provider is called twice, that's probably a bug. I have many objects in db (up to 500k), so it's a 1s-2s difference in response time. I'm suspecting that it's caused by AbstractPageableView.getCurrentPage(), because there is a check which calls getPageCount() which calls getItemCount(). There is some caching mechanism for count, but it's not working in this case... Can somebody help please, any ideas? Vilo - 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: wicket 6 setting response page with page object and session expired error
anyway there is nothing wrong to my code, in your opnion? I just have bad feeling about passing model from one page to another in constructor. on the other hand model are serialised into session so maybe it is a better idea to pass them around rather than object they are wrapping pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __ On 22 May 2012 18:13, kamiseq kami...@gmail.com wrote: huh, then something is wrong with my environment, im running it with jetty invoking simple mvn clean install jetty:run pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket 6 setting response page with page object and session expired error
I tested your quickstart from within the IDE by running Start.java. Models are meant to be passed around, so there's nothing wrong with it in general. And it's always (at least in 95% of cases I'd dare to say) preferable to passing Objects (beans). -Tom On 22.05.2012 at 18:55 kamiseq wrote: anyway there is nothing wrong to my code, in your opnion? I just have bad feeling about passing model from one page to another in constructor. on the other hand model are serialised into session so maybe it is a better idea to pass them around rather than object they are wrapping pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __ On 22 May 2012 18:13, kamiseq kami...@gmail.com wrote: huh, then something is wrong with my environment, im running it with jetty invoking simple mvn clean install jetty:run pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.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: DataTable and PagingNavigator problem
This looks indeed like a bug to me. I opened a ticket for this: https://issues.apache.org/jira/browse/WICKET-4568 -Tom On 22.05.2012 at 21:10 Viliam Repan wrote: Hi, I've create sample mvn project, after build and deploy you can see sysouts like this: size() 100 iterator() 0 10 size() 100 iterator() 0 10 after tomcat start and page loading size() 100 size() 100 iterator() 10 10after click on next in navigation paging size() 100 size() 100 iterator() 20 10after click on some page in navigation paging thank you for your help. vilo On 05/22/2012 06:15 PM, Thomas Götz wrote: Could you please provide a quickstart that demonstrates your implementation? -Tom On 22.05.2012 at 17:54 Viliam Repan wrote: Hi, I probably found a bug in DataTable and PagingNavigator, or more likely I don't understand it correctly... I have page with one data table and two paging navigators in form, html part looks like this: form wicket:id=mainForm div wicket:id=pTop/ div wicket:id=table/ div wicket:id=pBottom/ /form Java code - constructor: public PageTest() { Form mainForm = new Form(mainForm); add(mainForm); DataTableUserType table = new DataTableUserType(table, initColumns(), new ObjectDataProvider(PageTest.this, UserType.class), 10); table.setOutputMarkupId(true); mainForm.add(table); PagingNavigator pTop = new PagingNavigator(pTop, table); mainForm.add(pTop); PagingNavigator pBottom = new PagingNavigator(pBottom, table); mainForm.add(pBottom); } After first page load, I can see in logs: 2012-05-22 17:45:11,049 TRACE (c.e.m.w.c.d.ObjectDataProvider): begin::size() 2012-05-22 17:45:12,081 TRACE (c.e.m.w.c.d.ObjectDataProvider): end::size() 2012-05-22 17:45:12,081 TRACE (c.e.m.w.c.d.ObjectDataProvider): begin::iterator() from 0 count 10. 2012-05-22 17:45:12,546 TRACE (c.e.m.w.c.d.ObjectDataProvider): end::iterator() After click on next page, I see in logs: 2012-05-22 17:45:19,620 TRACE (c.e.m.w.c.d.ObjectDataProvider): begin::size() 2012-05-22 17:45:20,693 TRACE (c.e.m.w.c.d.ObjectDataProvider): end::size() 2012-05-22 17:45:20,696 TRACE (c.e.m.w.c.d.ObjectDataProvider): begin::size() 2012-05-22 17:45:21,722 TRACE (c.e.m.w.c.d.ObjectDataProvider): end::size() 2012-05-22 17:45:21,722 TRACE (c.e.m.w.c.d.ObjectDataProvider): begin::iterator() from 10 count 10. 2012-05-22 17:45:22,164 TRACE (c.e.m.w.c.d.ObjectDataProvider): end::iterator() size() method in data provider is called twice, that's probably a bug. I have many objects in db (up to 500k), so it's a 1s-2s difference in response time. I'm suspecting that it's caused by AbstractPageableView.getCurrentPage(), because there is a check which calls getPageCount() which calls getItemCount(). There is some caching mechanism for count, but it's not working in this case... Can somebody help please, any ideas? Vilo - 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 datatable-sample.zip - 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: DataTable and PagingNavigator problem
Hi, I saw a patch already prepared to fix this bug. Does wicket have some release plan/calendar - I mean when could I expect next version of wicket (and this to be inserted in)? :) Thank you. vilo On 05/22/2012 10:26 PM, Thomas Götz wrote: This looks indeed like a bug to me. I opened a ticket for this: https://issues.apache.org/jira/browse/WICKET-4568 -Tom On 22.05.2012 at 21:10 Viliam Repan wrote: Hi, I've create sample mvn project, after build and deploy you can see sysouts like this: size() 100 iterator() 0 10 size() 100 iterator() 0 10 after tomcat start and page loading size() 100 size() 100 iterator() 10 10after click on next in navigation paging size() 100 size() 100 iterator() 20 10after click on some page in navigation paging thank you for your help. vilo On 05/22/2012 06:15 PM, Thomas Götz wrote: Could you please provide a quickstart that demonstrates your implementation? -Tom On 22.05.2012 at 17:54 Viliam Repan wrote: Hi, I probably found a bug in DataTable and PagingNavigator, or more likely I don't understand it correctly... I have page with one data table and two paging navigators in form, html part looks like this: form wicket:id=mainForm div wicket:id=pTop/ div wicket:id=table/ div wicket:id=pBottom/ /form Java code - constructor: public PageTest() { Form mainForm = new Form(mainForm); add(mainForm); DataTableUserType table = new DataTableUserType(table, initColumns(), new ObjectDataProvider(PageTest.this, UserType.class), 10); table.setOutputMarkupId(true); mainForm.add(table); PagingNavigator pTop = new PagingNavigator(pTop, table); mainForm.add(pTop); PagingNavigator pBottom = new PagingNavigator(pBottom, table); mainForm.add(pBottom); } After first page load, I can see in logs: 2012-05-22 17:45:11,049 TRACE (c.e.m.w.c.d.ObjectDataProvider): begin::size() 2012-05-22 17:45:12,081 TRACE (c.e.m.w.c.d.ObjectDataProvider): end::size() 2012-05-22 17:45:12,081 TRACE (c.e.m.w.c.d.ObjectDataProvider): begin::iterator() from 0 count 10. 2012-05-22 17:45:12,546 TRACE (c.e.m.w.c.d.ObjectDataProvider): end::iterator() After click on next page, I see in logs: 2012-05-22 17:45:19,620 TRACE (c.e.m.w.c.d.ObjectDataProvider): begin::size() 2012-05-22 17:45:20,693 TRACE (c.e.m.w.c.d.ObjectDataProvider): end::size() 2012-05-22 17:45:20,696 TRACE (c.e.m.w.c.d.ObjectDataProvider): begin::size() 2012-05-22 17:45:21,722 TRACE (c.e.m.w.c.d.ObjectDataProvider): end::size() 2012-05-22 17:45:21,722 TRACE (c.e.m.w.c.d.ObjectDataProvider): begin::iterator() from 10 count 10. 2012-05-22 17:45:22,164 TRACE (c.e.m.w.c.d.ObjectDataProvider): end::iterator() size() method in data provider is called twice, that's probably a bug. I have many objects in db (up to 500k), so it's a 1s-2s difference in response time. I'm suspecting that it's caused by AbstractPageableView.getCurrentPage(), because there is a check which calls getPageCount() which calls getItemCount(). There is some caching mechanism for count, but it's not working in this case... Can somebody help please, any ideas? Vilo - 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 datatable-sample.zip - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket 6 setting response page with page object and session expired error
but why?? test it with mvn clean install jetty:run pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __ On 22 May 2012 20:47, Thomas Götz t...@decoded.de wrote: I tested your quickstart from within the IDE by running Start.java. Models are meant to be passed around, so there's nothing wrong with it in general. And it's always (at least in 95% of cases I'd dare to say) preferable to passing Objects (beans). -Tom On 22.05.2012 at 18:55 kamiseq wrote: anyway there is nothing wrong to my code, in your opnion? I just have bad feeling about passing model from one page to another in constructor. on the other hand model are serialised into session so maybe it is a better idea to pass them around rather than object they are wrapping pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __ On 22 May 2012 18:13, kamiseq kami...@gmail.com wrote: huh, then something is wrong with my environment, im running it with jetty invoking simple mvn clean install jetty:run pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DataTable and PagingNavigator problem
The patch is yet only a proposal by me on how this might be fixed. Any of the committers might want to look at it before maybe ;-) As for the release date of the next version: I guess when it is ready ;-) -Tom On 22.05.2012 at 22:49 Viliam Repan wrote: Hi, I saw a patch already prepared to fix this bug. Does wicket have some release plan/calendar - I mean when could I expect next version of wicket (and this to be inserted in)? :) Thank you. vilo - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket 6 setting response page with page object and session expired error
i checked it on other machine, and is working, I ve cleaned m2 repository and now it is working as well :/ I dont know what happened but it is weird that it showed on two separate application thanks for help, actually it is great it was only may problem ;] pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __ On 22 May 2012 22:52, kamiseq kami...@gmail.com wrote: but why?? test it with mvn clean install jetty:run pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __ On 22 May 2012 20:47, Thomas Götz t...@decoded.de wrote: I tested your quickstart from within the IDE by running Start.java. Models are meant to be passed around, so there's nothing wrong with it in general. And it's always (at least in 95% of cases I'd dare to say) preferable to passing Objects (beans). -Tom On 22.05.2012 at 18:55 kamiseq wrote: anyway there is nothing wrong to my code, in your opnion? I just have bad feeling about passing model from one page to another in constructor. on the other hand model are serialised into session so maybe it is a better idea to pass them around rather than object they are wrapping pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __ On 22 May 2012 18:13, kamiseq kami...@gmail.com wrote: huh, then something is wrong with my environment, im running it with jetty invoking simple mvn clean install jetty:run pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to redirect to a page from an AJAX request?
My apologies, setResponsePage does work from AJAX requests. I had two problems - one with a missing JS reference which I detected by looking at Wicket Ajax Debug and the other one with my Wicket test class. Thanks, Alec On Tue, May 22, 2012 at 12:08 AM, Alexander Cherednichenko lex...@gmail.com wrote: hi! you could check it with the Wicket Ajax Debug - for the ajax redirect it should receive and process javascript instruction which resets location of the page. maybe there are some JS errors out there? On May 22, 2012 8:59 AM, Melinda Dweer melinda.dw...@gmail.com wrote: IFAIK setResponsePage(Page.class) should work: at least I remember using it successfully on an AJAX request cycle to redirect to a different page. Regards, Melinda On Tue, May 22, 2012 at 2:41 AM, Alec Swan alecs...@gmail.com wrote: Hello, I use AjaxSubmitLink to submit a form that has captcha. I refresh captcha by adding it to ajax request. However, when the user successfully submits the form I want to redirect the user to a different page. I tried setResponsePage and throw new RestartResponseException in AjaxSubmitLink#onSubmit, but they seem to have no effect. How can I redirect the user to a page from an ajax request? Thanks, Alec - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AJAX-swappable bookmarkable unversioned tabs
Thoughts, anybody? On Mon, May 21, 2012 at 4:21 PM, Alec Swan alecs...@gmail.com wrote: Hello, We are starting a new project where we need to implement a simple menu using Wicket 1.4.17. In my previous project I implemented tabbing using ajax-swappable panels. I really liked the smooth tab transition you get with this approach. The two things I disliked were versionable pages and that tabs were not bookmarkable. Is it possible to have the ajax-swappable bookmarkable tabs without versioned pages? Thanks, Alec - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org