Re: Any news on 1.5 - mapping different error pages for specific errors
I will try to contribute -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Any-news-on-1-5-mapping-different-error-pages-for-specific-errors-tp3602151p4588983.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: FilterForm Date column formatting
Hi, Yes, sorry for that. --- Last cause: Component [cell] (path = [5:datatablecontainer:filterForm:datatable:body:rows:1:cells:3:cell]) must be applied to a tag of type [input], not: '' (line 0, column 0) Markup The problem is in jar:file:/X:/mavenrepo/org/apache/wicket/wicket-extensions/1.5.5/wicket-extensions-1.5.5.jar!/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html: [cell] -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/FilterForm-Date-column-formatting-tp4586557p4589021.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: FilterForm Date column formatting
I think the problem is markup for cells is a span. You need to create a panel wicket:panel input wicket:id=dateField/ /wicket:panel .. Your date file code and add that panel to table cell. Regards, Melinda On Thu, Apr 26, 2012 at 8:48 AM, Sandor Feher sfe...@bluesystem.hu wrote: Hi, Yes, sorry for that. --- Last cause: Component [cell] (path = [5:datatablecontainer:filterForm:datatable:body:rows:1:cells:3:cell]) must be applied to a tag of type [input], not: '' (line 0, column 0) Markup The problem is in jar:file:/X:/mavenrepo/org/apache/wicket/wicket-extensions/1.5.5/wicket-extensions-1.5.5.jar!/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html: [cell] -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/FilterForm-Date-column-formatting-tp4586557p4589021.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: FilterForm Date column formatting
Ok, I will have try... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/FilterForm-Date-column-formatting-tp4586557p4589073.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
setResponsePage in ajax call
Hi, I have difficulties in using the setResponsePage in ajax call as Wicket seems to direct the call to a relative URL. As a result, the request is made to the root context an that gives me a 404. The scenario is as follows: I have a login form and would like to provide user feedback on submission errors as ajax responses. Upon success, the user should be redirected to a new page. I have already found a thread on a similar issue and there it said, that this was fixed in 1.4.7. As I am using 1.5.3 this should presumably work. Am I doing something wrong here? Cheers, Jürgen - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: setResponsePage in ajax call
Please provide some code-samples to show us what you are doing. If it's related to an older issue it would be great if you could give more details (link to the issue). Am 26.04.12 11:05 schrieb Jürgen Lind unter juergen.l...@iteratec.de: Hi, I have difficulties in using the setResponsePage in ajax call as Wicket seems to direct the call to a relative URL. As a result, the request is made to the root context an that gives me a 404. The scenario is as follows: I have a login form and would like to provide user feedback on submission errors as ajax responses. Upon success, the user should be redirected to a new page. I have already found a thread on a similar issue and there it said, that this was fixed in 1.4.7. As I am using 1.5.3 this should presumably work. Am I doing something wrong here? Cheers, Jürgen - 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: FilterForm Date column formatting
Hi, If I do it in this way, then all of my cells in that column will change to input textfield. But I only want to change the cell which in the filter form row. Regards, Sandor -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/FilterForm-Date-column-formatting-tp4586557p4589323.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: setResponsePage in ajax call
Thanks for the quick responses... First of all the code sample: in my LoginPanel I have a method that is invoked if the user authentication succeeds: protected void onSuccess(AuthenticatedUser user, AjaxRequestTarget target) { EmobWebSession.get().setAuthenticatedUser(user); if (!LoginPage.this.continueToOriginalDestination()) { PageParameters pp = new PageParameters(); pp.add(page, fleetlist); setResponsePage(new DesktopPage(pp)); } } this code leads me to the root context of the server... Oddly enough, I do not see a redirect reponse neither in firebug nor in TamperData... If I replace the setResponsePage call with the following code, everything works just fine: getRequestCycle().scheduleRequestHandlerAfterCurrent( new RedirectRequestHandler(/desktop)); Is that a valid approach to achieving my goal or ist this just voodoo programming? J. On 26.04.2012 11:28, Martin Grigorov wrote: Hi Juergen, This scenario should work just fine. Wicket returnsredirect./some/relative/url/redirect in the Ajax response and uses window.location=url to do the redirect Please try with 1.5.5 and create a ticket with a quickstart if it still fails for you. On Thu, Apr 26, 2012 at 12:05 PM, Jürgen Lindjuergen.l...@iteratec.de wrote: Hi, I have difficulties in using the setResponsePage in ajax call as Wicket seems to direct the call to a relative URL. As a result, the request is made to the root context an that gives me a 404. The scenario is as follows: I have a login form and would like to provide user feedback on submission errors as ajax responses. Upon success, the user should be redirected to a new page. I have already found a thread on a similar issue and there it said, that this was fixed in 1.4.7. As I am using 1.5.3 this should presumably work. Am I doing something wrong here? Cheers, Jürgen - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Mit freundlichen Grüßen, Jürgen Lind -- Dr. Jürgen Lind iteratec GmbHFon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de Sitz und Registergericht der iteratec GmbH: München HRB 113 519 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: FilterForm Date column formatting
Can't use a conditional statement? If filter add panel if not call super.populateItem? On Thu, Apr 26, 2012 at 11:36 AM, Sandor Feher sfe...@bluesystem.hu wrote: Hi, If I do it in this way, then all of my cells in that column will change to input textfield. But I only want to change the cell which in the filter form row. Regards, Sandor -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/FilterForm-Date-column-formatting-tp4586557p4589323.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: setResponsePage in ajax call
On Thu, Apr 26, 2012 at 12:50 PM, Jürgen Lind juergen.l...@iteratec.de wrote: Thanks for the quick responses... First of all the code sample: in my LoginPanel I have a method that is invoked if the user authentication succeeds: protected void onSuccess(AuthenticatedUser user, AjaxRequestTarget target) { EmobWebSession.get().setAuthenticatedUser(user); if (!LoginPage.this.continueToOriginalDestination()) { PageParameters pp = new PageParameters(); pp.add(page, fleetlist); setResponsePage(new DesktopPage(pp)); There is a small but important difference between setResponsePage(Page) and setResponsePage(Class). In most cases I'd recommend to use the Class variant because it produces nicer urls if the page class is mounted. What should happen in your case: by using the Page variant Wicket will render DesktopPage in the Ajax request, will store a BufferedWebResponse for it in the Application and will do a redirect to url like ../wicket/page?pageId. The redirect will be done as I explained in my previous mail - by returning ajax-responseredirect...// and reload the page with: document.location=.../wicket/page?pageId. This request will be handled by BufferedResponseMapper because it will find stored response for that url. } } this code leads me to the root context of the server... Oddly enough, I do not see a redirect reponse neither in firebug nor in TamperData... If I replace the setResponsePage call with the following code, everything works just fine: getRequestCycle().scheduleRequestHandlerAfterCurrent( new RedirectRequestHandler(/desktop)); Is that a valid approach to achieving my goal or ist this just voodoo programming? J. On 26.04.2012 11:28, Martin Grigorov wrote: Hi Juergen, This scenario should work just fine. Wicket returnsredirect./some/relative/url/redirect in the Ajax response and uses window.location=url to do the redirect Please try with 1.5.5 and create a ticket with a quickstart if it still fails for you. On Thu, Apr 26, 2012 at 12:05 PM, Jürgen Lindjuergen.l...@iteratec.de wrote: Hi, I have difficulties in using the setResponsePage in ajax call as Wicket seems to direct the call to a relative URL. As a result, the request is made to the root context an that gives me a 404. The scenario is as follows: I have a login form and would like to provide user feedback on submission errors as ajax responses. Upon success, the user should be redirected to a new page. I have already found a thread on a similar issue and there it said, that this was fixed in 1.4.7. As I am using 1.5.3 this should presumably work. Am I doing something wrong here? Cheers, Jürgen - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Mit freundlichen Grüßen, Jürgen Lind -- Dr. Jürgen Lind iteratec GmbH Fon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de Sitz und Registergericht der iteratec GmbH: München HRB 113 519 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel - 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: FilterForm Date column formatting
Sorry, I didn't understand that you want to do that for the filter field. Override org.apache.wicket.extensions.markup.html.repeater.data.table.filter.TextFilteredPropertyColumn#getFilter() instead. On Thu, Apr 26, 2012 at 12:36 PM, Sandor Feher sfe...@bluesystem.hu wrote: Hi, If I do it in this way, then all of my cells in that column will change to input textfield. But I only want to change the cell which in the filter form row. Regards, Sandor -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/FilterForm-Date-column-formatting-tp4586557p4589323.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: FilterForm Date column formatting
Ok, np. Here is what I did: c IColumn crdCol=new TextFilteredPropertyColumnHrpContent, String(new ResourceModel(contentlisttable.crd), crd, crd) { @Override public Component getFilter(String componentId, FilterForm? form) { DateConverter dc=new DateConverter(true) { @Override public String getDatePattern(Locale locale) { return mm dd; } @Override protected DateTimeFormatter getFormat(Locale locale) { DateTimeFormatter fm=DateTimeFormat.forPattern( mm DD); return fm; } }; return new DateTextField(componentId,dc); } }; c Now it complains for this: Last cause: Component [filter] (path = [5:datatablecontainer:filterForm:datatable:topToolbars:toolbars:3:filters:3:filter]) must be applied to a tag of type [input], not: 'td wicket:id=filter class=filter-td' (line 0, column 0) Markup The problem is in jar:file:/X:/mavenrepo/org/apache/wicket/wicket-extensions/1.5.5/wicket-extensions-1.5.5.jar!/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterToolbar.html: td wicket:id=filter class=filter-td[filter]/td -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/FilterForm-Date-column-formatting-tp4586557p4589406.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: FilterForm Date column formatting
As Melinda said earlier you need to use a Panel. The idea is that this way you can use more complex components for filtering, e.g. from-to dates, a Panel with two date fields. On Thu, Apr 26, 2012 at 1:26 PM, Sandor Feher sfe...@bluesystem.hu wrote: Ok, np. Here is what I did: c IColumn crdCol=new TextFilteredPropertyColumnHrpContent, String(new ResourceModel(contentlisttable.crd), crd, crd) { @Override public Component getFilter(String componentId, FilterForm? form) { DateConverter dc=new DateConverter(true) { @Override public String getDatePattern(Locale locale) { return mm dd; } @Override protected DateTimeFormatter getFormat(Locale locale) { DateTimeFormatter fm=DateTimeFormat.forPattern( mm DD); return fm; } }; return new DateTextField(componentId,dc); } }; c Now it complains for this: Last cause: Component [filter] (path = [5:datatablecontainer:filterForm:datatable:topToolbars:toolbars:3:filters:3:filter]) must be applied to a tag of type [input], not: 'td wicket:id=filter class=filter-td' (line 0, column 0) Markup The problem is in jar:file:/X:/mavenrepo/org/apache/wicket/wicket-extensions/1.5.5/wicket-extensions-1.5.5.jar!/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterToolbar.html: td wicket:id=filter class=filter-td[filter]/td -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/FilterForm-Date-column-formatting-tp4586557p4589406.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: setResponsePage in ajax call
Hi Martin, thnaks for your reply and the explanation, I have now switched to the class-based variant and it works like it should. J. On 26.04.2012 12:05, Martin Grigorov wrote: On Thu, Apr 26, 2012 at 12:50 PM, Jürgen Lindjuergen.l...@iteratec.de wrote: Thanks for the quick responses... First of all the code sample: in my LoginPanel I have a method that is invoked if the user authentication succeeds: protected void onSuccess(AuthenticatedUser user, AjaxRequestTarget target) { EmobWebSession.get().setAuthenticatedUser(user); if (!LoginPage.this.continueToOriginalDestination()) { PageParameters pp = new PageParameters(); pp.add(page, fleetlist); setResponsePage(new DesktopPage(pp)); There is a small but important difference between setResponsePage(Page) and setResponsePage(Class). In most cases I'd recommend to use the Class variant because it produces nicer urls if the page class is mounted. What should happen in your case: by using the Page variant Wicket will render DesktopPage in the Ajax request, will store a BufferedWebResponse for it in the Application and will do a redirect to url like ../wicket/page?pageId. The redirect will be done as I explained in my previous mail - by returning ajax-responseredirect...// and reload the page with: document.location=.../wicket/page?pageId. This request will be handled by BufferedResponseMapper because it will find stored response for that url. } } this code leads me to the root context of the server... Oddly enough, I do not see a redirect reponse neither in firebug nor in TamperData... If I replace the setResponsePage call with the following code, everything works just fine: getRequestCycle().scheduleRequestHandlerAfterCurrent( new RedirectRequestHandler(/desktop)); Is that a valid approach to achieving my goal or ist this just voodoo programming? J. On 26.04.2012 11:28, Martin Grigorov wrote: Hi Juergen, This scenario should work just fine. Wicket returnsredirect./some/relative/url/redirectin the Ajax response and uses window.location=url to do the redirect Please try with 1.5.5 and create a ticket with a quickstart if it still fails for you. On Thu, Apr 26, 2012 at 12:05 PM, Jürgen Lindjuergen.l...@iteratec.de wrote: Hi, I have difficulties in using the setResponsePage in ajax call as Wicket seems to direct the call to a relative URL. As a result, the request is made to the root context an that gives me a 404. The scenario is as follows: I have a login form and would like to provide user feedback on submission errors as ajax responses. Upon success, the user should be redirected to a new page. I have already found a thread on a similar issue and there it said, that this was fixed in 1.4.7. As I am using 1.5.3 this should presumably work. Am I doing something wrong here? Cheers, Jürgen - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Mit freundlichen Grüßen, Jürgen Lind -- Dr. Jürgen Lind iteratec GmbHFon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de Sitz und Registergericht der iteratec GmbH: München HRB 113 519 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Mit freundlichen Grüßen, Jürgen Lind -- Dr. Jürgen Lind iteratec GmbHFon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de Sitz und Registergericht der iteratec GmbH: München HRB 113 519 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: setResponsePage in ajax call
It should work even with the Page variant. Please create a quickstart and attach it to a ticket. On Thu, Apr 26, 2012 at 1:58 PM, Jürgen Lind juergen.l...@iteratec.de wrote: Hi Martin, thnaks for your reply and the explanation, I have now switched to the class-based variant and it works like it should. J. On 26.04.2012 12:05, Martin Grigorov wrote: On Thu, Apr 26, 2012 at 12:50 PM, Jürgen Lindjuergen.l...@iteratec.de wrote: Thanks for the quick responses... First of all the code sample: in my LoginPanel I have a method that is invoked if the user authentication succeeds: protected void onSuccess(AuthenticatedUser user, AjaxRequestTarget target) { EmobWebSession.get().setAuthenticatedUser(user); if (!LoginPage.this.continueToOriginalDestination()) { PageParameters pp = new PageParameters(); pp.add(page, fleetlist); setResponsePage(new DesktopPage(pp)); There is a small but important difference between setResponsePage(Page) and setResponsePage(Class). In most cases I'd recommend to use the Class variant because it produces nicer urls if the page class is mounted. What should happen in your case: by using the Page variant Wicket will render DesktopPage in the Ajax request, will store a BufferedWebResponse for it in the Application and will do a redirect to url like ../wicket/page?pageId. The redirect will be done as I explained in my previous mail - by returning ajax-responseredirect...// and reload the page with: document.location=.../wicket/page?pageId. This request will be handled by BufferedResponseMapper because it will find stored response for that url. } } this code leads me to the root context of the server... Oddly enough, I do not see a redirect reponse neither in firebug nor in TamperData... If I replace the setResponsePage call with the following code, everything works just fine: getRequestCycle().scheduleRequestHandlerAfterCurrent( new RedirectRequestHandler(/desktop)); Is that a valid approach to achieving my goal or ist this just voodoo programming? J. On 26.04.2012 11:28, Martin Grigorov wrote: Hi Juergen, This scenario should work just fine. Wicket returnsredirect./some/relative/url/redirect in the Ajax response and uses window.location=url to do the redirect Please try with 1.5.5 and create a ticket with a quickstart if it still fails for you. On Thu, Apr 26, 2012 at 12:05 PM, Jürgen Lindjuergen.l...@iteratec.de wrote: Hi, I have difficulties in using the setResponsePage in ajax call as Wicket seems to direct the call to a relative URL. As a result, the request is made to the root context an that gives me a 404. The scenario is as follows: I have a login form and would like to provide user feedback on submission errors as ajax responses. Upon success, the user should be redirected to a new page. I have already found a thread on a similar issue and there it said, that this was fixed in 1.4.7. As I am using 1.5.3 this should presumably work. Am I doing something wrong here? Cheers, Jürgen - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Mit freundlichen Grüßen, Jürgen Lind -- Dr. Jürgen Lind iteratec GmbH Fon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de Sitz und Registergericht der iteratec GmbH: München HRB 113 519 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Mit freundlichen Grüßen, Jürgen Lind -- Dr. Jürgen Lind iteratec GmbH Fon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de Sitz und Registergericht der iteratec GmbH: München HRB 113 519 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel - 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
discrepancy between JavaDoc and code in MarkupContainer#visitChildren()
Hi list, the JavaDoc for MarkupContainer#visitChildren() states that @param clazz The class of child to visit, or null to visit all children The parameter clazz is used to create a new ClassVisitFilter which in its visitObject() does not check for clazz == null, leading to a NPE. regards Bert - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: discrepancy between JavaDoc and code in MarkupContainer#visitChildren()
File a ticket please. On Thu, Apr 26, 2012 at 2:17 PM, Bert taser...@gmail.com wrote: Hi list, the JavaDoc for MarkupContainer#visitChildren() states that @param clazz The class of child to visit, or null to visit all children The parameter clazz is used to create a new ClassVisitFilter which in its visitObject() does not check for clazz == null, leading to a NPE. regards Bert - 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: discrepancy between JavaDoc and code in MarkupContainer#visitChildren()
Hi Martin, done. https://issues.apache.org/jira/browse/WICKET-4519 Bert On Thu, Apr 26, 2012 at 13:18, Martin Grigorov mgrigo...@apache.org wrote: File a ticket please. On Thu, Apr 26, 2012 at 2:17 PM, Bert taser...@gmail.com wrote: Hi list, the JavaDoc for MarkupContainer#visitChildren() states that @param clazz The class of child to visit, or null to visit all children The parameter clazz is used to create a new ClassVisitFilter which in its visitObject() does not check for clazz == null, leading to a NPE. regards Bert - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 1.5 - new browser window support detection
Hi David, I just attached a demo app with a behavior to https://issues.apache.org/jira/browse/WICKET-4308 that implements the requested functionality. Please try it and give feedback. On Thu, Apr 26, 2012 at 8:30 AM, David Rain david_r...@kb.cz wrote: Hello Martin! I do not use it right now but I would like to. I knew it was there because I've studied API and sources of Wicket. But it was in time we used Wicket 1.4 and I knew I came across this onNewBrowserWindow method and many classes implemented it http://wicket.apache.org/apidocs/1.4/index.html?org/apache/wicket/markup/html/INewBrowserWindowListener.html Now it is gone (we use Wicket 1.5.5 now). We have an application that is completely AJAX like. Only 2 page (login main) a the content inside is switched (via replace methods and AjaxRequestTarget#add). But - as far as security is concerned - we have to logout user and destroy session when he opens another window or tab. That's a rule we cannot break. So I need some detection of new window opened event. I use logout and session invalidation in onConfigure now - the main page is rendered only once, everything is made via AJAX calls then. Thus another render attempt means that user opened new window or tab (but he could have also pressed F5 - and it would end in logout too, but in this case we do not want it - that's why I said it's just a temporary workaround). Thanks for any ideas. David -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-new-browser-window-support-detection-tp4582538p4588927.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: Wicket 1.5 - new browser window support detection
Works great man! Honestly, I wanted to write somekind of javascript like yours but I thought that something like this must already be in Wicket to support multiple window instances (and I am sure that it was there in W 1.4). Nevertheless, thank you very much! David -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-new-browser-window-support-detection-tp4582538p4589586.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 1.5 - new browser window support detection
Good! Wicket 1.4 implements this a bit differently and honestly I don't quite understand how it works exactly. My version requires Ajax behavior, this is OK for your case but may not be OK for other people... Let's see what the reporter of the ticket thinks about it and then we can discuss adding it in Wicket officially. On Thu, Apr 26, 2012 at 2:47 PM, David Rain david_r...@kb.cz wrote: Works great man! Honestly, I wanted to write somekind of javascript like yours but I thought that something like this must already be in Wicket to support multiple window instances (and I am sure that it was there in W 1.4). Nevertheless, thank you very much! David -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-new-browser-window-support-detection-tp4582538p4589586.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
[RESOLVED] Re: FilterForm Date column formatting
Hi, Works fine now :). Melinda, Martin! Thank you for your help. I really appreciate that! Just for the archive. I add a panel overriding the getFilter method. - IColumn crdCol=new TextFilteredPropertyColumnHrpContent, String(new ResourceModel(contentlisttable.crd), crd, crd) { @Override public Component getFilter(String componentId, FilterForm? form) { return new DateTextFieldPanel(componentId,getFilterModel(form)); } }; columns.add(crdCol); - Here is my panel. class DateTextFieldPanel extends Panel { public DateTextFieldPanel(String id,IModel model) { super(id,model); DateConverter dc=new DateConverter(true) { @Override public String getDatePattern(Locale locale) { return .MM.dd; } @Override protected DateTimeFormatter getFormat(Locale locale) { DateTimeFormatter fm=DateTimeFormat.forPattern(.MM.dd); return fm; } }; DateTextField dtf =new DateTextField(id,model,dc); add(dtf); } } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/FilterForm-Date-column-formatting-tp4586557p4589807.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
Wicket 6-beta1 - How to call a javascript function after component render?
Hi, I'm developing a component that needs to call a javascript function after it's rendered (throw and AJAX update or a normal request). I get it running like this: @Override protected void onBeforeRender() { super.onBeforeRender(); AjaxRequestTarget target = RequestCycle.get().find(AjaxRequestTarget.class); if (target != null) { target.appendJavaScript( getInitJavaScript() ); } } @Override public void renderHead(IHeaderResponse response) { response.render(JavaScriptHeaderItem.forScript( Wicket.Event.add(window, \load\, function(event) { + getInitJavaScript() + });, load-codemirror-js) ); } But, Is there a better way? Thanks! -- a10! i fins aviat. J:-Deu - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 6-beta1 - How to call a javascript function after component render?
Hi, All you need is #renderHead() that does: response.render(OnDomReadyHeaderItem.forScript(getInitJavaScript()) initJS will be delivered to the page after each re-render of the component - both Ajax and non-Ajax. On Thu, Apr 26, 2012 at 4:46 PM, Jordi Deu-Pons jo...@jordeu.net wrote: Hi, I'm developing a component that needs to call a javascript function after it's rendered (throw and AJAX update or a normal request). I get it running like this: @Override protected void onBeforeRender() { super.onBeforeRender(); AjaxRequestTarget target = RequestCycle.get().find(AjaxRequestTarget.class); if (target != null) { target.appendJavaScript( getInitJavaScript() ); } } @Override public void renderHead(IHeaderResponse response) { response.render(JavaScriptHeaderItem.forScript( Wicket.Event.add(window, \load\, function(event) { + getInitJavaScript() + });, load-codemirror-js) ); } But, Is there a better way? Thanks! -- a10! i fins aviat. J:-Deu - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 6-beta1 - How to call a javascript function after component render?
Perfect, it works. Thanks! On Thu, Apr 26, 2012 at 3:52 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, All you need is #renderHead() that does: response.render(OnDomReadyHeaderItem.forScript(getInitJavaScript()) initJS will be delivered to the page after each re-render of the component - both Ajax and non-Ajax. On Thu, Apr 26, 2012 at 4:46 PM, Jordi Deu-Pons jo...@jordeu.net wrote: Hi, I'm developing a component that needs to call a javascript function after it's rendered (throw and AJAX update or a normal request). I get it running like this: @Override protected void onBeforeRender() { super.onBeforeRender(); AjaxRequestTarget target = RequestCycle.get().find(AjaxRequestTarget.class); if (target != null) { target.appendJavaScript( getInitJavaScript() ); } } @Override public void renderHead(IHeaderResponse response) { response.render(JavaScriptHeaderItem.forScript( Wicket.Event.add(window, \load\, function(event) { + getInitJavaScript() + });, load-codemirror-js) ); } But, Is there a better way? Thanks! -- a10! i fins aviat. J:-Deu - 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 -- a10! i fins aviat. J:-Deu - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Aggregating JavaScript
I would like to aggregate all javascript and move to the bottom of the page. I looked into the resource aggregation example and also filtering header response. If I understand correctly header response filter methods are called only when the scripts are added explicitly through IHeaderResponse methods (renderJavaSCriptReference ..etc) In our case, scripts are added in the markup (these markups are defined in the CMS). Is there a way to collect all scripts from the markup and also added through IHeaderResponse? Regards, Ashoka Upadhya Principal Software Engineer Art.com Phone: (510) 879-4858 Fax: (510) 588-3930 http://www.art.com/ http://www.allposters.com/ http://www.artistrising.com/ If you have received this e-mail in error, please immediately notify the sender by reply e-mail and destroy the original e-mail and its attachments without reading or saving them. This e-mail and any documents, files or previous e-mail messages attached to it, may contain confidential or privileged information that is prohibited from disclosure under confidentiality agreement or applicable law. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of this e-mail or any of the information contained in or attached to this e-mail is STRICTLY PROHIBITED. Thank you.
Re: Wicket dropdownchoice onselectionchanged must override or implement a supertype method
Thanks all for the reply, You were right...I did the change and it worked. And also, SelectOption is not wicket one but a class created by me only: package WalknShine; import java.io.Serializable; public class SelectOption implements Serializable{ /** * */ private static final long serialVersionUID = 1L; private int key; private String value; public SelectOption(int key, String value) { this.key = key; this.value = value; } getters and setters... } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-dropdownchoice-onselectionchanged-must-override-or-implement-a-supertype-method-tp4584391p4590526.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
getting client's TimeZone and performace
when setting getRequestCycleSettings().setGatherExtendedBrowserInfo(true), it lets Wicket do a sneaky redirect to BrowserInfoPage (and back again) to get the extended browser info including the timezone from the client. I wanted to know if that occurs on every request or just once per session 'cause I just need to get the client's timezone once for a particular session. Thanks! Carlos -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/getting-client-s-TimeZone-and-performace-tp4590597p4590597.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: getting client's TimeZone and performace
Once per session infiniter infini...@gmail.com wrote: when setting getRequestCycleSettings().setGatherExtendedBrowserInfo(true), it lets Wicket do a sneaky redirect to BrowserInfoPage (and back again) to get the extended browser info including the timezone from the client. I wanted to know if that occurs on every request or just once per session 'cause I just need to get the client's timezone once for a particular session. Thanks! Carlos -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/getting-client-s-TimeZone-and-performace-tp4590597p4590597.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: getting client's TimeZone and performace
So, no risk of a poor user experience? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/getting-client-s-TimeZone-and-performace-tp4590597p4591533.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: Trying to use IAjaxCallDecorator after Modal Window close
Hello, how do you solved the problem exactly? kind regards -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Trying-to-use-IAjaxCallDecorator-after-Modal-Window-close-tp4081142p4589548.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: getting client's TimeZone and performace
That depends on how much you value the landing experience. There will be an extra page rendering and redirect for each new session. I haven't noticed this pattern from any big online retailers, for example, but it may make sense for you. On Thu, Apr 26, 2012 at 6:56 PM, infiniter infini...@gmail.com wrote: So, no risk of a poor user experience? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/getting-client-s-TimeZone-and-performace-tp4590597p4591533.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