Re: When will my panels be released?
Iam not aware that i keep some references anywhere. could it be possible, that the panels will be freed if the DataPageStore exceed? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/When-will-my-panels-be-released-tp3549632p3551705.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: When will my panels be released?
On Thu, May 26, 2011 at 9:02 AM, MattyDE ufer.mar...@gmail.com wrote: Iam not aware that i keep some references anywhere. could it be possible, that the panels will be freed if the DataPageStore exceed? This store keeps byte[]. It doesn't know about Java objects. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/When-will-my-panels-be-released-tp3549632p3551705.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 http://jweekend.com/
Re: When will my panels be released?
ohkaay... So i dont understand why my GridView Panels are not released immediately... I browse to site A - heap dump - GridView Panels in the Heap (Correct) to site B - heap dump - GridView Panels still in Heap (why?) to site A - heap dump - GridView Panels sometimes still in Heap (why, and why sometimes?) to site B - heap dump - GridView Panels sometimes gone .. sometimes not so i thought there is any limit which will be reached sometimes and than the heap get flushed. any idea? =( -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/When-will-my-panels-be-released-tp3549632p3551733.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: When will my panels be released?
The last N pages are kept in the http session for faster read when browser back button is used and for Ajax apps. In Wicket 1.5 (trunk) you can see org.apache.wicket.settings.IStoreSettings.getInmemoryCacheSize() On Thu, May 26, 2011 at 9:25 AM, MattyDE ufer.mar...@gmail.com wrote: ohkaay... So i dont understand why my GridView Panels are not released immediately... I browse to site A - heap dump - GridView Panels in the Heap (Correct) to site B - heap dump - GridView Panels still in Heap (why?) to site A - heap dump - GridView Panels sometimes still in Heap (why, and why sometimes?) to site B - heap dump - GridView Panels sometimes gone .. sometimes not so i thought there is any limit which will be reached sometimes and than the heap get flushed. any idea? =( -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/When-will-my-panels-be-released-tp3549632p3551733.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 http://jweekend.com/
Re: When will my panels be released?
Iam using wicket 1.4.8 Any chance to disable session keeping for certain components or to disable this feature at all? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/When-will-my-panels-be-released-tp3549632p3551758.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: When will my panels be released?
In 1.4 see org.apache.wicket.settings.ISessionSettings.setMaxPageMaps(int) org.apache.wicket.settings.ISessionSettings.setPageMapEvictionStrategy(IPageMapEvictionStrategy) On Thu, May 26, 2011 at 9:37 AM, MattyDE ufer.mar...@gmail.com wrote: Iam using wicket 1.4.8 Any chance to disable session keeping for certain components or to disable this feature at all? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/When-will-my-panels-be-released-tp3549632p3551758.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 http://jweekend.com/
Re: Problems localized URLs (https://cwiki.apache.org/WICKET/wicket-and-localized-urls.html)
Thanks, Martin - but that's a different story ;-) I have already read about the features of 1.5 and I would really be keen to migrate. However, that's not possible for the moment, since we have to come up with that site in a about a month and that's too late to switch (moreover, some libraries we depend on do not support 1.5 for the moment). Thus, we have to stick to 1.4.x for the moment and I hope someone who has already implemented URL localization using this code can help us out. regards, andr On 25.05.2011 21:47, Martin Grigorov wrote: For examples with Wicket 1.5 see http://www.wicket-library.com/wicket-examples/mappers/en_US On Wed, May 25, 2011 at 8:22 PM, Andreas Mazaandr.m...@gmail.com wrote: Hello, I am trying to realize localized URLs in my application (using Wicket 1.4.17) as described in the Wicket wiki ( https://cwiki.apache.org/WICKET/wicket-and-localized-urls.html). However, I have problems accessing the pages then - e.g., calling the localization application of the wicket examples at http://localhost:8080/wicket-examples/pub resolves to http://localhost:8080/wicket-examples/pub/en/?null, which results to a 404 then. Does anyone have a hint for me what's going wrong? I tried to debug the code, but without any success. Thanks in advance, andr - 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: Problems localized URLs (https://cwiki.apache.org/WICKET/wicket-and-localized-urls.html)
Shame! This blog http://day-to-day-stuff.blogspot.com has few articles about mounting in 1.4. And maybe http://blog.jteam.nl/2010/02/24/wicket-root-mounts/ (same author) can help you. Good luck! On Thu, May 26, 2011 at 10:19 AM, Andreas Maza andr.m...@gmail.com wrote: Thanks, Martin - but that's a different story ;-) I have already read about the features of 1.5 and I would really be keen to migrate. However, that's not possible for the moment, since we have to come up with that site in a about a month and that's too late to switch (moreover, some libraries we depend on do not support 1.5 for the moment). Thus, we have to stick to 1.4.x for the moment and I hope someone who has already implemented URL localization using this code can help us out. regards, andr On 25.05.2011 21:47, Martin Grigorov wrote: For examples with Wicket 1.5 see http://www.wicket-library.com/wicket-examples/mappers/en_US On Wed, May 25, 2011 at 8:22 PM, Andreas Mazaandr.m...@gmail.com wrote: Hello, I am trying to realize localized URLs in my application (using Wicket 1.4.17) as described in the Wicket wiki ( https://cwiki.apache.org/WICKET/wicket-and-localized-urls.html). However, I have problems accessing the pages then - e.g., calling the localization application of the wicket examples at http://localhost:8080/wicket-examples/pub resolves to http://localhost:8080/wicket-examples/pub/en/?null, which results to a 404 then. Does anyone have a hint for me what's going wrong? I tried to debug the code, but without any success. Thanks in advance, andr - 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
problem to test form in modal window with wicket tester
Hi all, I have a modal window with a login form inside that works fine when I test it manually. I try to test it with wicket tester since yesterday. I saw in some mails of this list that there is nothing special in testing modal windows. I tried this : tester.startPage(AccueilPage.class); tester.clickLink(connexion); ModalWindowE4N modalWindow = (ModalWindowE4N) tester.getComponentFromLastRenderedPage(modalConnexion); tester.isVisible(modalWindow.getPageRelativePath() + : + modalWindow.getContentId()); Form? loginForm = (Form?) modalWindow.get(loginForm); Component feedbackPanel = modalWindow.get(errorMsg); FormTester formTester = tester.newFormTester(loginForm.getPageRelativePath() + : + loginForm.getId()); but I have a java.lang.NullPointerException on loginForm (and feedbackPanel is also null). I begin with Wiket and I really don't understand why it doesn't work. What am I doing wrong? Thanks Mathilde
Re: tree do not stay open tree collapsed after setResponsePage
hi, i do not reload the page - or rather the page reloads itself. the page has two div areas in the markup and i load the target page into one div and the tree in the other. regards hubert Am 25.05.2011 um 20:51 schrieb James Carman: How are you getting back to the original page? On Wed, May 25, 2011 at 11:09 AM, hubert_hupe hubert_h...@gmx.de wrote: hi folks, i get wicket with the wicket... what do i have is a simple tree in page X. after click a node i do a redirect to pageY. so far so good. but the tree collapsed after the redirect. it seems the tree is rebuild after the click. its a kind of postback behavior. my question is: what can i do to prevent collapsing the tree? if this is not possible, how can i open the old node? or how can i prevent the reloading/postbacking? best regards hubert add(new LinkTree(tree, createTreeModel()) { @Override protected void onNodeLinkClicked(Object node, BaseTree tree, AjaxRequestTarget target) { System.out.println(test); System.out.println(node: + node.toString()); Page1 p1 = new Page1(node.toString()); setResponsePage(p1); -- } }); protected TreeModel createTreeModel() { DefaultMutableTreeNode root = new DefaultMutableTreeNode(new ModelBean(ROOT)); ... } i created a simple layout with div in the markup to ensure that the tree is on the left site and the navigated page on the right... div id=leftframe style=float: left; ... wicket:id=tree... /div div id=body wicket:child / /div - 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: tree do not stay open tree collapsed after setResponsePage
With code like: Page1 p1 = new Page1(node.toString()); setResponsePage(p1); -- it is you who reloads the page. Load a page in a div ? How do you do that ? The only possible way is to put an iframe in the div. I guess you need a Panel instead of a Page and re-render it with : target.addComponent(panel) On Thu, May 26, 2011 at 11:19 AM, hubert_hupe hubert_h...@gmx.de wrote: hi, i do not reload the page - or rather the page reloads itself. the page has two div areas in the markup and i load the target page into one div and the tree in the other. regards hubert Am 25.05.2011 um 20:51 schrieb James Carman: How are you getting back to the original page? On Wed, May 25, 2011 at 11:09 AM, hubert_hupe hubert_h...@gmx.de wrote: hi folks, i get wicket with the wicket... what do i have is a simple tree in page X. after click a node i do a redirect to pageY. so far so good. but the tree collapsed after the redirect. it seems the tree is rebuild after the click. its a kind of postback behavior. my question is: what can i do to prevent collapsing the tree? if this is not possible, how can i open the old node? or how can i prevent the reloading/postbacking? best regards hubert add(new LinkTree(tree, createTreeModel()) { @Override protected void onNodeLinkClicked(Object node, BaseTree tree, AjaxRequestTarget target) { System.out.println(test); System.out.println(node: + node.toString()); Page1 p1 = new Page1(node.toString()); setResponsePage(p1); -- } }); protected TreeModel createTreeModel() { DefaultMutableTreeNode root = new DefaultMutableTreeNode(new ModelBean(ROOT)); ... } i created a simple layout with div in the markup to ensure that the tree is on the left site and the navigated page on the right... div id=leftframe style=float: left; ... wicket:id=tree... /div div id=body wicket:child / /div - 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 -- 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: problem to test form in modal window with wicket tester
Hi Mathilde, maybe the form id you use in test is not correct. How do you add form to modalWindow? Can you attach code? Hi all, I have a modal window with a login form inside that works fine when I test it manually. I try to test it with wicket tester since yesterday. I saw in some mails of this list that there is nothing special in testing modal windows. I tried this : tester.startPage(AccueilPage.class); tester.clickLink(connexion); ModalWindowE4N modalWindow = (ModalWindowE4N) tester.getComponentFromLastRenderedPage(modalConnexion); tester.isVisible(modalWindow.getPageRelativePath() + : + modalWindow.getContentId()); Form? loginForm = (Form?) modalWindow.get(loginForm); Component feedbackPanel = modalWindow.get(errorMsg); FormTester formTester = tester.newFormTester(loginForm.getPageRelativePath() + : + loginForm.getId()); but I have a java.lang.NullPointerException on loginForm (and feedbackPanel is also null). I begin with Wiket and I really don't understand why it doesn't work. What am I doing wrong? Thanks Mathilde - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: tree do not stay open tree collapsed after setResponsePage
i used the following example as a template: http://wicket.apache.org/learn/examples/markupinheritance.html With code like: Page1 p1 = new Page1(node.toString()); setResponsePage(p1); -- is there an alternative to show Page1 without using setResponsePage? Am 26.05.2011 um 10:23 schrieb Martin Grigorov: With code like: Page1 p1 = new Page1(node.toString()); setResponsePage(p1); -- it is you who reloads the page. Load a page in a div ? How do you do that ? The only possible way is to put an iframe in the div. I guess you need a Panel instead of a Page and re-render it with : target.addComponent(panel) On Thu, May 26, 2011 at 11:19 AM, hubert_hupe hubert_h...@gmx.de wrote: hi, i do not reload the page - or rather the page reloads itself. the page has two div areas in the markup and i load the target page into one div and the tree in the other. regards hubert Am 25.05.2011 um 20:51 schrieb James Carman: How are you getting back to the original page? On Wed, May 25, 2011 at 11:09 AM, hubert_hupe hubert_h...@gmx.de wrote: hi folks, i get wicket with the wicket... what do i have is a simple tree in page X. after click a node i do a redirect to pageY. so far so good. but the tree collapsed after the redirect. it seems the tree is rebuild after the click. its a kind of postback behavior. my question is: what can i do to prevent collapsing the tree? if this is not possible, how can i open the old node? or how can i prevent the reloading/postbacking? best regards hubert add(new LinkTree(tree, createTreeModel()) { @Override protected void onNodeLinkClicked(Object node, BaseTree tree, AjaxRequestTarget target) { System.out.println(test); System.out.println(node: + node.toString()); Page1 p1 = new Page1(node.toString()); setResponsePage(p1); -- } }); protected TreeModel createTreeModel() { DefaultMutableTreeNode root = new DefaultMutableTreeNode(new ModelBean(ROOT)); ... } i created a simple layout with div in the markup to ensure that the tree is on the left site and the navigated page on the right... div id=leftframe style=float: left; ... wicket:id=tree... /div div id=body wicket:child / /div - 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 -- 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: Problems localized URLs (https://cwiki.apache.org/WICKET/wicket-and-localized-urls.html)
Thanks Martin. I've already googled a lot and read the article by Erik you are referencing (http://blog.jteam.nl/2010/02/24/wicket-root-mounts). However, this blog post target a different URL mounting problem and refers to the wiki article by Alex Objelean, which I am quoting in the subject of this post for building localized URLs. My problem is not about URL mounting in general, but a specific issue I ran into when used the code provided on the wiki page. regards, andr On 26.05.2011 09:25, Martin Grigorov wrote: Shame! This blog http://day-to-day-stuff.blogspot.com has few articles about mounting in 1.4. And maybe http://blog.jteam.nl/2010/02/24/wicket-root-mounts/ (same author) can help you. Good luck! On Thu, May 26, 2011 at 10:19 AM, Andreas Mazaandr.m...@gmail.com wrote: Thanks, Martin - but that's a different story ;-) I have already read about the features of 1.5 and I would really be keen to migrate. However, that's not possible for the moment, since we have to come up with that site in a about a month and that's too late to switch (moreover, some libraries we depend on do not support 1.5 for the moment). Thus, we have to stick to 1.4.x for the moment and I hope someone who has already implemented URL localization using this code can help us out. regards, andr On 25.05.2011 21:47, Martin Grigorov wrote: For examples with Wicket 1.5 see http://www.wicket-library.com/wicket-examples/mappers/en_US On Wed, May 25, 2011 at 8:22 PM, Andreas Mazaandr.m...@gmail.com wrote: Hello, I am trying to realize localized URLs in my application (using Wicket 1.4.17) as described in the Wicket wiki ( https://cwiki.apache.org/WICKET/wicket-and-localized-urls.html). However, I have problems accessing the pages then - e.g., calling the localization application of the wicket examples at http://localhost:8080/wicket-examples/pub resolves to http://localhost:8080/wicket-examples/pub/en/?null, which results to a 404 then. Does anyone have a hint for me what's going wrong? I tried to debug the code, but without any success. Thanks in advance, andr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket session statistics
hello, Maybe my question is not very clear. I want to Statistics Session Numbers, I mean the sessions in the application. for example there are two users online the session should be 2. Can anyone give me some solutions ? Thank you all the same,Martin Grigorov! Good Luck ! 2011/5/26 Martin Grigorov mgrigo...@apache.org org.apache.wicket.Session.getSizeInBytes() 2011/5/26 KingFee Dong kingfee.d...@gmail.com Hi,EVERYONE I am a newer to wicket ,now i want to statistics session,how can i do it? Can anyone give me some suggestion ? Thanks! -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ -- 多谢您的关注 济南云计算软件有限公司 技术部 董飞 邮箱:kingfee.d...@gmail.com 移动电话:15275312865 公司地址:济南齐鲁软件园软件大厦807
Re: wicket session statistics
see DebugBar panel in wicket-devutils.jar 2011/5/26 KingFee Dong kingfee.d...@gmail.com: hello, Maybe my question is not very clear. I want to Statistics Session Numbers, I mean the sessions in the application. for example there are two users online the session should be 2. Can anyone give me some solutions ? Thank you all the same,Martin Grigorov! Good Luck ! 2011/5/26 Martin Grigorov mgrigo...@apache.org org.apache.wicket.Session.getSizeInBytes() 2011/5/26 KingFee Dong kingfee.d...@gmail.com Hi,EVERYONE I am a newer to wicket ,now i want to statistics session,how can i do it? Can anyone give me some suggestion ? Thanks! -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ -- 多谢您的关注 济南云计算软件有限公司 技术部 董飞 邮箱:kingfee.d...@gmail.com 移动电话:15275312865 公司地址:济南齐鲁软件园软件大厦807 -- 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: problem to test form in modal window with wicket tester
this is the code to construct modal window final ModalWindowE4N modalConnexion = new ModalWindowE4N(modalConnexion); modalConnexion.setTitle(Connexion à l'espace membre); modalConnexion.setContent(new ConnexionContentPanel(modalConnexion.getContentId())); add(modalConnexion); Form is added in ConnexionContentPanel : public ConnexionContentPanel(String id) { super(id); //Création du formulaire dont les champs seront liés aux champs d'un membre grace au model FormMembre loginForm = new FormMembre(loginForm, new CompoundPropertyModelMembre(new LoadableDetachableModelMembre() { @Override protected Membre load() { return new Membre(); } })); //Création et ajout des champs id et pwd au formulaire TextFieldMembre idField = new TextFieldMembre(membreId); idField.setRequired(true); loginForm.add(idField); PasswordTextField pwdField = new PasswordTextField(password); pwdField.setRequired(true); loginForm.add(pwdField); //Ajout d'un du feedback panel qui contiendra les erreurs relevées par le formulaire final FeedbackPanel feedBackPanel = new FeedbackPanel(errorMsg); feedBackPanel.setOutputMarkupId(true); add(feedBackPanel); //création du bouton ajax pour soumettre le formulaire AjaxButton submitbutton = new AjaxButton(ajaxSubmitLogin) { @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { Membre modelObject = (Membre) form.getModelObject(); Membre membre; membre = serviceIdentif.identifier(modelObject.getId(), modelObject.getPassword()); if(membre == null) error(Identifiant ou mot de passe incorrect); else setResponsePage(TableauBordPage.class); } @Override protected void onError(AjaxRequestTarget target, Form? form) { target.addComponent(feedBackPanel); } }; loginForm.add(submitbutton); //ajout du formulaire au panel add(loginForm); } you can see that form id is correct. It is the same problem with FeedBackPanel errorMsg : I get a null pointer when I try to get it with modalWindow.get(errorMsg); 2011/5/26 Andrea Del Bene adelb...@ciseonweb.it Hi Mathilde, maybe the form id you use in test is not correct. How do you add form to modalWindow? Can you attach code? Hi all, I have a modal window with a login form inside that works fine when I test it manually. I try to test it with wicket tester since yesterday. I saw in some mails of this list that there is nothing special in testing modal windows. I tried this : tester.startPage(AccueilPage.class); tester.clickLink(connexion); ModalWindowE4N modalWindow = (ModalWindowE4N) tester.getComponentFromLastRenderedPage(modalConnexion); tester.isVisible(modalWindow.getPageRelativePath() + : + modalWindow.getContentId()); Form? loginForm = (Form?) modalWindow.get(loginForm); Component feedbackPanel = modalWindow.get(errorMsg); FormTester formTester = tester.newFormTester(loginForm.getPageRelativePath() + : + loginForm.getId()); but I have a java.lang.NullPointerException on loginForm (and feedbackPanel is also null). I begin with Wiket and I really don't understand why it doesn't work. What am I doing wrong? Thanks Mathilde - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : mathilde.pelle...@gmail.com Mon CV en ligne : http://www.mathilde-pellerin.fr/ http://www.mathilde-pellerin.fr/Mes liens : http://www.viadeo.com/fr/profile/mathilde.pellerin http://fr.linkedin.com/in/mathildepellerin
Re: wicket session statistics
Also Tomcat comes with ManagerApplication which provides such kind of information for all deployed apps On Thu, May 26, 2011 at 12:05 PM, Martin Grigorov mgrigo...@apache.org wrote: see DebugBar panel in wicket-devutils.jar 2011/5/26 KingFee Dong kingfee.d...@gmail.com: hello, Maybe my question is not very clear. I want to Statistics Session Numbers, I mean the sessions in the application. for example there are two users online the session should be 2. Can anyone give me some solutions ? Thank you all the same,Martin Grigorov! Good Luck ! 2011/5/26 Martin Grigorov mgrigo...@apache.org org.apache.wicket.Session.getSizeInBytes() 2011/5/26 KingFee Dong kingfee.d...@gmail.com Hi,EVERYONE I am a newer to wicket ,now i want to statistics session,how can i do it? Can anyone give me some suggestion ? Thanks! -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ -- 多谢您的关注 济南云计算软件有限公司 技术部 董飞 邮箱:kingfee.d...@gmail.com 移动电话:15275312865 公司地址:济南齐鲁软件园软件大厦807 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com -- 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: problem to test form in modal window with wicket tester
It's fix : when I paste code to show you, I notice that login form is not added in modal window but in ConnexionContentPanel... So I try this code : ModalWindowE4N modalWindow = (ModalWindowE4N) tester.getComponentFromLastRenderedPage(modalConnexion); ConnexionContentPanel loginPanel = (ConnexionContentPanel) modalWindow.get(modalWindow.getContentId()); Form? loginForm = (Form?) loginPanel.get(loginForm); FormTester formTester = tester.newFormTester(loginForm.getPageRelativePath()); and it works. Thanks for your help. 2011/5/26 Mathilde Pellerin mathilde.pelle...@gmail.com this is the code to construct modal window final ModalWindowE4N modalConnexion = new ModalWindowE4N(modalConnexion); modalConnexion.setTitle(Connexion à l'espace membre); modalConnexion.setContent(new ConnexionContentPanel(modalConnexion.getContentId())); add(modalConnexion); Form is added in ConnexionContentPanel : public ConnexionContentPanel(String id) { super(id); //Création du formulaire dont les champs seront liés aux champs d'un membre grace au model FormMembre loginForm = new FormMembre(loginForm, new CompoundPropertyModelMembre(new LoadableDetachableModelMembre() { @Override protected Membre load() { return new Membre(); } })); //Création et ajout des champs id et pwd au formulaire TextFieldMembre idField = new TextFieldMembre(membreId); idField.setRequired(true); loginForm.add(idField); PasswordTextField pwdField = new PasswordTextField(password); pwdField.setRequired(true); loginForm.add(pwdField); //Ajout d'un du feedback panel qui contiendra les erreurs relevées par le formulaire final FeedbackPanel feedBackPanel = new FeedbackPanel(errorMsg); feedBackPanel.setOutputMarkupId(true); add(feedBackPanel); //création du bouton ajax pour soumettre le formulaire AjaxButton submitbutton = new AjaxButton(ajaxSubmitLogin) { @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { Membre modelObject = (Membre) form.getModelObject(); Membre membre; membre = serviceIdentif.identifier(modelObject.getId(), modelObject.getPassword()); if(membre == null) error(Identifiant ou mot de passe incorrect); else setResponsePage(TableauBordPage.class); } @Override protected void onError(AjaxRequestTarget target, Form? form) { target.addComponent(feedBackPanel); } }; loginForm.add(submitbutton); //ajout du formulaire au panel add(loginForm); } you can see that form id is correct. It is the same problem with FeedBackPanel errorMsg : I get a null pointer when I try to get it with modalWindow.get(errorMsg); 2011/5/26 Andrea Del Bene adelb...@ciseonweb.it Hi Mathilde, maybe the form id you use in test is not correct. How do you add form to modalWindow? Can you attach code? Hi all, I have a modal window with a login form inside that works fine when I test it manually. I try to test it with wicket tester since yesterday. I saw in some mails of this list that there is nothing special in testing modal windows. I tried this : tester.startPage(AccueilPage.class); tester.clickLink(connexion); ModalWindowE4N modalWindow = (ModalWindowE4N) tester.getComponentFromLastRenderedPage(modalConnexion); tester.isVisible(modalWindow.getPageRelativePath() + : + modalWindow.getContentId()); Form? loginForm = (Form?) modalWindow.get(loginForm); Component feedbackPanel = modalWindow.get(errorMsg); FormTester formTester = tester.newFormTester(loginForm.getPageRelativePath() + : + loginForm.getId()); but I have a java.lang.NullPointerException on loginForm (and feedbackPanel is also null). I begin with Wiket and I really don't understand why it doesn't work. What am I doing wrong? Thanks Mathilde - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : mathilde.pelle...@gmail.com Mon CV en ligne : http://www.mathilde-pellerin.fr/ http://www.mathilde-pellerin.fr/Mes liens : http://www.viadeo.com/fr/profile/mathilde.pellerin http://fr.linkedin.com/in/mathildepellerin -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : mathilde.pelle...@gmail.com Mon CV en
Re: problem to test form in modal window with wicket tester
Form id is corret, but remember that form and feedback panel are not added directly to modal window. They are inside ConnexionContentPanel which in turn is added to modalwindow. In your test you should be able to access form calling getContent() before get(loginForm), i.e: modalWindow.getContent().get(loginForm) this is the code to construct modal window final ModalWindowE4N modalConnexion = new ModalWindowE4N(modalConnexion); modalConnexion.setTitle(Connexion à l'espace membre); modalConnexion.setContent(new ConnexionContentPanel(modalConnexion.getContentId())); add(modalConnexion); Form is added in ConnexionContentPanel : public ConnexionContentPanel(String id) { super(id); //Création du formulaire dont les champs seront liés aux champs d'un membre grace au model FormMembre loginForm = new FormMembre(loginForm, new CompoundPropertyModelMembre(new LoadableDetachableModelMembre() { @Override protected Membre load() { return new Membre(); } })); //Création et ajout des champs id et pwd au formulaire TextFieldMembre idField = new TextFieldMembre(membreId); idField.setRequired(true); loginForm.add(idField); PasswordTextField pwdField = new PasswordTextField(password); pwdField.setRequired(true); loginForm.add(pwdField); //Ajout d'un du feedback panel qui contiendra les erreurs relevées par le formulaire final FeedbackPanel feedBackPanel = new FeedbackPanel(errorMsg); feedBackPanel.setOutputMarkupId(true); add(feedBackPanel); //création du bouton ajax pour soumettre le formulaire AjaxButton submitbutton = new AjaxButton(ajaxSubmitLogin) { @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { Membre modelObject = (Membre) form.getModelObject(); Membre membre; membre = serviceIdentif.identifier(modelObject.getId(), modelObject.getPassword()); if(membre == null) error(Identifiant ou mot de passe incorrect); else setResponsePage(TableauBordPage.class); } @Override protected void onError(AjaxRequestTarget target, Form? form) { target.addComponent(feedBackPanel); } }; loginForm.add(submitbutton); //ajout du formulaire au panel add(loginForm); } you can see that form id is correct. It is the same problem with FeedBackPanel errorMsg : I get a null pointer when I try to get it with modalWindow.get(errorMsg); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: problem to test form in modal window with wicket tester
I didn't find getContent() method to modalWindow component, but it works well in two steps : ConnexionContentPanel loginPanel = (ConnexionContentPanel) modalWindow.get(modalWindow.getContentId()); Form? loginForm = (Form?) loginPanel.get(loginForm); thanks a lot ! 2011/5/26 Andrea Del Bene adelb...@ciseonweb.it Form id is corret, but remember that form and feedback panel are not added directly to modal window. They are inside ConnexionContentPanel which in turn is added to modalwindow. In your test you should be able to access form calling getContent() before get(loginForm), i.e: modalWindow.getContent().get(loginForm) this is the code to construct modal window final ModalWindowE4N modalConnexion = new ModalWindowE4N(modalConnexion); modalConnexion.setTitle(Connexion à l'espace membre); modalConnexion.setContent(new ConnexionContentPanel(modalConnexion.getContentId())); add(modalConnexion); Form is added in ConnexionContentPanel : public ConnexionContentPanel(String id) { super(id); //Création du formulaire dont les champs seront liés aux champs d'un membre grace au model FormMembre loginForm = new FormMembre(loginForm, new CompoundPropertyModelMembre(new LoadableDetachableModelMembre() { @Override protected Membre load() { return new Membre(); } })); //Création et ajout des champs id et pwd au formulaire TextFieldMembre idField = new TextFieldMembre(membreId); idField.setRequired(true); loginForm.add(idField); PasswordTextField pwdField = new PasswordTextField(password); pwdField.setRequired(true); loginForm.add(pwdField); //Ajout d'un du feedback panel qui contiendra les erreurs relevées par le formulaire final FeedbackPanel feedBackPanel = new FeedbackPanel(errorMsg); feedBackPanel.setOutputMarkupId(true); add(feedBackPanel); //création du bouton ajax pour soumettre le formulaire AjaxButton submitbutton = new AjaxButton(ajaxSubmitLogin) { @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { Membre modelObject = (Membre) form.getModelObject(); Membre membre; membre = serviceIdentif.identifier(modelObject.getId(), modelObject.getPassword()); if(membre == null) error(Identifiant ou mot de passe incorrect); else setResponsePage(TableauBordPage.class); } @Override protected void onError(AjaxRequestTarget target, Form? form) { target.addComponent(feedBackPanel); } }; loginForm.add(submitbutton); //ajout du formulaire au panel add(loginForm); } you can see that form id is correct. It is the same problem with FeedBackPanel errorMsg : I get a null pointer when I try to get it with modalWindow.get(errorMsg); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : mathilde.pelle...@gmail.com Mon CV en ligne : http://www.mathilde-pellerin.fr/ http://www.mathilde-pellerin.fr/Mes liens : http://www.viadeo.com/fr/profile/mathilde.pellerin http://fr.linkedin.com/in/mathildepellerin
Re: problem to test form in modal window with wicket tester
Sorry, I didn't noticed that getContent() is protected. The solution you found is perfect :-) I didn't find getContent() method to modalWindow component, but it works well in two steps : ConnexionContentPanel loginPanel = (ConnexionContentPanel) modalWindow.get(modalWindow.getContentId()); Form? loginForm = (Form?) loginPanel.get(loginForm); thanks a lot ! 2011/5/26 Andrea Del Beneadelb...@ciseonweb.it - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket session statistics
I found that DebugBar panel in wicket-devutils.jar is also talk about size of one session. What I want to count is unexpired sessions in the wicket application. just like a forum,count the online users Thanks ! 2011/5/26 Martin Grigorov mgrigo...@apache.org Also Tomcat comes with ManagerApplication which provides such kind of information for all deployed apps On Thu, May 26, 2011 at 12:05 PM, Martin Grigorov mgrigo...@apache.org wrote: see DebugBar panel in wicket-devutils.jar 2011/5/26 KingFee Dong kingfee.d...@gmail.com: hello, Maybe my question is not very clear. I want to Statistics Session Numbers, I mean the sessions in the application. for example there are two users online the session should be 2. Can anyone give me some solutions ? Thank you all the same,Martin Grigorov! Good Luck ! 2011/5/26 Martin Grigorov mgrigo...@apache.org org.apache.wicket.Session.getSizeInBytes() 2011/5/26 KingFee Dong kingfee.d...@gmail.com Hi,EVERYONE I am a newer to wicket ,now i want to statistics session,how can i do it? Can anyone give me some suggestion ? Thanks! -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ -- -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com -- 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 session statistics
Look deeper. This info is also provided. 2011/5/26 KingFee Dong kingfee.d...@gmail.com: I found that DebugBar panel in wicket-devutils.jar is also talk about size of one session. What I want to count is unexpired sessions in the wicket application. just like a forum,count the online users Thanks ! 2011/5/26 Martin Grigorov mgrigo...@apache.org Also Tomcat comes with ManagerApplication which provides such kind of information for all deployed apps On Thu, May 26, 2011 at 12:05 PM, Martin Grigorov mgrigo...@apache.org wrote: see DebugBar panel in wicket-devutils.jar 2011/5/26 KingFee Dong kingfee.d...@gmail.com: hello, Maybe my question is not very clear. I want to Statistics Session Numbers, I mean the sessions in the application. for example there are two users online the session should be 2. Can anyone give me some solutions ? Thank you all the same,Martin Grigorov! Good Luck ! 2011/5/26 Martin Grigorov mgrigo...@apache.org org.apache.wicket.Session.getSizeInBytes() 2011/5/26 KingFee Dong kingfee.d...@gmail.com Hi,EVERYONE I am a newer to wicket ,now i want to statistics session,how can i do it? Can anyone give me some suggestion ? Thanks! -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ -- -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com -- 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 -- 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 1.5: How to stop execution after AbstractResource.respond() ?
We have a dynamically generated PDF we send to the user. I figured out a way to do it, but while it works, it produces lots of stacktraces in wicket: I created a PdfResource as subclass of ByteArrayResource. When the user clicks the button, in the onClick() method we do: PdfResource pdfResource = new PdfResource(data); Attributes attrs = new Attributes(requestCycle.getRequest(), requestCycle.getResponse()); pdfResource.respond(attrs); This works so far, except that wicket doesn't know the response has already been sent and tries to display the same page again - I somehow have to stop processing the response, but how do I do that? In Wicket 1.4 I could just throw an AbortException() which did just that. How do I do that in Wicket 1.5 ? Thanks Matt smime.p7s Description: S/MIME Cryptographic Signature
Re: Wicket 1.5: How to stop execution after AbstractResource.respond() ?
see how org.apache.wicket.markup.html.link.DownloadLink.onClick() does it On Thu, May 26, 2011 at 2:52 PM, Matthias Keller matthias.kel...@ergon.ch wrote: We have a dynamically generated PDF we send to the user. I figured out a way to do it, but while it works, it produces lots of stacktraces in wicket: I created a PdfResource as subclass of ByteArrayResource. When the user clicks the button, in the onClick() method we do: PdfResource pdfResource = new PdfResource(data); Attributes attrs = new Attributes(requestCycle.getRequest(), requestCycle.getResponse()); pdfResource.respond(attrs); This works so far, except that wicket doesn't know the response has already been sent and tries to display the same page again - I somehow have to stop processing the response, but how do I do that? In Wicket 1.4 I could just throw an AbortException() which did just that. How do I do that in Wicket 1.5 ? Thanks Matt -- 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: How to stop execution after AbstractResource.respond() ?
Thanks Martin Was looking for such an example but couldn't find one right away. Works like a charm even though I don't really understand what's going on - is there some reading about request handler internals in wicket 1.5 somewhere? The wiki pages do not seem to reflect any 1.5 behaviour yet... Thanks Matt On 2011-05-26 13:55, Martin Grigorov wrote: see how org.apache.wicket.markup.html.link.DownloadLink.onClick() does it On Thu, May 26, 2011 at 2:52 PM, Matthias Keller matthias.kel...@ergon.ch wrote: We have a dynamically generated PDF we send to the user. I figured out a way to do it, but while it works, it produces lots of stacktraces in wicket: I created a PdfResource as subclass of ByteArrayResource. When the user clicks the button, in the onClick() method we do: PdfResource pdfResource = new PdfResource(data); Attributes attrs = new Attributes(requestCycle.getRequest(), requestCycle.getResponse()); pdfResource.respond(attrs); This works so far, except that wicket doesn't know the response has already been sent and tries to display the same page again - I somehow have to stop processing the response, but how do I do that? In Wicket 1.4 I could just throw an AbortException() which did just that. How do I do that in Wicket 1.5 ? Thanks Matt smime.p7s Description: S/MIME Cryptographic Signature
WicketTester and error messages
Hi all, I am testing a form with FormTester and WicketTester. When I test error messages which are send by form validation, test works well : tester.assertErrorMessages(new String[] {Le champ 'Identifiant' est obligatoire.}); but when I test error message which is send by my submit ajaxButton, test fail : no error is sent. When I test application manually, this error appears in feedBackPanel. I don't understand why error is not sent when application is used by wicketTester. This is my submit button code : AjaxButton submitbutton = new AjaxButton(ajaxSubmitLogin) { @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { Membre modelObject = (Membre) form.getModelObject(); Membre membre; membre = serviceIdentif.identifier(modelObject.getId(), modelObject.getPassword()); if(membre == null) error(Identifiant ou mot de passe incorrect); else setResponsePage(TableauBordPage.class); } @Override protected void onError(AjaxRequestTarget target, Form? form) { target.addComponent(feedBackPanel); } } and my test code FormTester formTester = tester.newFormTester(loginForm.getPageRelativePath()); formTester.setValue(membreId, benj); formTester.setValue(password, password); formTester.submit(ajaxSubmitLogin); tester.assertErrorMessages(new String[] {Identifiant ou mot de passe incorrect}); -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : mathilde.pelle...@gmail.com Mon CV en ligne : http://www.mathilde-pellerin.fr/ http://www.mathilde-pellerin.fr/Mes liens : http://www.viadeo.com/fr/profile/mathilde.pellerin http://fr.linkedin.com/in/mathildepellerin
Re: Wicket 1.5: How to stop execution after AbstractResource.respond() ?
There is a label in CWIKI named wicket15. All new information about 1.5 uses it. The migration page is also labeled with this label. It is at the bottom, just click it and you'll see a list of pages for 1.5 that we have currently. IRequestHandler (IRH) is the improved IRequestTarget from 1.4. Read RequestCycle's javadoc for more information about the scheduling of IRequestHandlers. Basically the idea is that the request processing starts with a IRH that is resolved by the request url, then later during processing a new IRH can be scheduled to be executed after the current one (e.g. using setResponsePage() will do that). At the end only the last scheduled IRH actually writes to the http response. On Thu, May 26, 2011 at 3:29 PM, Matthias Keller matthias.kel...@ergon.ch wrote: Thanks Martin Was looking for such an example but couldn't find one right away. Works like a charm even though I don't really understand what's going on - is there some reading about request handler internals in wicket 1.5 somewhere? The wiki pages do not seem to reflect any 1.5 behaviour yet... Thanks Matt On 2011-05-26 13:55, Martin Grigorov wrote: see how org.apache.wicket.markup.html.link.DownloadLink.onClick() does it On Thu, May 26, 2011 at 2:52 PM, Matthias Keller matthias.kel...@ergon.ch wrote: We have a dynamically generated PDF we send to the user. I figured out a way to do it, but while it works, it produces lots of stacktraces in wicket: I created a PdfResource as subclass of ByteArrayResource. When the user clicks the button, in the onClick() method we do: PdfResource pdfResource = new PdfResource(data); Attributes attrs = new Attributes(requestCycle.getRequest(), requestCycle.getResponse()); pdfResource.respond(attrs); This works so far, except that wicket doesn't know the response has already been sent and tries to display the same page again - I somehow have to stop processing the response, but how do I do that? In Wicket 1.4 I could just throw an AbortException() which did just that. How do I do that in Wicket 1.5 ? Thanks Matt -- 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: WicketTester and error messages
Maybe you hit the problem in https://issues.apache.org/jira/browse/WICKET-3711 On Thu, May 26, 2011 at 3:30 PM, Mathilde Pellerin mathilde.pelle...@gmail.com wrote: Hi all, I am testing a form with FormTester and WicketTester. When I test error messages which are send by form validation, test works well : tester.assertErrorMessages(new String[] {Le champ 'Identifiant' est obligatoire.}); but when I test error message which is send by my submit ajaxButton, test fail : no error is sent. When I test application manually, this error appears in feedBackPanel. I don't understand why error is not sent when application is used by wicketTester. This is my submit button code : AjaxButton submitbutton = new AjaxButton(ajaxSubmitLogin) { @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { Membre modelObject = (Membre) form.getModelObject(); Membre membre; membre = serviceIdentif.identifier(modelObject.getId(), modelObject.getPassword()); if(membre == null) error(Identifiant ou mot de passe incorrect); else setResponsePage(TableauBordPage.class); } @Override protected void onError(AjaxRequestTarget target, Form? form) { target.addComponent(feedBackPanel); } } and my test code FormTester formTester = tester.newFormTester(loginForm.getPageRelativePath()); formTester.setValue(membreId, benj); formTester.setValue(password, password); formTester.submit(ajaxSubmitLogin); tester.assertErrorMessages(new String[] {Identifiant ou mot de passe incorrect}); -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : mathilde.pelle...@gmail.com Mon CV en ligne : http://www.mathilde-pellerin.fr/ http://www.mathilde-pellerin.fr/ Mes liens : http://www.viadeo.com/fr/profile/mathilde.pellerin http://fr.linkedin.com/in/mathildepellerin -- 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: WicketTester and error messages
I don't know, it's possible... but honestly, I'm too newbie to judge that. And I don't know how try patches which are proposed... 2011/5/26 Martin Grigorov mgrigo...@apache.org Maybe you hit the problem in https://issues.apache.org/jira/browse/WICKET-3711 On Thu, May 26, 2011 at 3:30 PM, Mathilde Pellerin mathilde.pelle...@gmail.com wrote: Hi all, I am testing a form with FormTester and WicketTester. When I test error messages which are send by form validation, test works well : tester.assertErrorMessages(new String[] {Le champ 'Identifiant' est obligatoire.}); but when I test error message which is send by my submit ajaxButton, test fail : no error is sent. When I test application manually, this error appears in feedBackPanel. I don't understand why error is not sent when application is used by wicketTester. This is my submit button code : AjaxButton submitbutton = new AjaxButton(ajaxSubmitLogin) { @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { Membre modelObject = (Membre) form.getModelObject(); Membre membre; membre = serviceIdentif.identifier(modelObject.getId(), modelObject.getPassword()); if(membre == null) error(Identifiant ou mot de passe incorrect); else setResponsePage(TableauBordPage.class); } @Override protected void onError(AjaxRequestTarget target, Form? form) { target.addComponent(feedBackPanel); } } and my test code FormTester formTester = tester.newFormTester(loginForm.getPageRelativePath()); formTester.setValue(membreId, benj); formTester.setValue(password, password); formTester.submit(ajaxSubmitLogin); tester.assertErrorMessages(new String[] {Identifiant ou mot de passe incorrect}); -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : mathilde.pelle...@gmail.com Mon CV en ligne : http://www.mathilde-pellerin.fr/ http://www.mathilde-pellerin.fr/ Mes liens : http://www.viadeo.com/fr/profile/mathilde.pellerin http://fr.linkedin.com/in/mathildepellerin -- 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 -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : mathilde.pelle...@gmail.com Mon CV en ligne : http://www.mathilde-pellerin.fr/ http://www.mathilde-pellerin.fr/Mes liens : http://www.viadeo.com/fr/profile/mathilde.pellerin http://fr.linkedin.com/in/mathildepellerin
Re: WicketTester and error messages
Create a mini application that reproduces the problem (a.k.a. quickstart) and attach it to this ticket. We will take it into account when we apply this patch. Until then you'll have to find a workaround. Or you Wicket 1.5 RC4.2 where this problem is solved... On Thu, May 26, 2011 at 3:49 PM, Mathilde Pellerin mathilde.pelle...@gmail.com wrote: I don't know, it's possible... but honestly, I'm too newbie to judge that. And I don't know how try patches which are proposed... 2011/5/26 Martin Grigorov mgrigo...@apache.org Maybe you hit the problem in https://issues.apache.org/jira/browse/WICKET-3711 On Thu, May 26, 2011 at 3:30 PM, Mathilde Pellerin mathilde.pelle...@gmail.com wrote: Hi all, I am testing a form with FormTester and WicketTester. When I test error messages which are send by form validation, test works well : tester.assertErrorMessages(new String[] {Le champ 'Identifiant' est obligatoire.}); but when I test error message which is send by my submit ajaxButton, test fail : no error is sent. When I test application manually, this error appears in feedBackPanel. I don't understand why error is not sent when application is used by wicketTester. This is my submit button code : AjaxButton submitbutton = new AjaxButton(ajaxSubmitLogin) { @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { Membre modelObject = (Membre) form.getModelObject(); Membre membre; membre = serviceIdentif.identifier(modelObject.getId(), modelObject.getPassword()); if(membre == null) error(Identifiant ou mot de passe incorrect); else setResponsePage(TableauBordPage.class); } @Override protected void onError(AjaxRequestTarget target, Form? form) { target.addComponent(feedBackPanel); } } and my test code FormTester formTester = tester.newFormTester(loginForm.getPageRelativePath()); formTester.setValue(membreId, benj); formTester.setValue(password, password); formTester.submit(ajaxSubmitLogin); tester.assertErrorMessages(new String[] {Identifiant ou mot de passe incorrect}); -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : mathilde.pelle...@gmail.com Mon CV en ligne : http://www.mathilde-pellerin.fr/ http://www.mathilde-pellerin.fr/ Mes liens : http://www.viadeo.com/fr/profile/mathilde.pellerin http://fr.linkedin.com/in/mathildepellerin -- 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 -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : mathilde.pelle...@gmail.com Mon CV en ligne : http://www.mathilde-pellerin.fr/ http://www.mathilde-pellerin.fr/ Mes liens : http://www.viadeo.com/fr/profile/mathilde.pellerin http://fr.linkedin.com/in/mathildepellerin -- 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: WicketTester and error messages
OK, I will try to create a quickstart. thanks for your answer. 2011/5/26 Martin Grigorov mgrigo...@apache.org Create a mini application that reproduces the problem (a.k.a. quickstart) and attach it to this ticket. We will take it into account when we apply this patch. Until then you'll have to find a workaround. Or you Wicket 1.5 RC4.2 where this problem is solved... On Thu, May 26, 2011 at 3:49 PM, Mathilde Pellerin mathilde.pelle...@gmail.com wrote: I don't know, it's possible... but honestly, I'm too newbie to judge that. And I don't know how try patches which are proposed... 2011/5/26 Martin Grigorov mgrigo...@apache.org Maybe you hit the problem in https://issues.apache.org/jira/browse/WICKET-3711 On Thu, May 26, 2011 at 3:30 PM, Mathilde Pellerin mathilde.pelle...@gmail.com wrote: Hi all, I am testing a form with FormTester and WicketTester. When I test error messages which are send by form validation, test works well : tester.assertErrorMessages(new String[] {Le champ 'Identifiant' est obligatoire.}); but when I test error message which is send by my submit ajaxButton, test fail : no error is sent. When I test application manually, this error appears in feedBackPanel. I don't understand why error is not sent when application is used by wicketTester. This is my submit button code : AjaxButton submitbutton = new AjaxButton(ajaxSubmitLogin) { @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { Membre modelObject = (Membre) form.getModelObject(); Membre membre; membre = serviceIdentif.identifier(modelObject.getId(), modelObject.getPassword()); if(membre == null) error(Identifiant ou mot de passe incorrect); else setResponsePage(TableauBordPage.class); } @Override protected void onError(AjaxRequestTarget target, Form? form) { target.addComponent(feedBackPanel); } } and my test code FormTester formTester = tester.newFormTester(loginForm.getPageRelativePath()); formTester.setValue(membreId, benj); formTester.setValue(password, password); formTester.submit(ajaxSubmitLogin); tester.assertErrorMessages(new String[] {Identifiant ou mot de passe incorrect}); -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : mathilde.pelle...@gmail.com Mon CV en ligne : http://www.mathilde-pellerin.fr/ http://www.mathilde-pellerin.fr/ Mes liens : http://www.viadeo.com/fr/profile/mathilde.pellerin http://fr.linkedin.com/in/mathildepellerin -- 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 -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : mathilde.pelle...@gmail.com Mon CV en ligne : http://www.mathilde-pellerin.fr/ http://www.mathilde-pellerin.fr/ Mes liens : http://www.viadeo.com/fr/profile/mathilde.pellerin http://fr.linkedin.com/in/mathildepellerin -- 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 -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : mathilde.pelle...@gmail.com Mon CV en ligne : http://www.mathilde-pellerin.fr/ http://www.mathilde-pellerin.fr/Mes liens : http://www.viadeo.com/fr/profile/mathilde.pellerin http://fr.linkedin.com/in/mathildepellerin
Re: WicketStuff.org is down, do you guys need some change for your server?
Seems to be up now. On Thu, May 26, 2011 at 4:32 PM, Brown, Berlin [GCG-PFS] berlin.br...@primerica.com wrote: Is wicketstuff.org supposed to be up? I don't know if it is deprecated or not. There were some good examples out there. -- 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: WicketStuff.org is down, do you guys need some change for your server?
Is it down again, darn I was doing a demo. I am getting a 503 unavailable error. -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, May 26, 2011 9:59 AM To: users@wicket.apache.org Subject: Re: WicketStuff.org is down, do you guys need some change for your server? Seems to be up now. On Thu, May 26, 2011 at 4:32 PM, Brown, Berlin [GCG-PFS] berlin.br...@primerica.com wrote: Is wicketstuff.org supposed to be up? I don't know if it is deprecated or not. There were some good examples out there. -- 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: WicketStuff.org is down, do you guys need some change for your server?
Use http://www.wicket-library.com/wicket-examples/index.html as backup :-) On Thu, May 26, 2011 at 6:28 PM, Brown, Berlin [GCG-PFS] berlin.br...@primerica.com wrote: Is it down again, darn I was doing a demo. I am getting a 503 unavailable error. -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, May 26, 2011 9:59 AM To: users@wicket.apache.org Subject: Re: WicketStuff.org is down, do you guys need some change for your server? Seems to be up now. On Thu, May 26, 2011 at 4:32 PM, Brown, Berlin [GCG-PFS] berlin.br...@primerica.com wrote: Is wicketstuff.org supposed to be up? I don't know if it is deprecated or not. There were some good examples out there. -- 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 -- 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: WicketStuff.org is down, do you guys need some change for your server?
Download the distribution, and run the examples locally. Using an external (I might add free, volunteer, no-guarantees) service for a demo that you don't have any control over is asking for trouble. Martijn On Thu, May 26, 2011 at 5:28 PM, Brown, Berlin [GCG-PFS] berlin.br...@primerica.com wrote: Is it down again, darn I was doing a demo. I am getting a 503 unavailable error. -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, May 26, 2011 9:59 AM To: users@wicket.apache.org Subject: Re: WicketStuff.org is down, do you guys need some change for your server? Seems to be up now. On Thu, May 26, 2011 at 4:32 PM, Brown, Berlin [GCG-PFS] berlin.br...@primerica.com wrote: Is wicketstuff.org supposed to be up? I don't know if it is deprecated or not. There were some good examples out there. -- 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 -- Become a Wicket expert, learn from the best: http://wicketinaction.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketTester and error messages
As far as i understood this, FormTester submit is only for pushing the data from component to model. If you wait for the component to be executed the js event has to be executed. Is it working if you do an WicketTester.executeAjaxEvent(id, onclick); ? Cheers Per Hi all, I am testing a form with FormTester and WicketTester. When I test error messages which are send by form validation, test works well : tester.assertErrorMessages(new String[] {Le champ 'Identifiant' est obligatoire.}); but when I test error message which is send by my submit ajaxButton, test fail : no error is sent. When I test application manually, this error appears in feedBackPanel. I don't understand why error is not sent when application is used by wicketTester. This is my submit button code : AjaxButton submitbutton = new AjaxButton(ajaxSubmitLogin) { @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { Membre modelObject = (Membre) form.getModelObject(); Membre membre; membre = serviceIdentif.identifier(modelObject.getId(), modelObject.getPassword()); if(membre == null) error(Identifiant ou mot de passe incorrect); else setResponsePage(TableauBordPage.class); } @Override protected void onError(AjaxRequestTarget target, Form? form) { target.addComponent(feedBackPanel); } } and my test code FormTester formTester = tester.newFormTester(loginForm.getPageRelativePath()); formTester.setValue(membreId, benj); formTester.setValue(password, password); formTester.submit(ajaxSubmitLogin); tester.assertErrorMessages(new String[] {Identifiant ou mot de passe incorrect}); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Request logger invasive
Is the request logger invasive? Is it something that can be used in a production environment? http://www.volkomenjuist.nl/blog/2009/04/08/wicket-requestlogger/
Re: Request logger invasive
On Thu, May 26, 2011 at 9:34 PM, Brown, Berlin [GCG-PFS] berlin.br...@primerica.com wrote: Is the request logger invasive? Is it something that can be used in a production environment? http://www.volkomenjuist.nl/blog/2009/04/08/wicket-requestlogger/ Only when you log the size of the session. That costs time (needs to serialize the session on each request). If you also set the number of requests stored to a low number, there's little to no overhead. We are running the requestlogger since it was crafted (2007 I recall) and never had any problem with it. Martijn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Request logger invasive
And you can always switch it off/on at runtime thru an admin page for example. On Thu, May 26, 2011 at 10:44 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: On Thu, May 26, 2011 at 9:34 PM, Brown, Berlin [GCG-PFS] berlin.br...@primerica.com wrote: Is the request logger invasive? Is it something that can be used in a production environment? http://www.volkomenjuist.nl/blog/2009/04/08/wicket-requestlogger/ Only when you log the size of the session. That costs time (needs to serialize the session on each request). If you also set the number of requests stored to a low number, there's little to no overhead. We are running the requestlogger since it was crafted (2007 I recall) and never had any problem with it. Martijn - 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: WicketStuff.org is down, do you guys need some change for your server?
Server is up and running, if anyone haven't noticed yet. :-) *Bruno Borges* www.brunoborges.com.br +55 21 76727099 On Thu, May 26, 2011 at 12:45 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: Download the distribution, and run the examples locally. Using an external (I might add free, volunteer, no-guarantees) service for a demo that you don't have any control over is asking for trouble. Martijn On Thu, May 26, 2011 at 5:28 PM, Brown, Berlin [GCG-PFS] berlin.br...@primerica.com wrote: Is it down again, darn I was doing a demo. I am getting a 503 unavailable error. -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, May 26, 2011 9:59 AM To: users@wicket.apache.org Subject: Re: WicketStuff.org is down, do you guys need some change for your server? Seems to be up now. On Thu, May 26, 2011 at 4:32 PM, Brown, Berlin [GCG-PFS] berlin.br...@primerica.com wrote: Is wicketstuff.org supposed to be up? I don't know if it is deprecated or not. There were some good examples out there. -- 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 -- Become a Wicket expert, learn from the best: http://wicketinaction.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
JavaScript form submit
I am having trouble figuring out how to submit a form that is dynamically created via JavaScript. The page uses JavaScript to create a list of commands inside a form element like so: form input type=hidden name=ActionCd value=Move / input type=hidden name=Origination value=Person1 / input type=hidden name=Destination value=Person2 / input type=hidden name=ActionCd value=Copy / input type=hidden name=Origination value=Person3 / input type=hidden name=Destination value=Person5 / /form I need to be able to complete each command in my Wicket code like so: public void onSubmit() { ListCommands data = getAndParseFormDataIntoCommands(); for (Command com : data) { if( com.getAction() == Action.MOVE) do this; if( com.getAction() == Action.COPY) do that; } } For now, I am taking an empty Wicket Form and copying in the innerHTML of my dynamic form and then submitting the Wicket Form. This gets me into the onSubmit of the Wicket Form Java code. When I Form.toString(true) the Wicket Form inside the onSubmit(), it does not contain my newly copied over input elements. I think this is a client/server issue, but I am not sure. Does anybody know of a good way to do something like this? I have two problems. First, I need to get the dynamic form data to the server side of the code. Second, I need to know how to parse the data as I expect raw HTML. I tried using MarkupStream for the parsing, but I don't know if that is the correct tool. I want to do this inside a Panel, so I don't want to post the form to another page if I don't have to do so. Thanks for any help! -- Jered Myers - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: JavaScript form submit
Using the Request object seems to work here. I am not sure if this is a good idea. Here is an example from in the form onSubmit(): Request request = RequestCycle.get().getRequest(); String[] actions = request.getParameters(ActionCd); String[] orginations = request.getParameters(Origination); ... On 5/26/2011 4:07 PM, Jered Myers wrote: I am having trouble figuring out how to submit a form that is dynamically created via JavaScript. The page uses JavaScript to create a list of commands inside a form element like so: form input type=hidden name=ActionCd value=Move / input type=hidden name=Origination value=Person1 / input type=hidden name=Destination value=Person2 / input type=hidden name=ActionCd value=Copy / input type=hidden name=Origination value=Person3 / input type=hidden name=Destination value=Person5 / /form I need to be able to complete each command in my Wicket code like so: public void onSubmit() { ListCommands data = getAndParseFormDataIntoCommands(); for (Command com : data) { if( com.getAction() == Action.MOVE) do this; if( com.getAction() == Action.COPY) do that; } } For now, I am taking an empty Wicket Form and copying in the innerHTML of my dynamic form and then submitting the Wicket Form. This gets me into the onSubmit of the Wicket Form Java code. When I Form.toString(true) the Wicket Form inside the onSubmit(), it does not contain my newly copied over input elements. I think this is a client/server issue, but I am not sure. Does anybody know of a good way to do something like this? I have two problems. First, I need to get the dynamic form data to the server side of the code. Second, I need to know how to parse the data as I expect raw HTML. I tried using MarkupStream for the parsing, but I don't know if that is the correct tool. I want to do this inside a Panel, so I don't want to post the form to another page if I don't have to do so. Thanks for any help! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Execute Javascript after Ajax
Here are my components; Wicket 1.4.17 Page AjaxTabbedPanel (with Panel1 and Panel2) AdPanel which has adsense js, no components AdPanel is on Panel1 and Panel2 When the tab panel renders the first tab (Panel1) the AdPanel executes its js and renders the ad. Moving to the second tab (Panel2) the AdPanel executes its js (I know becuase i added an alert) but does NOT render the ad. And moving back to the first tab, the ad that was previously shown fails to render. Note: behavior as described is for IE and Chrome, Firefox fails to render the page altogether. IE and Chrome at least render the page and panel without the ad. I've also tried adding the js to a function (in AdPanel markup) and calling that function on dom load with a behavior. As well as the response.renderOnDomReadyJavascript() and response.renderJavascriptReference() but this renders to head. I've also tried an AjaxLazyLoadPanel for AdPanel with no effect, the ad renders once and only before an Ajax call. Is there any way to execute the js inline after an ajax call? Am I missing something, are there Ajax bugs here? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket session statistics
Hello, Maybe I found it,LiveSessionsPage.java ,it can count peak session,but not what i want. I want to count the online users, for example there a three users here, if somtime a user had closed his(or her) web browser this session number is two now How can I do it ? Thanks! 2011/5/26 Martin Grigorov mgrigo...@apache.org Look deeper. This info is also provided. 2011/5/26 KingFee Dong kingfee.d...@gmail.com: I found that DebugBar panel in wicket-devutils.jar is also talk about size of one session. What I want to count is unexpired sessions in the wicket application. just like a forum,count the online users Thanks ! 2011/5/26 Martin Grigorov mgrigo...@apache.org Also Tomcat comes with ManagerApplication which provides such kind of information for all deployed apps On Thu, May 26, 2011 at 12:05 PM, Martin Grigorov mgrigo...@apache.org wrote: see DebugBar panel in wicket-devutils.jar 2011/5/26 KingFee Dong kingfee.d...@gmail.com: hello, Maybe my question is not very clear. I want to Statistics Session Numbers, I mean the sessions in the application. for example there are two users online the session should be 2. Can anyone give me some solutions ? Thank you all the same,Martin Grigorov! Good Luck ! 2011/5/26 Martin Grigorov mgrigo...@apache.org org.apache.wicket.Session.getSizeInBytes() 2011/5/26 KingFee Dong kingfee.d...@gmail.com Hi,EVERYONE I am a newer to wicket ,now i want to statistics session,how can i do it? Can anyone give me some suggestion ? Thanks! -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ http://jweekend.com/ -- -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.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 http://jweekend.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Original page cloned after popup dialog closes
Out app has a WebPage that opens a ModalWindow dialog passing in the page. The dialog allows the user to modify the model of one of the page's components. When the dialog closes and the onClose() callback in the page is called, the object ID of the page has changed and the component model does not have the changes from the dialog. This is very likely a common Wicket newbie error but I can't find anything about it anywhere. Please help. Let me know if I need to build a simple example to demonstrate this. Thanks, - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: tree do not stay open tree collapsed after setResponsePage
I have not worked with trees myself, but it sounds like you would like to update the contents of another div when a node in the tree is clicked? Use ajax to update the div, via an AjaxLink in the the node. Viel spass Bert Am 26.05.2011 10:53 schrieb hubert_hupe hubert_h...@gmx.de: i used the following example as a template: http://wicket.apache.org/learn/examples/markupinheritance.html With code like: Page1 p1 = new Page1(node.toString()); setResponsePage(p1); -- is there an alternative to show Page1 without using setResponsePage? Am 26.05.2011 um 10:23 schrieb Martin Grigorov: With code like: Page1 p1 = new Page1(node.toString()); setResponsePage(p1); -- it is you who reloads the page. Load a page in a div ? How do you do that ? The only possible way is to put an iframe in the div. I guess you need a Panel instead of a Page and re-render it with : target.addComponent(panel) On Thu, May 26, 2011 at 11:19 AM, hubert_hupe hubert_h...@gmx.de wrote: hi, i do not reload the page - or rather the page reloads itself. the page has two div areas in the markup and i load the target page into one div and the tree in the other. regards hubert Am 25.05.2011 um 20:51 schrieb James Carman: How are you getting back to the original page? On Wed, May 25, 2011 at 11:09 AM, hubert_hupe hubert_h...@gmx.de wrote: hi folks, i get wicket with the wicket... what do i have is a simple tree in page X. after click a node i do a redirect to pageY. so far so good. but the tree collapsed after the redirect. it seems the tree is rebuild after the click. its a kind of postback behavior. my question is: what can i do to prevent collapsing the tree? if this is not possible, how can i open the old node? or how can i prevent the reloading/postbacking? best regards hubert add(new LinkTree(tree, createTreeModel()) { @Override protected void onNodeLinkClicked(Object node, BaseTree tree, AjaxRequestTarget target) { System.out.println(test); System.out.println(node: + node.toString()); Page1 p1 = new Page1(node.toString()); setResponsePage(p1); -- } }); protected TreeModel createTreeModel() { DefaultMutableTreeNode root = new DefaultMutableTreeNode(new ModelBean(ROOT)); ... } i created a simple layout with div in the markup to ensure that the tree is on the left site and the navigated page on the right... div id=leftframe style=float: left; ... wicket:id=tree... /div div id=body wicket:child / /div - 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 -- 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: Execute Javascript after Ajax
target.appendJavascript(js) will execute it after components have been updated via ajax. -igor On Thu, May 26, 2011 at 6:12 PM, Phil Franken phil.fran...@gmail.com wrote: Here are my components; Wicket 1.4.17 Page AjaxTabbedPanel (with Panel1 and Panel2) AdPanel which has adsense js, no components AdPanel is on Panel1 and Panel2 When the tab panel renders the first tab (Panel1) the AdPanel executes its js and renders the ad. Moving to the second tab (Panel2) the AdPanel executes its js (I know becuase i added an alert) but does NOT render the ad. And moving back to the first tab, the ad that was previously shown fails to render. Note: behavior as described is for IE and Chrome, Firefox fails to render the page altogether. IE and Chrome at least render the page and panel without the ad. I've also tried adding the js to a function (in AdPanel markup) and calling that function on dom load with a behavior. As well as the response.renderOnDomReadyJavascript() and response.renderJavascriptReference() but this renders to head. I've also tried an AjaxLazyLoadPanel for AdPanel with no effect, the ad renders once and only before an Ajax call. Is there any way to execute the js inline after an ajax call? Am I missing something, are there Ajax bugs here? - 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 session statistics
Hi, Implement a http://download.oracle.com/javaee/5/api/javax/servlet/http/HttpSessionListener.html and put it in your web.xml. Regards, Tobias Hello, Maybe I found it,LiveSessionsPage.java ,it can count peak session,but not what i want. I want to count the online users, for example there a three users here, if somtime a user had closed his(or her) web browser this session number is two now How can I do it ? Thanks! 2011/5/26 Martin Grigorov mgrigo...@apache.org Look deeper. This info is also provided. 2011/5/26 KingFee Dong kingfee.d...@gmail.com: I found that DebugBar panel in wicket-devutils.jar is also talk about size of one session. What I want to count is unexpired sessions in the wicket application. just like a forum,count the online users Thanks ! 2011/5/26 Martin Grigorov mgrigo...@apache.org Also Tomcat comes with ManagerApplication which provides such kind of information for all deployed apps On Thu, May 26, 2011 at 12:05 PM, Martin Grigorov mgrigo...@apache.org wrote: see DebugBar panel in wicket-devutils.jar 2011/5/26 KingFee Dong kingfee.d...@gmail.com: hello, Maybe my question is not very clear. I want to Statistics Session Numbers, I mean the sessions in the application. for example there are two users online the session should be 2. Can anyone give me some solutions ? Thank you all the same,Martin Grigorov! Good Luck ! 2011/5/26 Martin Grigorov mgrigo...@apache.org org.apache.wicket.Session.getSizeInBytes() 2011/5/26 KingFee Dong kingfee.d...@gmail.com Hi,EVERYONE I am a newer to wicket ,now i want to statistics session,how can i do it? Can anyone give me some suggestion ? Thanks! -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ http://jweekend.com/ -- -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.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 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