problem with Ajax and BookmarkablePage
Hello all, I seem to have a problem with BookmarkablePage and it triggering a full page rebuild after an ajax call, while the Ajax call was only meant to update several fields. The situation is as follows; Our application has a grid with input fields, we use an Ajax behaviour on this grid to process input in these fields and update other fields when values have changed based on the input. Only the values are sent over and updated, not the wicket panels the inputs were on. Now after this Ajax update request has finished, for some reason the page gets rebuild completely (constructor is called through newInstance()). This didn't happen before (we are doing a large refactoring of the app), and none of the recent changes looks like they could have caused this problem, though ofcourse I might have missed something. I tried to trace the problem, but it goes deep into wicket and that it has something to do with the BookmarkablePageRequestTarget is as far as I got. Anyone have any idea on what could cause this problem and how to fix it? Thanks in advance for your time. Regards, Arjan Zwaan.
RE: wicket.properties conflict 1.2.6 vs 1.4.1
Sorry about the late reply, the migration was put on hold for a couple of days as some higher priority project needed some extra resources. The wicket 1.2.6 jar is in an ear file, which is one of the applications. The 1.4.1 jar is included in a war file, which is the other application. Both are deployed with the same JBoss instance. To my knowledge this should work as both wicket versions use different packages and therefore should not conflict with each other. The only problem seems to be in that both wicket versions still look for ALL the wicket.properties files, which probably results in one being overwritten and both applications trying to load the same Initializer class. -Original Message- From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Sent: woensdag 9 september 2009 17:47 To: users@wicket.apache.org Subject: Re: wicket.properties conflict 1.2.6 vs 1.4.1 are you sharing your wicket jars? is both 1.2.6 and 1.4.1 in a servlet container's shared lib dir? -igor On Wed, Sep 9, 2009 at 6:09 AM, A. Zwaan a.zw...@finan.nl wrote: Hello all, At the moment we migrated one of our applications to wicket 1.4.1 to solve an issue, but some of our other application are still running on wicket 1.2.6. Now we ran into a problem with wicket.properties, both wicket versions use the same file and both versions look up ALL the wicket.properties files on the classpath, which results in one of both application loading the wrong Initializer class. Running in separate server instances is a possibility of course, but atm we already have too many of them, so we prefer to run within one server instance. Is there any way around this issue? Also why didn't wicket choose to use a differently named properties file (only used internally) for the new wicket version? It would have allowed to run both version within the same instance without much problems (packages are different already anyway). Thanks in advance. Met vriendelijke groet, Arjan Zwaan F I N A N F i n a n c i a l A n a l y s i s Koggelaan 5-D 8017 JH Zwolle ( Tel. : +31 88 77 88 990 7 E-mail: a.zw...@finan.nl mailto:a.zw...@finan.nl : Internet: www.finan.nl http://www.finan.nl/ (Findesk BV) KvK nr. 29039392 - 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
wicket.properties conflict 1.2.6 vs 1.4.1
Hello all, At the moment we migrated one of our applications to wicket 1.4.1 to solve an issue, but some of our other application are still running on wicket 1.2.6. Now we ran into a problem with wicket.properties, both wicket versions use the same file and both versions look up ALL the wicket.properties files on the classpath, which results in one of both application loading the wrong Initializer class. Running in separate server instances is a possibility of course, but atm we already have too many of them, so we prefer to run within one server instance. Is there any way around this issue? Also why didn't wicket choose to use a differently named properties file (only used internally) for the new wicket version? It would have allowed to run both version within the same instance without much problems (packages are different already anyway). Thanks in advance. Met vriendelijke groet, Arjan Zwaan F I N A N F i n a n c i a l A n a l y s i s Koggelaan 5-D 8017 JH Zwolle ( Tel. : +31 88 77 88 990 7 E-mail: a.zw...@finan.nl mailto:a.zw...@finan.nl : Internet: www.finan.nl http://www.finan.nl/ (Findesk BV) KvK nr. 29039392
wicket migration to 1.4.1 - getBodyContainer
Hello all, We are currently trying to move from wicket 1.2.6 to 1.4.1 and so far it's going well, except for one point. In the constructor of one of our pages we use the getBodyContainer().getBodyContainer() to add an AjaxEventBehavior for the onload event, so we can redirect to the application if we only get one search result on the search page. According to a colleague we did it this way because with setResponsePage it didn't work as smoothly, something with the page needing to be constructed first or so. Anyway, how would we go about this now? The migration guide says we should used renderHead, but it doesn't allow me to add any Ajax stuff from what I can see. Below is a part of the code: getBodyContainer().getBodyContainer().add(new AjaxEventBehavior(onload) { protected void onEvent(AjaxRequestTarget target) { // open worksheet if there is only one result and autoforward is enabled. if (results.size() == 1 autoForward) { SearchViewRow document = results.get(0); preOpenWorksheet(document, target); } } protected IAjaxCallDecorator getAjaxCallDecorator() { return new NotificationDecorator(ResourceBundle.getTranslation(language, ResourceBundle.DEF_ASPECT, LabelTypes.SEARCH_LOADING)); } }); Hope you guys can help me out here, thanks in advance in any case. Met vriendelijke groet, Arjan Zwaan F I N A N F i n a n c i a l A n a l y s i s Koggelaan 5-D 8017 JH Zwolle ( Tel. : +31 88 77 88 990 7 E-mail: a.zw...@finan.nl mailto:a.zw...@finan.nl : Internet: www.finan.nl http://www.finan.nl/ (Findesk BV) KvK nr. 29039392
RE: wicket migration to 1.4.1 - getBodyContainer
Apparently we need to be able to show a ModalWindow in some cases, which in turn needs an AjaxRequestTarget, so I somehow need that Ajax event triggered somewhere when the page is being rendered. Wouldn't adding a wicket:id to the body element and then adding the AjaxEventBehavior to it give me the same result? Or is there something tricky when using the onload event of the body? -Original Message- From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com] Sent: dinsdag 8 september 2009 13:24 To: users@wicket.apache.org Subject: Re: wicket migration to 1.4.1 - getBodyContainer You could use setResponsePage(Foo.class, PageParameters) Martijn On Tue, Sep 8, 2009 at 12:18 PM, A. Zwaana.zw...@finan.nl wrote: Hello all, We are currently trying to move from wicket 1.2.6 to 1.4.1 and so far it's going well, except for one point. In the constructor of one of our pages we use the getBodyContainer().getBodyContainer() to add an AjaxEventBehavior for the onload event, so we can redirect to the application if we only get one search result on the search page. According to a colleague we did it this way because with setResponsePage it didn't work as smoothly, something with the page needing to be constructed first or so. Anyway, how would we go about this now? The migration guide says we should used renderHead, but it doesn't allow me to add any Ajax stuff from what I can see. Below is a part of the code: getBodyContainer().getBodyContainer().add(new AjaxEventBehavior(onload) { protected void onEvent(AjaxRequestTarget target) { // open worksheet if there is only one result and autoforward is enabled. if (results.size() == 1 autoForward) { SearchViewRow document = results.get(0); preOpenWorksheet(document, target); } } protected IAjaxCallDecorator getAjaxCallDecorator() { return new NotificationDecorator(ResourceBundle.getTranslation(language, ResourceBundle.DEF_ASPECT, LabelTypes.SEARCH_LOADING)); } }); Hope you guys can help me out here, thanks in advance in any case. Met vriendelijke groet, Arjan Zwaan F I N A N F i n a n c i a l A n a l y s i s Koggelaan 5-D 8017 JH Zwolle ( Tel. : +31 88 77 88 990 7 E-mail: a.zw...@finan.nl mailto:a.zw...@finan.nl : Internet: www.finan.nl http://www.finan.nl/ (Findesk BV) KvK nr. 29039392 -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0 - 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