Re: Error during start of wicket application
I'm using Intellij myself and with that, in the Project overview I see a list of dependencies projects are using. With that I can quickly see if I'm using multiple versions of a certain dependency. This same type of dependency list is present in Netbeans, only per project. And with Netbeans you can also generate a dependency graph by right clicking on your project, and this goes through all dependent projects and their deps as well. I have no deep experience with Eclipse, since I somehow dislike Eclipse with JAVA development, but I think it's available in there somewhere as well. I use those dependencies lists as well to find and clean up dependencies. Cheers, Marco Springer
Re: Error during start of wicket application
The problem may also happen when you have wicket-xyz.jar in the web container's shared folder and additionally in your .war#WEB-INF/lib folder. On Wed, Feb 29, 2012 at 10:00 AM, Marco Springer marcosprin...@gmail.com wrote: I'm using Intellij myself and with that, in the Project overview I see a list of dependencies projects are using. With that I can quickly see if I'm using multiple versions of a certain dependency. This same type of dependency list is present in Netbeans, only per project. And with Netbeans you can also generate a dependency graph by right clicking on your project, and this goes through all dependent projects and their deps as well. I have no deep experience with Eclipse, since I somehow dislike Eclipse with JAVA development, but I think it's available in there somewhere as well. I use those dependencies lists as well to find and clean up dependencies. Cheers, Marco Springer -- 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: Multi Tab and Session
Hi, Page1 gets the click of the submit button and collects the search word. This will be changed into a hash value and set as PageParameter (q=Hashvalue) to the ResponsePage which is Page2. Additionally, I store the hash value into a session HashMap which holds the hash value as key and an own class with the original search word. This class will be filled with the results from the search of the background thread. On Page2, I have the PageParameter as hash value and can search for the correct entry of the HashMap in the session to react, when the results are found. I hope, I could describe it. Andre Original-Nachricht Datum: Tue, 28 Feb 2012 14:27:35 -0800 Von: Dan Retzlaff dretzl...@gmail.com An: users@wicket.apache.org Betreff: Re: Multi Tab and Session Hi Andre. I'm trying to understand your setup. A quickstart may be required. What does your Page1's onSubmit() look like? Specifically I'd like to know how Page2 knows to watch for word2. 2012/2/28 Andre Schütz andre-p...@gmx.de Hello, I have a problem with my application that I am not able to solve since the last three days. I realized that Wicket 1.5 provides multi tab / multi window support for more than one opened tab in a browser. I have a problem with multiple tabs in my program, that I want to describe now. The program consists of two pages. Page1 contains a search field that will be used to type in a search word. Page2 makes the search on a database, returns the results and displays it as a list. The search will be done from a background thread that stores the result in a hashmap in the session with the search word as the key. Furthermore, Page2 shows a little loading animation that will be updated (AjaxSelfUpdatingTimerBehavior), when the result is stored in the session. Now the problem. (1) I open the application in two tabs of the same browser. (2) The URL looks as follows: Tab1 - localhost:8080/appli/?0 Tab2 - localhost:8080/appli/?1 (3) Tab1 gets word1 in the search field and Tab2 gets word2 into the search field. (4) I press the submit button of Tab1, switch to Tab2 and press the submit button, too. (5) The two Threads start to search for the results. (6) During the AjaxSelfUpdatingTimeBehavior, the result panel of Page2 checks in its overwritten onBeforeRender method for the results. When the result for the search word is found in the session, the updateBehavior of Page2 is stopped and the results will be displayed. - Here starts my problem: None of the two pages will be updated and show the results. If I start the search in one of the Tabs, the process will be finished and the results displayed onto the screen. For me, it seems that both tabs share the same session data and also the same updateBehavior on the Page2. Can anybody help me with that problem? Would be great. -- Andre Schütz schuetz.an...@gmx.net - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: more html templates for one java class
Thanks. I have: MyPanel.java (this class extends Panel), MyPanel.html and MyPanel_test.html. I try in MyPanel.java add method: @Override public String getVariation() { return test; } It is good, is not it? But it do not work. Is not there in wicket 1.5.4 same kind of bug with getVariation: https://issues.apache.org/jira/browse/WICKET-4361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#issue-tabs -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-more-html-templates-for-one-java-class-tp4430757p4431001.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: more html templates for one java class
On Wed, Feb 29, 2012 at 11:08 AM, Dan12321 wee...@centrum.cz wrote: Thanks. I have: MyPanel.java (this class extends Panel), MyPanel.html and MyPanel_test.html. I try in MyPanel.java add method: @Override public String getVariation() { return test; } It is good, is not it? But it do not work. Is not there in wicket 1.5.4 same kind of bug with getVariation: https://issues.apache.org/jira/browse/WICKET-4361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#issue-tabs No, this bug is not related in your case. With this code you should see the markup for MyPanel_test.html There is a test about this in Wicket - org.apache.wicket.PageMarkupLoadingTest -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-more-html-templates-for-one-java-class-tp4430757p4431001.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: more html templates for one java class
Thanks. But it still seems that getVariable do not work. But getSession().setStyle(test); in constructor works. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-more-html-templates-for-one-java-class-tp4430757p4431115.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
Markup not found when upgrading from 1.4.18 to 1.5
I changed my app from wicket 1.4.18 to 1.5.4 Now I get a MarkupNotFound Exception. In 1.4. the app was running without warnings/errors Does somebody have a hint? I'm using a form within a page. The form has a fragment child. *MarkupCode*: /div wicket:id=contentFragment1/ wicket:fragment wicket:id=orderFragment1 fieldset ... /fieldset /wicket:fragment / *JavaCode:* f/orm.add(new OrderFragment1(contentFragment1)); public class OrderFragment1 extends AbstractOrderFragment1 { public OrderFragment1(String id) { super(id, orderFragment1, OrderDetailPagePartEdit.this, orderWrkBean); ... }/ * The exception:* /Last cause: No Markup found for Fragment orderFragment1 in providing markup container [Page class = com.dachser.uitrosend.order.OrderDetailPagePartEdit, id = 21, render count = 1] Root cause: org.apache.wicket.markup.MarkupNotFoundException: No Markup found for Fragment orderFragment1 in providing markup container [Page class = com.dachser.uitrosend.order.OrderDetailPagePartEdit, id = 21, render count = 1] at org.apache.wicket.markup.html.panel.FragmentMarkupSourcingStrategy.getMarkup(FragmentMarkupSourcingStrategy.java:143) at org.apache.wicket.markup.html.panel.FragmentMarkupSourcingStrategy.onComponentTagBody(FragmentMarkupSourcingStrategy.java:74) at org.apache.wicket.Component.internalRenderComponent(Component.java:2528) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1576) at org.apache.wicket.Component.internalRender(Component.java:2358) ... / Thanks! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Markup-not-found-when-upgrading-from-1-4-18-to-1-5-tp4431186p4431186.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: Markup not found when upgrading from 1.4.18 to 1.5
Hi, Make sure that wicket:fragment is inside wicket:child On Wed, Feb 29, 2012 at 1:03 PM, rawe ralph.wey...@dachser.com wrote: I changed my app from wicket 1.4.18 to 1.5.4 Now I get a MarkupNotFound Exception. In 1.4. the app was running without warnings/errors Does somebody have a hint? I'm using a form within a page. The form has a fragment child. *MarkupCode*: /div wicket:id=contentFragment1/ wicket:fragment wicket:id=orderFragment1 fieldset ... /fieldset /wicket:fragment / *JavaCode:* f/orm.add(new OrderFragment1(contentFragment1)); public class OrderFragment1 extends AbstractOrderFragment1 { public OrderFragment1(String id) { super(id, orderFragment1, OrderDetailPagePartEdit.this, orderWrkBean); ... }/ * The exception:* /Last cause: No Markup found for Fragment orderFragment1 in providing markup container [Page class = com.dachser.uitrosend.order.OrderDetailPagePartEdit, id = 21, render count = 1] Root cause: org.apache.wicket.markup.MarkupNotFoundException: No Markup found for Fragment orderFragment1 in providing markup container [Page class = com.dachser.uitrosend.order.OrderDetailPagePartEdit, id = 21, render count = 1] at org.apache.wicket.markup.html.panel.FragmentMarkupSourcingStrategy.getMarkup(FragmentMarkupSourcingStrategy.java:143) at org.apache.wicket.markup.html.panel.FragmentMarkupSourcingStrategy.onComponentTagBody(FragmentMarkupSourcingStrategy.java:74) at org.apache.wicket.Component.internalRenderComponent(Component.java:2528) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1576) at org.apache.wicket.Component.internalRender(Component.java:2358) ... / Thanks! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Markup-not-found-when-upgrading-from-1-4-18-to-1-5-tp4431186p4431186.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: AjaxFormValidatingBehavior Submits Form When I Clicked Submit Button second Time
I have fixed my problem, thank you for your attention. With my best regards. Secil - Wicket-Java -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxFormValidatingBehavior-Submits-Form-When-I-Clicked-Submit-Button-second-Time-tp4410686p4431285.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: Markup not found when upgrading from 1.4.18 to 1.5
Martin, do you mean something like ?? / div wicket:id=contentFragment1/ wicket:child wicket:fragment wicket:id=orderFragment1 fieldset ... /fieldset /wicket:fragment /wicket:child / Doesn't work! But normally I don't need a child tag due I don't include markup from a subclass My fragment class is extended from an AbstractFragment class which extends Fragment I' m using just one markup file. Ralph -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Markup-not-found-when-upgrading-from-1-4-18-to-1-5-tp4431186p4431304.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: Markup not found when upgrading from 1.4.18 to 1.5
I mean that wicket:fragment should be in wicket:extend, wicket:panel or wicket:border if any of those is used. Your pasted code is not easy to follow but I think you should pass the form as parent container of the fragment instance. On Wed, Feb 29, 2012 at 2:12 PM, rawe ralph.wey...@dachser.com wrote: Martin, do you mean something like ?? / div wicket:id=contentFragment1/ wicket:child wicket:fragment wicket:id=orderFragment1 fieldset ... /fieldset /wicket:fragment /wicket:child / Doesn't work! But normally I don't need a child tag due I don't include markup from a subclass My fragment class is extended from an AbstractFragment class which extends Fragment I' m using just one markup file. Ralph -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Markup-not-found-when-upgrading-from-1-4-18-to-1-5-tp4431186p4431304.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: TextField update According to Another TextField update
Use AjaxFormComponentUpdateBehavior(onchange) instead 2012/2/29 Seçil Aydın techlove...@gmail.com: Hi, I have two text fields next to each other. I want to change value of second textfield according to first textfield when first textfield loses focus. I am doing that with OnChangeAjaxBehavior but, I have some validation according to value of first text field, when I write 2 it gives error but I want to write 20. It does not wait for my last action. How can I handle this?Please give me your advices. With my best regards. Seçil - Wicket-Java -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TextField-update-According-to-Another-TextField-update-tp4431324p4431324.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: wrapping onclick in AjaxLink with 1.5.4
Hi Martin, I'm following the example https://cwiki.apache.org/WICKET/calling-javascript-function-on-wicket-components-onclick.html shown here . My code is literally that, added to the prototypical Wicket Quickstart HomePage.java: public class HomePage extends WebPage { private static final long serialVersionUID = 1L; public HomePage(final PageParameters parameters) { add(new Label(version, getApplication().getFrameworkSettings().getVersion())); AjaxLink ajaxLink = new AjaxLink(ajaxLink) { @Override public void onClick(AjaxRequestTarget target) { System.out.println(onClick fired); } protected IAjaxCallDecorator getAjaxCallDecorator() { return new AjaxCallDecorator() { public CharSequence decorateScript(CharSequence script) { return alert('This is my javascript call'); + script; } }; } }; add(ajaxLink); } } If I inspect the generated HTML, it looks like this: # This is an ajax link. Thanks for your time. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wrapping-onclick-in-AjaxLink-with-1-5-4-tp4430306p4431400.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: wrapping onclick in AjaxLink with 1.5.4
On Wed, Feb 29, 2012 at 2:53 PM, armhold armh...@gmail.com wrote: Hi Martin, I'm following the example https://cwiki.apache.org/WICKET/calling-javascript-function-on-wicket-components-onclick.html shown here . My code is literally that, added to the prototypical Wicket Quickstart HomePage.java: public class HomePage extends WebPage { private static final long serialVersionUID = 1L; public HomePage(final PageParameters parameters) { add(new Label(version, getApplication().getFrameworkSettings().getVersion())); AjaxLink ajaxLink = new AjaxLink(ajaxLink) { @Override public void onClick(AjaxRequestTarget target) { System.out.println(onClick fired); } protected IAjaxCallDecorator getAjaxCallDecorator() { return new AjaxCallDecorator() { public CharSequence decorateScript(CharSequence script) Put @Override on the line above and you will see that the compiler complains. Please update the wiki with the new signature for 1.5 { return alert('This is my javascript call'); + script; } }; } }; add(ajaxLink); } } If I inspect the generated HTML, it looks like this: # This is an ajax link. Thanks for your time. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wrapping-onclick-in-AjaxLink-with-1-5-4-tp4430306p4431400.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: wrapping onclick in AjaxLink with 1.5.4
Well that was simple, thank you. I'm pedantic enough to have added @Override to the getAjaxCallDecorator(), but I missed decorateScript() in my initial attempt. The method is being called now, and I have updated the Wiki. However the second example listed on the Wiki (AttributeAppender) also does not work. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wrapping-onclick-in-AjaxLink-with-1-5-4-tp4430306p4431489.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: wrapping onclick in AjaxLink with 1.5.4
On Wed, Feb 29, 2012 at 3:28 PM, armhold armh...@gmail.com wrote: Well that was simple, thank you. I'm pedantic enough to have added @Override to the getAjaxCallDecorator(), but I missed decorateScript() in my initial attempt. The method is being called now, and I have updated the Wiki. However the second example listed on the Wiki (AttributeAppender) also does not work. I'm not sure whether it ever worked. It is not possible to add several behaviors on the same component that manipulate the same attribute. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wrapping-onclick-in-AjaxLink-with-1-5-4-tp4430306p4431489.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: TextField update According to Another TextField update
Thanks Martin, I think it is the same think with OnChangeAjaxBehavior.Is not it? - Wicket-Java -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TextField-update-According-to-Another-TextField-update-tp4431324p4431602.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: TextField update According to Another TextField update
No, they are not. Check the difference between 'input' and 'change' JavaScript events. 2012/2/29 Seçil Aydın techlove...@gmail.com: Thanks Martin, I think it is the same think with OnChangeAjaxBehavior.Is not it? - Wicket-Java -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TextField-update-According-to-Another-TextField-update-tp4431324p4431602.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
wicket - check if user is logged (call method in every access to server)
Hello, is there any way how to check if user is logged? I can put into constructor of the class that have got extends Page something like this: if (new LogginControl().isUserLogged(user)) { ... } But this code I have to put into methods, that are called by ajax. So, is there any better way? How to call same code and check if user is logged in every access to server? And then redirect to homepage if user is not logged. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-check-if-user-is-logged-call-method-in-every-access-to-server-tp4431837p4431837.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 - check if user is logged (call method in every access to server)
Check ISecuritySettings, IAuthenticationStrategy and IAuthorizationStrategy See wicket-authroles project for example how to use those On Wed, Feb 29, 2012 at 5:27 PM, Dan12321 wee...@centrum.cz wrote: Hello, is there any way how to check if user is logged? I can put into constructor of the class that have got extends Page something like this: if (new LogginControl().isUserLogged(user)) { ... } But this code I have to put into methods, that are called by ajax. So, is there any better way? How to call same code and check if user is logged in every access to server? And then redirect to homepage if user is not logged. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-check-if-user-is-logged-call-method-in-every-access-to-server-tp4431837p4431837.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
Dialog windows hang on close
We have an exntensive web application thta was written in Wicket 1.3.14 which we recently upgraded to Wicket 1.4.17 for fixing some ajax issues dealing with Chrome and Safari. There was some changes that needed to be done to the existing code in the migration, and there is two outstanding issues we cannot seem to fix. The first is a dialog box will hang during close, this happens under a certain condition - open the dialog, click cancel and close, reopen the dialog click the X in the corner to close, open the dialog again change a record and click a button to save it. The second issue is a using YuiLib to attach a behavior to Wicket dropdowns that will load JavaScript to resize the drop downs to ensure the largest entries can be seen fully. IE browsers less than 9 need this hack to fully see the length of all entries. In the 1.3 version of Wicket it worked great, after the upgrade to 1.4.17 this stopped working. Any known issues with 1.4.x versions of Wicket and the YuiLib or anything else that would have changed between levels to explain the issue? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Dialog-windows-hang-on-close-tp4431916p4431916.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
Cache TextTemplateResourceReferences
Hi, i've been following this post in order to generate dynamic JS/CSS files ( https://cwiki.apache.org/WICKET/dynamically-generate-a-css-stylesheet.html https://cwiki.apache.org/WICKET/dynamically-generate-a-css-stylesheet.html ). Now I'm expiring white page flickers on page changes inside the browser, due to the fact that TextTemplateResourceReferences are not versioned (filename-ver-timestamp.ext) or sent with Cache-Headers (per default they are delivered with Cache: no-cache). As soon as we have uncached CSS or JS files FF/IE/Chrome/Safari seem to reload the whole page instead of applying the cached files and this leads to these annoying page flickers. So i'm searching for a solution to be able to cache TextTemplateResourceReferences by enabling the version and setting the cache headers, but I haven't found a solution yet. I'm using Wicket 1.5.3. From a friend of mine I got the tip to check IStaticCacheableResources and subclass TextTemplateResourceReference in order to return IStaticCacheableResources, but I didn't have the time yet to test it out. http://www.jarvana.com/jarvana/view/org/apache/wicket/wicket-core/1.5.0/wicket-core-1.5.0-javadoc.jar!/org/apache/wicket/request/resource/caching/IStaticCacheableResource.html http://www.jarvana.com/jarvana/view/org/apache/wicket/wicket-core/1.5.0/wicket-core-1.5.0-javadoc.jar!/org/apache/wicket/request/resource/caching/IStaticCacheableResource.html Any help on this would be really great, as I'm quite new to wicket and haven't found a good tutorial yet which explains how caching for resources is properly applied. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Cache-TextTemplateResourceReferences-tp4432342p4432342.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: Multi Tab and Session
Your description is clear, thank you. I'm not certain that the background thread's reference to the Session is valid outside of the servlet request. I would verify your assumption by logging the session's object ID when the value is read/written. I have one other thought for you. I believe Wicket keeps the most recent page in a deserialized state to save itself the work of deserialization in the common case of it being required by the next request. (I think the logic is in PageStoreManager, but it's not clear to me. Hopefully a dev can confirm/correct me.) At any rate, this may cause the difference between your two scenarios. In your successful, single-tab scenario, you may be benefiting from a lack of serialization/deserialization round-trip. We have noticed this difference when our components have transient variables that aren't set to null in detach(): in the most recent page the variable remains not-null; if the session has intermediate requests for other pages, the variable is null when next accessed. Good luck, Dan 2012/2/29 André Schütz andre-p...@gmx.de Hi, Page1 gets the click of the submit button and collects the search word. This will be changed into a hash value and set as PageParameter (q=Hashvalue) to the ResponsePage which is Page2. Additionally, I store the hash value into a session HashMap which holds the hash value as key and an own class with the original search word. This class will be filled with the results from the search of the background thread. On Page2, I have the PageParameter as hash value and can search for the correct entry of the HashMap in the session to react, when the results are found. I hope, I could describe it. Andre Original-Nachricht Datum: Tue, 28 Feb 2012 14:27:35 -0800 Von: Dan Retzlaff dretzl...@gmail.com An: users@wicket.apache.org Betreff: Re: Multi Tab and Session Hi Andre. I'm trying to understand your setup. A quickstart may be required. What does your Page1's onSubmit() look like? Specifically I'd like to know how Page2 knows to watch for word2. 2012/2/28 Andre Schütz andre-p...@gmx.de Hello, I have a problem with my application that I am not able to solve since the last three days. I realized that Wicket 1.5 provides multi tab / multi window support for more than one opened tab in a browser. I have a problem with multiple tabs in my program, that I want to describe now. The program consists of two pages. Page1 contains a search field that will be used to type in a search word. Page2 makes the search on a database, returns the results and displays it as a list. The search will be done from a background thread that stores the result in a hashmap in the session with the search word as the key. Furthermore, Page2 shows a little loading animation that will be updated (AjaxSelfUpdatingTimerBehavior), when the result is stored in the session. Now the problem. (1) I open the application in two tabs of the same browser. (2) The URL looks as follows: Tab1 - localhost:8080/appli/?0 Tab2 - localhost:8080/appli/?1 (3) Tab1 gets word1 in the search field and Tab2 gets word2 into the search field. (4) I press the submit button of Tab1, switch to Tab2 and press the submit button, too. (5) The two Threads start to search for the results. (6) During the AjaxSelfUpdatingTimeBehavior, the result panel of Page2 checks in its overwritten onBeforeRender method for the results. When the result for the search word is found in the session, the updateBehavior of Page2 is stopped and the results will be displayed. - Here starts my problem: None of the two pages will be updated and show the results. If I start the search in one of the Tabs, the process will be finished and the results displayed onto the screen. For me, it seems that both tabs share the same session data and also the same updateBehavior on the Page2. Can anybody help me with that problem? Would be great. -- Andre Schütz schuetz.an...@gmx.net - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: java.lang.IllegalStateException: Can't call write(CharSequence) after write(byte[]) has been called.
Hi there, I am not too sure what you mean about DownloadLink. I am not using download link in any part of my code. To link to the provider page i am just using a normal link. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/java-lang-IllegalStateException-Can-t-call-write-CharSequence-after-write-byte-has-been-called-tp4416819p4432697.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: java.lang.IllegalStateException: Can't call write(CharSequence) after write(byte[]) has been called.
Sure. But Martin is just telling you to use this as a code example. Regards, Pierre On Wed, Feb 29, 2012 at 8:33 PM, singh13 gso...@gmail.com wrote: Hi there, I am not too sure what you mean about DownloadLink. I am not using download link in any part of my code. To link to the provider page i am just using a normal link. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/java-lang-IllegalStateException-Can-t-call-write-CharSequence-after-write-byte-has-been-called-tp4416819p4432697.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 -- Si tu penses que la violence ne résout rien, c'est que tu n'as pas tapé assez fort.
Re: Multi Tab and Session
Hi, I could identify the cause of the problem, but still have no solution. I set some breakpoints and made some output messages to trace the system. The following thinks happened: (1) I submit a search in Tab1. The search word will be passed as Page Parameter to Page2 in Tab1. While Tab1 is showing the loading animation with it AjaxSelfUpdatingTimerBehavior, I submit a second search in Tab2. Tab2 switches to its Page2 and the loading animation stops in both Tabs. Reason: -- The constructors of Page2 is called twice on the two Tabs. As diagram: 01.) Tab1: Page1 submit search 02.) Tab1: Page2 (Page id = 14) calls its constructor and adds a PanelA 03.) Tab1: shows loading animation with its AjaxSelfUpdatingTimerBehavior at PanelA 04.) Tab2: Page1 submit search 05.) Tab2: Page2 (Page id = 16) calls its constructor and adds a PanelA 06.) Tab2: shows loading animation with its AjaxSelfUpdatingTimerBehavior at PanelA 07.) Tab1: Page2 (Page id = 17) calls its constructor 08.) Tab1: does not update anymore 09.) Tab2: Page2 (Page id = 18) calls its constructor 10.) Tab2: does not update anymore I do nothing from the beginning of step 7 and do not know why the constructor is called again. (2) The same odd behavior happens, when I do the following. I submit a search in Tab1 from its Page1. While the loading animation is shown, I reload the Page1 in Tab2. The constructor of Page2 in Tab1 is called again and the Page2 in Tab1 stops its update progress. As diagram: 01.) Tab1: Page1 submit search 02.) Tab1: Page2 (Page id = 22) calls its constructor and adds a PanelA 03.) Tab1: shows loading animation with its AjaxSelfUpdatingTimerBehavior at PanelA 04.) Tab2: Reload any Page 05.) Tab1: Page2 (Page id = 23) calls its constructor 06.) Tab1: does not update anymore I really can't explain to myself, why the constructor is called again. But I think that this second call in the individual Tabs is crashing my application. Any ideas about this odd behavior? Thank in advance, Andre On Wed, 29 Feb 2012 10:10:37 -0800 Dan Retzlaff dretzl...@gmail.com wrote: Your description is clear, thank you. I'm not certain that the background thread's reference to the Session is valid outside of the servlet request. I would verify your assumption by logging the session's object ID when the value is read/written. I have one other thought for you. I believe Wicket keeps the most recent page in a deserialized state to save itself the work of deserialization in the common case of it being required by the next request. (I think the logic is in PageStoreManager, but it's not clear to me. Hopefully a dev can confirm/correct me.) At any rate, this may cause the difference between your two scenarios. In your successful, single-tab scenario, you may be benefiting from a lack of serialization/deserialization round-trip. We have noticed this difference when our components have transient variables that aren't set to null in detach(): in the most recent page the variable remains not-null; if the session has intermediate requests for other pages, the variable is null when next accessed. Good luck, Dan 2012/2/29 André Schütz andre-p...@gmx.de Hi, Page1 gets the click of the submit button and collects the search word. This will be changed into a hash value and set as PageParameter (q=Hashvalue) to the ResponsePage which is Page2. Additionally, I store the hash value into a session HashMap which holds the hash value as key and an own class with the original search word. This class will be filled with the results from the search of the background thread. On Page2, I have the PageParameter as hash value and can search for the correct entry of the HashMap in the session to react, when the results are found. I hope, I could describe it. Andre Original-Nachricht Datum: Tue, 28 Feb 2012 14:27:35 -0800 Von: Dan Retzlaff dretzl...@gmail.com An: users@wicket.apache.org Betreff: Re: Multi Tab and Session Hi Andre. I'm trying to understand your setup. A quickstart may be required. What does your Page1's onSubmit() look like? Specifically I'd like to know how Page2 knows to watch for word2. 2012/2/28 Andre Schütz andre-p...@gmx.de Hello, I have a problem with my application that I am not able to solve since the last three days. I realized that Wicket 1.5 provides multi tab / multi window support for more than one opened tab in a browser. I have a problem with multiple tabs in my program, that I want to describe now. The program consists of two pages. Page1 contains a search field that will be used to type in a search word. Page2 makes the search on a database, returns the results and displays it as a list. The search will be done from a background thread that stores the result in a hashmap in the session with the search word as the key. Furthermore, Page2 shows a little
Wicket/Spring Boilerplate
Just a quick note to folks that may be interested that I've created a Maven archetype that ties together Wicket 1.5 and Spring 3.1, along with Hibernate 4.1/JPA 2 and logback. It is purely annotation driven, and has no XML configuration files. Currently, users must clone the git repository [1] to use the archetype, but it should be hosted on Sonatype's OSS Nexus shortly. Questions and comments appreciated. :) Michael 1 - https://github.com/limone/wicket-spring-boilerplate
RE: Wicket jQuery Validator integration
Hi Zac, this sounds great - I would be very appreciative if you make this code public, and I imagine it would be useful for many. I was just about to take a look at the wicketstuff-client-and-server-validation project which seems to be a similar idea, but it would be great to check out what you have done using wiquery. Have you had a chance to post this somewhere? Thanks, -Evan -Original Message- From: Zachary Bedell [mailto:zacl...@thebedells.org] Sent: Wednesday, February 15, 2012 10:52 AM To: users@wicket.apache.org Subject: Wicket jQuery Validator integration Good morning, Reading a recent thread about accessing jQuery Validation from Wicket reminded me that I've developed some code that might be of use. I'm not sure if this is something anyone else would be interested in or if it's something that might eventually be integrated into Wicket core or if it would be more appropriate for one of the existing jQuery/Wicket integration libraries. I wanted to describe what I've cooked up so far. If this is anything that would be useful, I'd be willing to clean the code up a bit to extract a few bits that are specific to our environment and post the code somewhere. My intent was to get client-side validation using Wicket's existing validation classes without requiring AJAX calls to make them work and preferably without requiring Page's to include lots of unsightly JavaScript. Also, not duplicating validation logic on the client server tiers was desirable. The code was originally developed for a site that was expected to receive a high amount of traffic in a short period of time, and avoiding unnecessary server calls was a priority. I created a subclass of Form (ClientSideValidatingForm) which examines each FormComponent (and sub-Form) added to it and extracts information about the standard Wicket validations. It generates JavaScript which uses jQuery's Validator library to apply client-side checks equivalent to the Wicket server side checks. The nice thing about this is that you get client-side validation for free just by adding the normal Wicket validations plus you still get all your validations backed up in the server side in case JavaScript is unavailable or disabled. The implementation of the class does lack a bit in terms of elegance unfortunately. As the Wicket validation interface doesn't currently know anything about JavaScript, it was necessary to run a chain of instanceof checks against all the known Wicket validations and emit JavaScript to mirror their logic. I also created an extension of the Wicket IValidator interface which can provide JavaScript functions to perform validation equivalent to the server-side Java code. The extraction code in ClientSideValidatingForm preferentially checks for this interface and uses provided JavaScript if available. Otherwise, it's a bunch of instanceof's to check for known validations or log an error if an unknown instance of IValidator is found. Long term, it would be helpful if the stock Wicket IValidator interface could include a method to get JavaScript validations for all of the stock validations. The code is pretty tightly bound to jQuery Validator at this point, but it's likely the methodology could be abstracted to other validation frameworks. It's also built using WiQuery, though that's mostly as a convenience to get the same version of jQuery that we use elsewhere. The same could easily be implemented without WiQuery provided a version of jQuery was contributed to the response via some other mechanism. Is this something anyone would be interested in? Best regards, Zac Bedell (Apologies if this is a dupe. I had some email client config issues this morning...) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Migrating to wicket 1.5
I was reading the migration doc and I'm not sure how I would migrate this to 1.5: WebRequest webRequest = (WebRequest) RequestCycle.get().getRequest(); HttpServletRequest httpServletRequest = (HttpServletRequest)webRequest.getContainerRequest(); String jqueryURl = http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js;; if(httpServletRequest.isSecure()){ jqueryURl = jqueryURl.replaceFirst(http://;, https://;); } component.add(JavascriptPackageResource.getHeaderContribution(jqueryURl)); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Migrating to wicket 1.5
Just found another one: What did AbortException get replaced with? Douglas On Feb 29, 2012, at 10:44 PM, Douglas Ferguson wrote: I was reading the migration doc and I'm not sure how I would migrate this to 1.5: WebRequest webRequest = (WebRequest) RequestCycle.get().getRequest(); HttpServletRequest httpServletRequest = (HttpServletRequest)webRequest.getContainerRequest(); String jqueryURl = http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js;; if(httpServletRequest.isSecure()){ jqueryURl = jqueryURl.replaceFirst(http://;, https://;); } component.add(JavascriptPackageResource.getHeaderContribution(jqueryURl)); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Migrating to wicket 1.5
Douglas, Regarding javascript references: instead of adding a header contributor, have your component override renderHead(IHeaderResponse response) and use response.renderJavaScriptReference(). Regarding AbortException: instead of grabbing the servlet response, writing to it immediately, and throwing AbortException, replace the current request handler with one that writes the response. See DownloadLink#onClick for an example. (Ref http://mail-archives.apache.org/mod_mbox/wicket-users/201105.mbox/%3cbanlktimkstujmwzsd2lhhkbyzcungcq...@mail.gmail.com%3E ) Dan On Wed, Feb 29, 2012 at 9:01 PM, Douglas Ferguson the...@gmail.com wrote: Just found another one: What did AbortException get replaced with? Douglas On Feb 29, 2012, at 10:44 PM, Douglas Ferguson wrote: I was reading the migration doc and I'm not sure how I would migrate this to 1.5: WebRequest webRequest = (WebRequest) RequestCycle.get().getRequest(); HttpServletRequest httpServletRequest = (HttpServletRequest)webRequest.getContainerRequest(); String jqueryURl = http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js;; if(httpServletRequest.isSecure()){ jqueryURl = jqueryURl.replaceFirst(http://;, https://;); } component.add(JavascriptPackageResource.getHeaderContribution(jqueryURl)); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Migrating to wicket 1.5
See below... On Feb 29, 2012, at 11:49 PM, Dan Retzlaff wrote: Douglas, Regarding javascript references: instead of adding a header contributor, have your component override renderHead(IHeaderResponse response) and use response.renderJavaScriptReference(). Thanks! Regarding AbortException: instead of grabbing the servlet response, writing to it immediately, and throwing AbortException, replace the current request handler with one that writes the response. See DownloadLink#onClick for an example. (Ref http://mail-archives.apache.org/mod_mbox/wicket-users/201105.mbox/%3cbanlktimkstujmwzsd2lhhkbyzcungcq...@mail.gmail.com%3E ) I was catching it not throwing it. Is there a comparable scenario in 1.5? Here are some other things I ran into that I don't see in the migration doc 1) RestartResponseAtInterceptPageException 2) getRequestCycle().setRedirect(false) 3) IRequestTarget is gone 4) AbstractRequestTargetUrlCodingStrategy is goine 5) UploadWebRequest is gone Dan On Wed, Feb 29, 2012 at 9:01 PM, Douglas Ferguson the...@gmail.com wrote: Just found another one: What did AbortException get replaced with? Douglas On Feb 29, 2012, at 10:44 PM, Douglas Ferguson wrote: I was reading the migration doc and I'm not sure how I would migrate this to 1.5: WebRequest webRequest = (WebRequest) RequestCycle.get().getRequest(); HttpServletRequest httpServletRequest = (HttpServletRequest)webRequest.getContainerRequest(); String jqueryURl = http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js;; if(httpServletRequest.isSecure()){ jqueryURl = jqueryURl.replaceFirst(http://;, https://;); } component.add(JavascriptPackageResource.getHeaderContribution(jqueryURl)); - 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: Multi Tab and Session
On Wed, Feb 29, 2012 at 8:10 PM, Dan Retzlaff dretzl...@gmail.com wrote: Your description is clear, thank you. I'm not certain that the background thread's reference to the Session is valid outside of the servlet request. I would verify your assumption by logging the session's object ID when the value is read/written. I have one other thought for you. I believe Wicket keeps the most recent page in a deserialized state to save itself the work of deserialization in the common case of it being required by the next request. (I think the logic is in PageStoreManager, but it's not clear to me. Hopefully a dev can confirm/correct me.) More about this at: https://cwiki.apache.org/confluence/x/qIaoAQ At any rate, this may cause the difference between your two scenarios. In your successful, single-tab scenario, you may be benefiting from a lack of serialization/deserialization round-trip. We have noticed this difference when our components have transient variables that aren't set to null in detach(): in the most recent page the variable remains not-null; if the session has intermediate requests for other pages, the variable is null when next accessed. Good luck, Dan 2012/2/29 André Schütz andre-p...@gmx.de Hi, Page1 gets the click of the submit button and collects the search word. This will be changed into a hash value and set as PageParameter (q=Hashvalue) to the ResponsePage which is Page2. Additionally, I store the hash value into a session HashMap which holds the hash value as key and an own class with the original search word. This class will be filled with the results from the search of the background thread. On Page2, I have the PageParameter as hash value and can search for the correct entry of the HashMap in the session to react, when the results are found. I hope, I could describe it. Andre Original-Nachricht Datum: Tue, 28 Feb 2012 14:27:35 -0800 Von: Dan Retzlaff dretzl...@gmail.com An: users@wicket.apache.org Betreff: Re: Multi Tab and Session Hi Andre. I'm trying to understand your setup. A quickstart may be required. What does your Page1's onSubmit() look like? Specifically I'd like to know how Page2 knows to watch for word2. 2012/2/28 Andre Schütz andre-p...@gmx.de Hello, I have a problem with my application that I am not able to solve since the last three days. I realized that Wicket 1.5 provides multi tab / multi window support for more than one opened tab in a browser. I have a problem with multiple tabs in my program, that I want to describe now. The program consists of two pages. Page1 contains a search field that will be used to type in a search word. Page2 makes the search on a database, returns the results and displays it as a list. The search will be done from a background thread that stores the result in a hashmap in the session with the search word as the key. Furthermore, Page2 shows a little loading animation that will be updated (AjaxSelfUpdatingTimerBehavior), when the result is stored in the session. Now the problem. (1) I open the application in two tabs of the same browser. (2) The URL looks as follows: Tab1 - localhost:8080/appli/?0 Tab2 - localhost:8080/appli/?1 (3) Tab1 gets word1 in the search field and Tab2 gets word2 into the search field. (4) I press the submit button of Tab1, switch to Tab2 and press the submit button, too. (5) The two Threads start to search for the results. (6) During the AjaxSelfUpdatingTimeBehavior, the result panel of Page2 checks in its overwritten onBeforeRender method for the results. When the result for the search word is found in the session, the updateBehavior of Page2 is stopped and the results will be displayed. - Here starts my problem: None of the two pages will be updated and show the results. If I start the search in one of the Tabs, the process will be finished and the results displayed onto the screen. For me, it seems that both tabs share the same session data and also the same updateBehavior on the Page2. Can anybody help me with that problem? Would be great. -- Andre Schütz schuetz.an...@gmx.net - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de - 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,
Re: Multi Tab and Session
2012/2/29 Andre Schütz andre-p...@gmx.de: Hi, I could identify the cause of the problem, but still have no solution. I set some breakpoints and made some output messages to trace the system. The following thinks happened: (1) I submit a search in Tab1. The search word will be passed as Page Parameter to Page2 in Tab1. While Tab1 is showing the loading animation with it AjaxSelfUpdatingTimerBehavior, I submit a second search in Tab2. Tab2 switches to its Page2 and the loading animation stops in both Tabs. Reason: -- The constructors of Page2 is called twice on the two Tabs. As diagram: 01.) Tab1: Page1 submit search 02.) Tab1: Page2 (Page id = 14) calls its constructor and adds a PanelA 03.) Tab1: shows loading animation with its AjaxSelfUpdatingTimerBehavior at PanelA 04.) Tab2: Page1 submit search 05.) Tab2: Page2 (Page id = 16) calls its constructor and adds a PanelA 06.) Tab2: shows loading animation with its AjaxSelfUpdatingTimerBehavior at PanelA 07.) Tab1: Page2 (Page id = 17) calls its constructor 08.) Tab1: does not update anymore 09.) Tab2: Page2 (Page id = 18) calls its constructor 10.) Tab2: does not update anymore I do nothing from the beginning of step 7 and do not know why the constructor is called again. Put a breakpoint in Page2 constructor and see why it is called. (2) The same odd behavior happens, when I do the following. I submit a search in Tab1 from its Page1. While the loading animation is shown, I reload the Page1 in Tab2. The constructor of Page2 in Tab1 is called again and the Page2 in Tab1 stops its update progress. As diagram: 01.) Tab1: Page1 submit search 02.) Tab1: Page2 (Page id = 22) calls its constructor and adds a PanelA 03.) Tab1: shows loading animation with its AjaxSelfUpdatingTimerBehavior at PanelA 04.) Tab2: Reload any Page 05.) Tab1: Page2 (Page id = 23) calls its constructor 06.) Tab1: does not update anymore I really can't explain to myself, why the constructor is called again. But I think that this second call in the individual Tabs is crashing my application. Any ideas about this odd behavior? Thank in advance, Andre On Wed, 29 Feb 2012 10:10:37 -0800 Dan Retzlaff dretzl...@gmail.com wrote: Your description is clear, thank you. I'm not certain that the background thread's reference to the Session is valid outside of the servlet request. I would verify your assumption by logging the session's object ID when the value is read/written. I have one other thought for you. I believe Wicket keeps the most recent page in a deserialized state to save itself the work of deserialization in the common case of it being required by the next request. (I think the logic is in PageStoreManager, but it's not clear to me. Hopefully a dev can confirm/correct me.) At any rate, this may cause the difference between your two scenarios. In your successful, single-tab scenario, you may be benefiting from a lack of serialization/deserialization round-trip. We have noticed this difference when our components have transient variables that aren't set to null in detach(): in the most recent page the variable remains not-null; if the session has intermediate requests for other pages, the variable is null when next accessed. Good luck, Dan 2012/2/29 André Schütz andre-p...@gmx.de Hi, Page1 gets the click of the submit button and collects the search word. This will be changed into a hash value and set as PageParameter (q=Hashvalue) to the ResponsePage which is Page2. Additionally, I store the hash value into a session HashMap which holds the hash value as key and an own class with the original search word. This class will be filled with the results from the search of the background thread. On Page2, I have the PageParameter as hash value and can search for the correct entry of the HashMap in the session to react, when the results are found. I hope, I could describe it. Andre Original-Nachricht Datum: Tue, 28 Feb 2012 14:27:35 -0800 Von: Dan Retzlaff dretzl...@gmail.com An: users@wicket.apache.org Betreff: Re: Multi Tab and Session Hi Andre. I'm trying to understand your setup. A quickstart may be required. What does your Page1's onSubmit() look like? Specifically I'd like to know how Page2 knows to watch for word2. 2012/2/28 Andre Schütz andre-p...@gmx.de Hello, I have a problem with my application that I am not able to solve since the last three days. I realized that Wicket 1.5 provides multi tab / multi window support for more than one opened tab in a browser. I have a problem with multiple tabs in my program, that I want to describe now. The program consists of two pages. Page1 contains a search field that will be used to type in a search word. Page2 makes the search on a database, returns the results and displays it as a list. The search will be done
Re: java.lang.IllegalStateException: Can't call write(CharSequence) after write(byte[]) has been called.
On Wed, Feb 29, 2012 at 11:34 PM, Pierre Goupil goupilpie...@gmail.com wrote: Sure. But Martin is just telling you to use this as a code example. Right. See how DownloadLink schedules a new IRequestHandler that cares to deliver a file as a byte[]. Regards, Pierre On Wed, Feb 29, 2012 at 8:33 PM, singh13 gso...@gmail.com wrote: Hi there, I am not too sure what you mean about DownloadLink. I am not using download link in any part of my code. To link to the provider page i am just using a normal link. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/java-lang-IllegalStateException-Can-t-call-write-CharSequence-after-write-byte-has-been-called-tp4416819p4432697.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 -- Si tu penses que la violence ne résout rien, c'est que tu n'as pas tapé assez fort. -- 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
onException() 1.5
I want to redirect to an error page when there is an Exception. I see that there is a RedirectRequestHandler, but this only allows you to redirect to url via string literal. I want to redirect to a construction Page. I was grasping at straws and tried this and no dice.. public IRequestHandler onException(RequestCycle cycle, Exception ex) { cycle.setResponsePage(new NotifyUserOfException()); return cycle.getActiveRequestHandler(); }
Re: Wicket/Spring Boilerplate
Hi, Thanks for sharing it! Here are some ideas: https://github.com/limone/wicket-spring-boilerplate/blob/master/src/main/resources/archetype-resources/src/main/java/HomePage.java#L25 Better override #renderHead(IHeaderResponse response) and use 'response.renderXYZ()' https://github.com/limone/wicket-spring-boilerplate/blob/master/src/main/resources/archetype-resources/src/main/java/HomePage.java#L20 You can use Session#getClientInfo() to see what is the client and if it IE then contribute this special .js file https://github.com/limone/wicket-spring-boilerplate/blob/master/src/main/resources/archetype-resources/src/main/java/app/WicketFilter.java#L9 I think you can drop this class and configure the original WicketFilter in https://github.com/limone/wicket-spring-boilerplate/blob/master/src/main/resources/archetype-resources/src/main/java/app/WebAppInitializer.java On Thu, Mar 1, 2012 at 2:07 AM, Michael Laccetti mich...@limone.me wrote: Just a quick note to folks that may be interested that I've created a Maven archetype that ties together Wicket 1.5 and Spring 3.1, along with Hibernate 4.1/JPA 2 and logback. It is purely annotation driven, and has no XML configuration files. Currently, users must clone the git repository [1] to use the archetype, but it should be hosted on Sonatype's OSS Nexus shortly. Questions and comments appreciated. :) Michael 1 - https://github.com/limone/wicket-spring-boilerplate -- 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: onException() 1.5
On Thu, Mar 1, 2012 at 9:46 AM, Douglas Ferguson the...@gmail.com wrote: I want to redirect to an error page when there is an Exception. I see that there is a RedirectRequestHandler, but this only allows you to redirect to url via string literal. I want to redirect to a construction Page. I was grasping at straws and tried this and no dice.. public IRequestHandler onException(RequestCycle cycle, Exception ex) { cycle.setResponsePage(new NotifyUserOfException()); return cycle.getActiveRequestHandler(); WebPage exceptionPage = new NotifyUserOfException(ex); IPageProvider provider = new PageProvider(page); return new RenderPageRequestHandler(provider /*, RenderPageRequestHandler.RedirectPolicy.XYZ */ ); } -- 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