Re: go top after ajax
target.focusComponent(...) + "window.document.body.scrollTop = 0; window.document.documentElement.scrollTop = 0; " work just as I need. Thanks. -- View this message in context: http://www.nabble.com/go-top-after-ajax-tp20954146p20954690.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
go top after ajax
Hi, I use AjaxSubmitLink as a submit link for big and long form. In onError method I add to AjaxRequestTarget whole form and some error messages. I'd like to go top after ajax but I don't know how. I tried to do two folowings but it does not work. 1. protected void onError(AjaxRequestTarget target, Form form) { target.appendJavascript("window.document.body.scrollTop = 0; window.document.documentElement.scrollTop = 0"); target.addComponent(longBigForm); } 2. in AjaxCallDecorator public CharSequence decorateOnSuccessScript(CharSequence script) { return "window.document.body.scrollTop = 0; window.document.documentElement.scrollTop = 0; " + decoratePostEventScript(super.decorateOnSuccessScript(script)); } in both situations I see that browser shows top but after that immediately back down have you any sugestions? Kamil -- View this message in context: http://www.nabble.com/go-top-after-ajax-tp20954146p20954146.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
backbutton with AjaxFallbackDefaultDataTable
Hi, I have a problem with browser's backbutton and AjaxFallbackDefaultDataTable, I have button that adds new rows into table (I put new objects into table's model and udate table with ajax). when I click some link to other page and after redirect I click browser's backbutton then my table is empty until I refresh the browser. How to fix it? I think the reason of above is that after back onRender is not invoked Regards Kamil. -- View this message in context: http://www.nabble.com/backbutton-with-AjaxFallbackDefaultDataTable-tp20791685p20791685.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RES: How can I instance home page myself
Yes I know that I can do it through Application but then it is very dificult to test. If I could inject args into constructur like below then it would be much better new MyPage(Foo foo){...} -- View this message in context: http://www.nabble.com/How-can-I-instance-home-page-myself-tp20723688p20723898.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How can I instance home page myself
an Application class (and WebApplication) has method Class getHomePage() Why this method returns class instead of Page object? Now I'm limited to use non-argument constructor, I connot pass any dependiences and so on. Are there any posibilities to instance and return Page object? regards Kamil -- View this message in context: http://www.nabble.com/How-can-I-instance-home-page-myself-tp20723688p20723688.html Sent from the Wicket - User mailing list archive at Nabble.com.