Re: Wicket tester test coverage
I use it, and what I'm looking for is a mean to ensure my test coverage. On Wed, Nov 25, 2009 at 6:13 AM, Kent Tong k...@cpttm.org.mo wrote: Pierre Goupil wrote: So I'm looking for a way to list all Page instances in a Wicket app, which could then allow me to be sure that they are all covered by a test. And when it's done maybe I could use the same system in order to ensure that Selenium (the automated functional testing tool) has covered all my pages as well (more deeply). What you need is TDD. Once you adopt TDD, you will have every page tested. - -- Kent Tong Better way to unit test Wicket pages ( http://wicketpagetest.sourceforge.net) -- View this message in context: http://old.nabble.com/Wicket-tester-test-coverage-tp26505428p26507647.html Sent from the Wicket - User 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 -- Rien de grand ne s'est accompli dans le monde sans passion. (G.W.F. Hegel, philosophe allemand)
Re: Wicket tester test coverage
Hi Kent On Wed, Nov 25, 2009 at 6:13 AM, Kent Tong k...@cpttm.org.mo wrote: What you need is TDD. Once you adopt TDD, you will have every page tested. I was under the assumption that unit testing isn't valuable for GUI, esp. web gui, since the effort is too important... I think I even read uncle bob saying so. How do you suggest to write/do TDD for web pages ? thanks in advance ++ zedros - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket tester test coverage
Use Cobertura or similar. It will work for both your use cases and provide you with coverage metrics. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Nov 25, 2009 at 2:23 AM, Pierre Goupil goupilpie...@gmail.comwrote: I use it, and what I'm looking for is a mean to ensure my test coverage. On Wed, Nov 25, 2009 at 6:13 AM, Kent Tong k...@cpttm.org.mo wrote: Pierre Goupil wrote: So I'm looking for a way to list all Page instances in a Wicket app, which could then allow me to be sure that they are all covered by a test. And when it's done maybe I could use the same system in order to ensure that Selenium (the automated functional testing tool) has covered all my pages as well (more deeply). What you need is TDD. Once you adopt TDD, you will have every page tested. - -- Kent Tong Better way to unit test Wicket pages ( http://wicketpagetest.sourceforge.net) -- View this message in context: http://old.nabble.com/Wicket-tester-test-coverage-tp26505428p26507647.html Sent from the Wicket - User 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 -- Rien de grand ne s'est accompli dans le monde sans passion. (G.W.F. Hegel, philosophe allemand)
Re: Wicket tester test coverage
Hi, What you can do is scan all Page classes (or Panel classes, etc) on the class-path and check if there are tests for them. Put this code in a unit test. Fail the test if you find a class without accompanying test. You can use this example to get started with the class path scanning: http://stuq.nl/weblog/2009-11-01/automatically-test-your-wicket-panel-html-markup Regards, Daan van Etten On Wed, 2009-11-25 at 09:23 +0100, Pierre Goupil wrote: I use it, and what I'm looking for is a mean to ensure my test coverage. On Wed, Nov 25, 2009 at 6:13 AM, Kent Tong k...@cpttm.org.mo wrote: Pierre Goupil wrote: So I'm looking for a way to list all Page instances in a Wicket app, which could then allow me to be sure that they are all covered by a test. And when it's done maybe I could use the same system in order to ensure that Selenium (the automated functional testing tool) has covered all my pages as well (more deeply). What you need is TDD. Once you adopt TDD, you will have every page tested. - -- Kent Tong Better way to unit test Wicket pages ( http://wicketpagetest.sourceforge.net) -- View this message in context: http://old.nabble.com/Wicket-tester-test-coverage-tp26505428p26507647.html Sent from the Wicket - User 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket tester test coverage
Spring has a classpath scanner which you can copy and adapt to scan for pages and then try to instantiate them. The problem is often that pages don't have a default constructor, which is a problem if you want to instantiate them automagically. Martijn On Wed, Nov 25, 2009 at 12:57 AM, Pierre Goupil goupilpie...@gmail.com wrote: Guys, One thing that I like regarding Wicket tester is that it easily allows one to check a Page under design for any exception that it could throw at creation-time. Actually, doing such a basic test is for me essential, so as it takes only two lines of code, I systematically check all my pages this way. You know, the: // start and render the test page this.tester.startPage(HomePage.class); // assert rendered page class this.tester.assertRenderedPage(HomePage.class); thing. What I like so much with it is that any error which would occur when you load the page in FF / IE... occurs without leaving Eclipse and immediately. When the workflow to find the page in the browser is long and repetitive, it's a relief! BUT, when the number of pages grow, two related problems emerge: -you have to duplicate these two lines of code everytime, which is a (small) pain in itself -and you have no guarantee that you didn't forget any page, which is worst. So I'm looking for a way to list all Page instances in a Wicket app, which could then allow me to be sure that they are all covered by a test. And when it's done maybe I could use the same system in order to ensure that Selenium (the automated functional testing tool) has covered all my pages as well (more deeply). I could use a test coverage tool, but 1) it wouldn't work with Selenium 2) I don't want to generate a report, I want the test suit to fail if a Page is not covered by my test class. Could anyone suggest where to start, please? Regards, Pierre -- Rien de grand ne s'est accompli dans le monde sans passion. (G.W.F. Hegel, philosophe allemand) -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket tester test coverage
zedros wrote: I was under the assumption that unit testing isn't valuable for GUI, esp. web gui, since the effort is too important... I think I even read uncle bob saying so. How do you suggest to write/do TDD for web pages ? Without reference to his article, I can only guess that it may be pointless to test the position or the color of a button in automated tests. On the other hand, functionality of GUI can definitely be tested. For example, I am writing a Wicket application with TDD (sort of) with the library shown in my signature. It is working very well. - -- Kent Tong Better way to unit test Wicket pages (http://wicketpagetest.sourceforge.net) -- View this message in context: http://old.nabble.com/Wicket-tester-test-coverage-tp26505428p26509652.html Sent from the Wicket - User 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 tester test coverage
In my other post I gave a link to a full-fledged example which scans for Panel classes with the default constructor and instantiates them. http://stuq.nl/weblog/2009-11-01/automatically-test-your-wicket-panel-html-markup This has almost no value (in my opinion) for reporting unit testing coverage. It only checks for exceptions and if the code matches the markup at instantiation. An exception could easily be thrown when replacing panels, clicking on a link or submitting a form. This is not tested. Regards, Daan van Etten On Wed, 2009-11-25 at 10:06 +0100, Martijn Dashorst wrote: Spring has a classpath scanner which you can copy and adapt to scan for pages and then try to instantiate them. The problem is often that pages don't have a default constructor, which is a problem if you want to instantiate them automagically. Martijn On Wed, Nov 25, 2009 at 12:57 AM, Pierre Goupil goupilpie...@gmail.com wrote: Guys, One thing that I like regarding Wicket tester is that it easily allows one to check a Page under design for any exception that it could throw at creation-time. Actually, doing such a basic test is for me essential, so as it takes only two lines of code, I systematically check all my pages this way. You know, the: // start and render the test page this.tester.startPage(HomePage.class); // assert rendered page class this.tester.assertRenderedPage(HomePage.class); thing. What I like so much with it is that any error which would occur when you load the page in FF / IE... occurs without leaving Eclipse and immediately. When the workflow to find the page in the browser is long and repetitive, it's a relief! BUT, when the number of pages grow, two related problems emerge: -you have to duplicate these two lines of code everytime, which is a (small) pain in itself -and you have no guarantee that you didn't forget any page, which is worst. So I'm looking for a way to list all Page instances in a Wicket app, which could then allow me to be sure that they are all covered by a test. And when it's done maybe I could use the same system in order to ensure that Selenium (the automated functional testing tool) has covered all my pages as well (more deeply). I could use a test coverage tool, but 1) it wouldn't work with Selenium 2) I don't want to generate a report, I want the test suit to fail if a Page is not covered by my test class. Could anyone suggest where to start, please? Regards, Pierre -- Rien de grand ne s'est accompli dans le monde sans passion. (G.W.F. Hegel, philosophe allemand) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket tester test coverage
Ouch! It's exactly what my first point was trying to achieve. Thanx a lot! Now, I'll have to adapt it to Selenium. I'll try post it on your blog, Daan. Who said TDD?. I know that not so much is tested in this way be it's so exhaustive (regarding the total number of Pages / Components to check) plus it provide so fast feedback that I find it mandatory for whom wishes to do TDD in Wicket. Regards, Pierre On Wed, Nov 25, 2009 at 10:06 AM, Martijn Dashorst martijn.dasho...@gmail.com wrote: Spring has a classpath scanner which you can copy and adapt to scan for pages and then try to instantiate them. The problem is often that pages don't have a default constructor, which is a problem if you want to instantiate them automagically. Martijn On Wed, Nov 25, 2009 at 12:57 AM, Pierre Goupil goupilpie...@gmail.com wrote: Guys, One thing that I like regarding Wicket tester is that it easily allows one to check a Page under design for any exception that it could throw at creation-time. Actually, doing such a basic test is for me essential, so as it takes only two lines of code, I systematically check all my pages this way. You know, the: // start and render the test page this.tester.startPage(HomePage.class); // assert rendered page class this.tester.assertRenderedPage(HomePage.class); thing. What I like so much with it is that any error which would occur when you load the page in FF / IE... occurs without leaving Eclipse and immediately. When the workflow to find the page in the browser is long and repetitive, it's a relief! BUT, when the number of pages grow, two related problems emerge: -you have to duplicate these two lines of code everytime, which is a (small) pain in itself -and you have no guarantee that you didn't forget any page, which is worst. So I'm looking for a way to list all Page instances in a Wicket app, which could then allow me to be sure that they are all covered by a test. And when it's done maybe I could use the same system in order to ensure that Selenium (the automated functional testing tool) has covered all my pages as well (more deeply). I could use a test coverage tool, but 1) it wouldn't work with Selenium 2) I don't want to generate a report, I want the test suit to fail if a Page is not covered by my test class. Could anyone suggest where to start, please? Regards, Pierre -- Rien de grand ne s'est accompli dans le monde sans passion. (G.W.F. Hegel, philosophe allemand) -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Rien de grand ne s'est accompli dans le monde sans passion. (G.W.F. Hegel, philosophe allemand)
Re: Wicket tester test coverage
Pierre Goupil wrote: I use it, and what I'm looking for is a mean to ensure my test coverage. If you're using TDD, you will have developed the page and the unit test for that page at the same time and by definition you won't have a page that is not tested. - -- Kent Tong Better way to unit test Wicket pages (http://wicketpagetest.sourceforge.net) -- View this message in context: http://old.nabble.com/Wicket-tester-test-coverage-tp26505428p26509669.html Sent from the Wicket - User 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 tester test coverage
Sure. But from the beginning, I was looking for a way not to write the famous 2 lines of code (see above) for each page and component. I'll have a look for sure at your lib, the Selenium integration is promising. :-) On Wed, Nov 25, 2009 at 10:25 AM, Kent Tong k...@cpttm.org.mo wrote: Pierre Goupil wrote: I use it, and what I'm looking for is a mean to ensure my test coverage. If you're using TDD, you will have developed the page and the unit test for that page at the same time and by definition you won't have a page that is not tested. - -- Kent Tong Better way to unit test Wicket pages ( http://wicketpagetest.sourceforge.net) -- View this message in context: http://old.nabble.com/Wicket-tester-test-coverage-tp26505428p26509669.html Sent from the Wicket - User 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 -- Rien de grand ne s'est accompli dans le monde sans passion. (G.W.F. Hegel, philosophe allemand)
Re: Wicket tester test coverage
Yeah, test coverage is a big word here. But as I said I was not looking for a way to generate a report, just a mean to have my test suit fail if 1) a page throws an exception at instantiation 2) a page has not been so tested. That's exactly what you did and I'm not surprised not to be the first one to wonder how to achieve this. Of course this test is pretty basic, but as it's totally automated, that's no big deal. You just have to know what is does and what its limits are. Reading your blog, I see that I made the same assumptions than you regarding that matter and that the need was the very same. On Wed, Nov 25, 2009 at 10:24 AM, Daan van Etten d...@stuq.nl wrote: In my other post I gave a link to a full-fledged example which scans for Panel classes with the default constructor and instantiates them. http://stuq.nl/weblog/2009-11-01/automatically-test-your-wicket-panel-html-markup This has almost no value (in my opinion) for reporting unit testing coverage. It only checks for exceptions and if the code matches the markup at instantiation. An exception could easily be thrown when replacing panels, clicking on a link or submitting a form. This is not tested. Regards, Daan van Etten On Wed, 2009-11-25 at 10:06 +0100, Martijn Dashorst wrote: Spring has a classpath scanner which you can copy and adapt to scan for pages and then try to instantiate them. The problem is often that pages don't have a default constructor, which is a problem if you want to instantiate them automagically. Martijn On Wed, Nov 25, 2009 at 12:57 AM, Pierre Goupil goupilpie...@gmail.com wrote: Guys, One thing that I like regarding Wicket tester is that it easily allows one to check a Page under design for any exception that it could throw at creation-time. Actually, doing such a basic test is for me essential, so as it takes only two lines of code, I systematically check all my pages this way. You know, the: // start and render the test page this.tester.startPage(HomePage.class); // assert rendered page class this.tester.assertRenderedPage(HomePage.class); thing. What I like so much with it is that any error which would occur when you load the page in FF / IE... occurs without leaving Eclipse and immediately. When the workflow to find the page in the browser is long and repetitive, it's a relief! BUT, when the number of pages grow, two related problems emerge: -you have to duplicate these two lines of code everytime, which is a (small) pain in itself -and you have no guarantee that you didn't forget any page, which is worst. So I'm looking for a way to list all Page instances in a Wicket app, which could then allow me to be sure that they are all covered by a test. And when it's done maybe I could use the same system in order to ensure that Selenium (the automated functional testing tool) has covered all my pages as well (more deeply). I could use a test coverage tool, but 1) it wouldn't work with Selenium 2) I don't want to generate a report, I want the test suit to fail if a Page is not covered by my test class. Could anyone suggest where to start, please? Regards, Pierre -- Rien de grand ne s'est accompli dans le monde sans passion. (G.W.F. Hegel, philosophe allemand) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Rien de grand ne s'est accompli dans le monde sans passion. (G.W.F. Hegel, philosophe allemand)
Re: Wicket tester test coverage
Item 2 (fail if a page has not been tested) is not in my solution, but I'm glad I could help :-) Regards, Daan van Etten On Wed, 2009-11-25 at 10:32 +0100, Pierre Goupil wrote: Yeah, test coverage is a big word here. But as I said I was not looking for a way to generate a report, just a mean to have my test suit fail if 1) a page throws an exception at instantiation 2) a page has not been so tested. That's exactly what you did and I'm not surprised not to be the first one to wonder how to achieve this. Of course this test is pretty basic, but as it's totally automated, that's no big deal. You just have to know what is does and what its limits are. Reading your blog, I see that I made the same assumptions than you regarding that matter and that the need was the very same. On Wed, Nov 25, 2009 at 10:24 AM, Daan van Etten d...@stuq.nl wrote: In my other post I gave a link to a full-fledged example which scans for Panel classes with the default constructor and instantiates them. http://stuq.nl/weblog/2009-11-01/automatically-test-your-wicket-panel-html-markup This has almost no value (in my opinion) for reporting unit testing coverage. It only checks for exceptions and if the code matches the markup at instantiation. An exception could easily be thrown when replacing panels, clicking on a link or submitting a form. This is not tested. Regards, Daan van Etten On Wed, 2009-11-25 at 10:06 +0100, Martijn Dashorst wrote: Spring has a classpath scanner which you can copy and adapt to scan for pages and then try to instantiate them. The problem is often that pages don't have a default constructor, which is a problem if you want to instantiate them automagically. Martijn On Wed, Nov 25, 2009 at 12:57 AM, Pierre Goupil goupilpie...@gmail.com wrote: Guys, One thing that I like regarding Wicket tester is that it easily allows one to check a Page under design for any exception that it could throw at creation-time. Actually, doing such a basic test is for me essential, so as it takes only two lines of code, I systematically check all my pages this way. You know, the: // start and render the test page this.tester.startPage(HomePage.class); // assert rendered page class this.tester.assertRenderedPage(HomePage.class); thing. What I like so much with it is that any error which would occur when you load the page in FF / IE... occurs without leaving Eclipse and immediately. When the workflow to find the page in the browser is long and repetitive, it's a relief! BUT, when the number of pages grow, two related problems emerge: -you have to duplicate these two lines of code everytime, which is a (small) pain in itself -and you have no guarantee that you didn't forget any page, which is worst. So I'm looking for a way to list all Page instances in a Wicket app, which could then allow me to be sure that they are all covered by a test. And when it's done maybe I could use the same system in order to ensure that Selenium (the automated functional testing tool) has covered all my pages as well (more deeply). I could use a test coverage tool, but 1) it wouldn't work with Selenium 2) I don't want to generate a report, I want the test suit to fail if a Page is not covered by my test class. Could anyone suggest where to start, please? Regards, Pierre -- Rien de grand ne s'est accompli dans le monde sans passion. (G.W.F. Hegel, philosophe allemand) - 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
[RFE] AjaxLazyLoadPanel callback script rendering
I have a use-case when an AjaxLazyLoadPanel needs to be loaded later then on document onready js event (triggered later by some client-side event, like click on some button). The way it is implemented right now, there is no way to override AjaxLazyLoadPanel change callback handling script. It would be useful if instead of: = add(new AbstractDefaultAjaxBehavior() { ... @Override public void renderHead(IHeaderResponse response) { super.renderHead(response); response.renderOnDomReadyJavascript(getCallbackScript().toString()); } ... } = it would be a protected method which would do the same thing: = add(new AbstractDefaultAjaxBehavior() { ... @Override public void renderHead(final IHeaderResponse response) { super.renderHead(response); handleCallbackScript(response, getCallbackScript().toString()); } ... } protected void handleCallbackScript(final IHeaderResponse response, final String callbackScript) { response.renderOnDomReadyJavascript(callbackScript); } = Should I open a JIRA issue with a patch attached? Thanks! Alex Objelean
Re: Wicket tester test coverage
No, it isn't but: -with your solution, no test has to be written especially for each Component / Page (if one just want to check for exception) -so we are assured that no Page / Component is forgotten (in the check for exception process)) :-) On Wed, Nov 25, 2009 at 10:40 AM, Daan van Etten d...@stuq.nl wrote: Item 2 (fail if a page has not been tested) is not in my solution, but I'm glad I could help :-) Regards, Daan van Etten On Wed, 2009-11-25 at 10:32 +0100, Pierre Goupil wrote: Yeah, test coverage is a big word here. But as I said I was not looking for a way to generate a report, just a mean to have my test suit fail if 1) a page throws an exception at instantiation 2) a page has not been so tested. That's exactly what you did and I'm not surprised not to be the first one to wonder how to achieve this. Of course this test is pretty basic, but as it's totally automated, that's no big deal. You just have to know what is does and what its limits are. Reading your blog, I see that I made the same assumptions than you regarding that matter and that the need was the very same. On Wed, Nov 25, 2009 at 10:24 AM, Daan van Etten d...@stuq.nl wrote: In my other post I gave a link to a full-fledged example which scans for Panel classes with the default constructor and instantiates them. http://stuq.nl/weblog/2009-11-01/automatically-test-your-wicket-panel-html-markup This has almost no value (in my opinion) for reporting unit testing coverage. It only checks for exceptions and if the code matches the markup at instantiation. An exception could easily be thrown when replacing panels, clicking on a link or submitting a form. This is not tested. Regards, Daan van Etten On Wed, 2009-11-25 at 10:06 +0100, Martijn Dashorst wrote: Spring has a classpath scanner which you can copy and adapt to scan for pages and then try to instantiate them. The problem is often that pages don't have a default constructor, which is a problem if you want to instantiate them automagically. Martijn On Wed, Nov 25, 2009 at 12:57 AM, Pierre Goupil goupilpie...@gmail.com wrote: Guys, One thing that I like regarding Wicket tester is that it easily allows one to check a Page under design for any exception that it could throw at creation-time. Actually, doing such a basic test is for me essential, so as it takes only two lines of code, I systematically check all my pages this way. You know, the: // start and render the test page this.tester.startPage(HomePage.class); // assert rendered page class this.tester.assertRenderedPage(HomePage.class); thing. What I like so much with it is that any error which would occur when you load the page in FF / IE... occurs without leaving Eclipse and immediately. When the workflow to find the page in the browser is long and repetitive, it's a relief! BUT, when the number of pages grow, two related problems emerge: -you have to duplicate these two lines of code everytime, which is a (small) pain in itself -and you have no guarantee that you didn't forget any page, which is worst. So I'm looking for a way to list all Page instances in a Wicket app, which could then allow me to be sure that they are all covered by a test. And when it's done maybe I could use the same system in order to ensure that Selenium (the automated functional testing tool) has covered all my pages as well (more deeply). I could use a test coverage tool, but 1) it wouldn't work with Selenium 2) I don't want to generate a report, I want the test suit to fail if a Page is not covered by my test class. Could anyone suggest where to start, please? Regards, Pierre -- Rien de grand ne s'est accompli dans le monde sans passion. (G.W.F. Hegel, philosophe allemand) - 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 -- Rien de grand ne s'est accompli dans le monde sans passion. (G.W.F. Hegel, philosophe allemand)
Re: [RFE] AjaxLazyLoadPanel callback script rendering
Hi Alex, don't you got the same impression than I, that it isn't an lazy load panel? Looks more like an triggered load panel. I have a few in my projects, and I using an strategy like have an page implementing IAjaxIndicatorAware, then changing panels with Component.replace method inside onSubimit or onClick implementations. On Wed, Nov 25, 2009 at 7:48 AM, Objelean Alex alex.objel...@gmail.comwrote: I have a use-case when an AjaxLazyLoadPanel needs to be loaded later then on document onready js event (triggered later by some client-side event, like click on some button). The way it is implemented right now, there is no way to override AjaxLazyLoadPanel change callback handling script. It would be useful if instead of: = add(new AbstractDefaultAjaxBehavior() { ... @Override public void renderHead(IHeaderResponse response) { super.renderHead(response); response.renderOnDomReadyJavascript(getCallbackScript().toString()); } ... } = it would be a protected method which would do the same thing: = add(new AbstractDefaultAjaxBehavior() { ... @Override public void renderHead(final IHeaderResponse response) { super.renderHead(response); handleCallbackScript(response, getCallbackScript().toString()); } ... } protected void handleCallbackScript(final IHeaderResponse response, final String callbackScript) { response.renderOnDomReadyJavascript(callbackScript); } = Should I open a JIRA issue with a patch attached? Thanks! Alex Objelean -- Pedro Henrique Oliveira dos Santos
Re: WicketSessionFilter and several domains
If you are using session cookies, the answer is simple: your browser only sends the cookie for the domain from which it was set. Simply put: if a cookie gets set from the .com, it is not available on the .com.ar Bas Fernando Wermus-2 wrote: Hi all, I have several domain for a site: .com and a .com.ar. I got to get the session in a servlet using WicketSessionFilter for .com domain, but I failed in the another case. How come? thanks in advance. -- Fernando Wermus. www.linkedin.com/in/fernandowermus -- View this message in context: http://old.nabble.com/WicketSessionFilter-and-several-domains-tp26502429p26511240.html Sent from the Wicket - User 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
Passing parameters to Wicket application
Hello, we are currently desingnig a new project. It is a complex network monitoring tool for enterprise use. WicketApp | Server purpouse of Server is that it takes data from clients, stores them in database. Data are sent every 3 seconds. Functionality we want to add is that after data are stored to database, we also want to pass them to Wicket application, which should process them and display them in various ways. My question here is: how can i solve communication Server - WicketApp. Which is the best way to pass data to the application (don't forget that data are passed every 3 seconds). Thank you for your ideas. tm - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Passing parameters to Wicket application
You could use SQL database / or other storage to store data which is readable by wicket app. Could that work? ** Martin 2009/11/25 Tomas Mihok tomas.mi...@cnl.tuke.sk: Hello, we are currently desingnig a new project. It is a complex network monitoring tool for enterprise use. WicketApp | Server purpouse of Server is that it takes data from clients, stores them in database. Data are sent every 3 seconds. Functionality we want to add is that after data are stored to database, we also want to pass them to Wicket application, which should process them and display them in various ways. My question here is: how can i solve communication Server - WicketApp. Which is the best way to pass data to the application (don't forget that data are passed every 3 seconds). Thank you for your ideas. tm - 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: onclick auto-added to script tags?
I'm using wicket:link/ blocks around javascript references as well and have never observed the behavior you describe. Do you auto-add a behavior to components which adds the onclick value? It's being added from somewhere, and is not default Wicket behavior. So it's either a browser plugin or an IBehavior added from, say, a ComponentInstantiationListener. Bas Loritsch, Berin C. wrote: I have my HTML header links for CSS and JavaScript surrounded in a wicket:link/ block so that it can resolve the context name, etc. Problem is that it causes unexpected and peculiar behavior: script type=text/javascript src=script/prototype.js/script Becomes script type=text/javascript src=script/prototype.js onclick=window.location.href='script/prototype.js';return false;/script Which is invalid markup, much less causing errors for me. How do I get rid of the onclick attribute? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/onclick-auto-added-to-%3Cscript%3E-tags--tp26504274p26511542.html Sent from the Wicket - User 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: Passing parameters to Wicket application
I just wonder if there is a better way than store to database and select from database. Something that could bypass the database. Also do you have any ideas what is the best way to implement server application? So far I thought of CGI or basic deamon app. Not really sure which is better. tm Martin Makundi wrote / napísal(a): You could use SQL database / or other storage to store data which is readable by wicket app. Could that work? ** Martin 2009/11/25 Tomas Mihok tomas.mi...@cnl.tuke.sk: Hello, we are currently desingnig a new project. It is a complex network monitoring tool for enterprise use. WicketApp | Server purpouse of Server is that it takes data from clients, stores them in database. Data are sent every 3 seconds. Functionality we want to add is that after data are stored to database, we also want to pass them to Wicket application, which should process them and display them in various ways. My question here is: how can i solve communication Server - WicketApp. Which is the best way to pass data to the application (don't forget that data are passed every 3 seconds). Thank you for your ideas. tm - 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: Passing parameters to Wicket application
I just wonder if there is a better way than store to database and select from database. Something that could bypass the database. Don't wonder too soon... it's called premature optimization. Keep it simple, build the simplest thing that could work and if necessary, keep in mind while doing it that the technical solution might change. Also do you have any ideas what is the best way to implement server application? So far I thought of CGI or basic deamon app. Not really sure which is better. You could implement server with plain java in the same servlet container as wicket even.. depend's on your requirements, really. ** Martin Martin Makundi wrote / napísal(a): You could use SQL database / or other storage to store data which is readable by wicket app. Could that work? ** Martin 2009/11/25 Tomas Mihok tomas.mi...@cnl.tuke.sk: Hello, we are currently desingnig a new project. It is a complex network monitoring tool for enterprise use. WicketApp | Server purpouse of Server is that it takes data from clients, stores them in database. Data are sent every 3 seconds. Functionality we want to add is that after data are stored to database, we also want to pass them to Wicket application, which should process them and display them in various ways. My question here is: how can i solve communication Server - WicketApp. Which is the best way to pass data to the application (don't forget that data are passed every 3 seconds). Thank you for your ideas. tm - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Update ListView using ajax
Which markup thing did you adjust to make it work? freak182 wrote: i already make it work. (need to adjust some markup thing :) ) -- View this message in context: http://old.nabble.com/Update-ListView-using-ajax-tp25310457p26514074.html Sent from the Wicket - User 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: onclick auto-added to script tags?
I'm integrated with Spring/Hibernate, could this be a side effect from the SpringInvocationHandler? I've not added anything of the sort directly (i.e. I have not created any ComponentInstantiationListeners myself). I've removed the wicket:link/ blocks for now in my header and things are working as expected. That rules out a browser plugin being at fault. -Original Message- From: bgooren [mailto:b...@iswd.nl] Sent: Wednesday, November 25, 2009 7:07 AM To: users@wicket.apache.org Subject: Re: onclick auto-added to script tags? I'm using wicket:link/ blocks around javascript references as well and have never observed the behavior you describe. Do you auto-add a behavior to components which adds the onclick value? It's being added from somewhere, and is not default Wicket behavior. So it's either a browser plugin or an IBehavior added from, say, a ComponentInstantiationListener. Bas Loritsch, Berin C. wrote: I have my HTML header links for CSS and JavaScript surrounded in a wicket:link/ block so that it can resolve the context name, etc. Problem is that it causes unexpected and peculiar behavior: script type=text/javascript src=script/prototype.js/script Becomes script type=text/javascript src=script/prototype.js onclick=window.location.href='script/prototype.js';return false;/script Which is invalid markup, much less causing errors for me. How do I get rid of the onclick attribute? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/onclick-auto-added-to-%3Cscript%3E-tags--tp2650427 4p26511542.html Sent from the Wicket - User 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Component.setLabel and label tags
Hi, In a form, I have multiple fields each one with its corresponding FormComponentLabel, with proper wicket:message content in the markup file. Now, I'm facing the fact that I need to provide the same keys I provided in wicket:message in a StringResourceModel in component's setLabel() method. Although I'm aware it's not straightforward (setLabel requires a Model, and label's body is just body markup), it would be great if there was some way to avoid this duplication telling Wicket to use the same key provided in the FormComponentLabel's body... Does anyone have a hint ? Thanks, Xavier
Component.setLabel and label tags
I forgot, A possible solution would be using a shared StringResourceModel for both the setLabel() method and providing the label tag like this: label wicket:id=labelXspan wicket:id=labelXText/span/label StringResourceModel m = new StringResourceModel(form.x.label, this, null); x.setLabel(m); FormComponentLabel labelX = new FormComponentLabel(labelX, x); form.add(labelX); Label labelXText = new Label(labelXText, m); But I'm looking for a less intrusive solution on pages already developed... Thanks, Xavier -- Forwarded message -- From: Xavier López xavil...@gmail.com Date: 2009/11/25 Subject: Component.setLabel and label tags To: users@wicket.apache.org Hi, In a form, I have multiple fields each one with its corresponding FormComponentLabel, with proper wicket:message content in the markup file. Now, I'm facing the fact that I need to provide the same keys I provided in wicket:message in a StringResourceModel in component's setLabel() method. Although I'm aware it's not straightforward (setLabel requires a Model, and label's body is just body markup), it would be great if there was some way to avoid this duplication telling Wicket to use the same key provided in the FormComponentLabel's body... Does anyone have a hint ? Thanks, Xavier -- Klein bottle for rent--inquire within.
Re: [RFE] AjaxLazyLoadPanel callback script rendering
The problem with your approach is that each onclick will trigger an ajax update... It is not exactly what I want. Still, there is absolutely no impact in making AjaxLazyLoadPanel easier to extend. My question to core dev team is: should I create a JIRA issue or you need more arguments? :) Regards, Alex Objelean Pedro H. O. dos Santos wrote: Hi Alex, don't you got the same impression than I, that it isn't an lazy load panel? Looks more like an triggered load panel. I have a few in my projects, and I using an strategy like have an page implementing IAjaxIndicatorAware, then changing panels with Component.replace method inside onSubimit or onClick implementations. On Wed, Nov 25, 2009 at 7:48 AM, Objelean Alex alex.objel...@gmail.comwrote: I have a use-case when an AjaxLazyLoadPanel needs to be loaded later then on document onready js event (triggered later by some client-side event, like click on some button). The way it is implemented right now, there is no way to override AjaxLazyLoadPanel change callback handling script. It would be useful if instead of: = add(new AbstractDefaultAjaxBehavior() { ... @Override public void renderHead(IHeaderResponse response) { super.renderHead(response); response.renderOnDomReadyJavascript(getCallbackScript().toString()); } ... } = it would be a protected method which would do the same thing: = add(new AbstractDefaultAjaxBehavior() { ... @Override public void renderHead(final IHeaderResponse response) { super.renderHead(response); handleCallbackScript(response, getCallbackScript().toString()); } ... } protected void handleCallbackScript(final IHeaderResponse response, final String callbackScript) { response.renderOnDomReadyJavascript(callbackScript); } = Should I open a JIRA issue with a patch attached? Thanks! Alex Objelean -- Pedro Henrique Oliveira dos Santos -- View this message in context: http://old.nabble.com/-RFE--AjaxLazyLoadPanel-callback-script-rendering-tp26509971p26515359.html Sent from the Wicket - User 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: Component.setLabel and label tags
Possible alternative that will work on current wicket version, since MessageContainer is an private inner class public class AdjustLabel extends AbstractBehavior { @Override public void beforeRender(Component component) { if (component instanceof FormComponent) { final FormComponent formComponent = (FormComponent)component; component.getParent().visitChildren(MarkupContainer.class, new IVisitorMarkupContainer() { public Object component(MarkupContainer component) { if (component.getId().startsWith(_message_)) { formComponent.setLabel(new ResourceModel(component .getDefaultModelObjectAsString())); return IVisitor.STOP_TRAVERSAL; } else { return null; } } }); } } } then you set: input.add(new AdjustLabel()); On Wed, Nov 25, 2009 at 1:51 PM, Xavier López xavil...@gmail.com wrote: I forgot, A possible solution would be using a shared StringResourceModel for both the setLabel() method and providing the label tag like this: label wicket:id=labelXspan wicket:id=labelXText/span/label StringResourceModel m = new StringResourceModel(form.x.label, this, null); x.setLabel(m); FormComponentLabel labelX = new FormComponentLabel(labelX, x); form.add(labelX); Label labelXText = new Label(labelXText, m); But I'm looking for a less intrusive solution on pages already developed... Thanks, Xavier -- Forwarded message -- From: Xavier López xavil...@gmail.com Date: 2009/11/25 Subject: Component.setLabel and label tags To: users@wicket.apache.org Hi, In a form, I have multiple fields each one with its corresponding FormComponentLabel, with proper wicket:message content in the markup file. Now, I'm facing the fact that I need to provide the same keys I provided in wicket:message in a StringResourceModel in component's setLabel() method. Although I'm aware it's not straightforward (setLabel requires a Model, and label's body is just body markup), it would be great if there was some way to avoid this duplication telling Wicket to use the same key provided in the FormComponentLabel's body... Does anyone have a hint ? Thanks, Xavier -- Klein bottle for rent--inquire within. -- Pedro Henrique Oliveira dos Santos
Re: Component.setLabel and label tags
ops, I just see: if you have an form with more than one form componente, that behavior will not work. So, it was just an idea :) On Wed, Nov 25, 2009 at 2:13 PM, Pedro Santos pedros...@gmail.com wrote: Possible alternative that will work on current wicket version, since MessageContainer is an private inner class public class AdjustLabel extends AbstractBehavior { @Override public void beforeRender(Component component) { if (component instanceof FormComponent) { final FormComponent formComponent = (FormComponent)component; component.getParent().visitChildren(MarkupContainer.class, new IVisitorMarkupContainer() { public Object component(MarkupContainer component) { if (component.getId().startsWith(_message_)) { formComponent.setLabel(new ResourceModel(component .getDefaultModelObjectAsString())); return IVisitor.STOP_TRAVERSAL; } else { return null; } } }); } } } then you set: input.add(new AdjustLabel()); On Wed, Nov 25, 2009 at 1:51 PM, Xavier López xavil...@gmail.com wrote: I forgot, A possible solution would be using a shared StringResourceModel for both the setLabel() method and providing the label tag like this: label wicket:id=labelXspan wicket:id=labelXText/span/label StringResourceModel m = new StringResourceModel(form.x.label, this, null); x.setLabel(m); FormComponentLabel labelX = new FormComponentLabel(labelX, x); form.add(labelX); Label labelXText = new Label(labelXText, m); But I'm looking for a less intrusive solution on pages already developed... Thanks, Xavier -- Forwarded message -- From: Xavier López xavil...@gmail.com Date: 2009/11/25 Subject: Component.setLabel and label tags To: users@wicket.apache.org Hi, In a form, I have multiple fields each one with its corresponding FormComponentLabel, with proper wicket:message content in the markup file. Now, I'm facing the fact that I need to provide the same keys I provided in wicket:message in a StringResourceModel in component's setLabel() method. Although I'm aware it's not straightforward (setLabel requires a Model, and label's body is just body markup), it would be great if there was some way to avoid this duplication telling Wicket to use the same key provided in the FormComponentLabel's body... Does anyone have a hint ? Thanks, Xavier -- Klein bottle for rent--inquire within. -- Pedro Henrique Oliveira dos Santos -- Pedro Henrique Oliveira dos Santos
Re: Component.setLabel and label tags
Thanks anyway Pedro, it's a good insight, and pretty original ;-) Didn't think of it, nor knew about visitors... Sadly, I'm on Wicket 1.3.5 and it wouldn't be working anyway, as MarkupContainer does not seem to provide ' getDefaultModelObjectAsString', apart from what you said about MessageContainer... Just out of curiosity, wouldn't it be possible to do that traversal upwards (from formComponent to Form) ? And I suppose the wicket:message tags get converted somehow to these MessageContainers (which are tried to localize in the visitor by means of _message_ in its id) Thanks, Xavier 2009/11/25 Pedro Santos pedros...@gmail.com ops, I just see: if you have an form with more than one form componente, that behavior will not work. So, it was just an idea :) On Wed, Nov 25, 2009 at 2:13 PM, Pedro Santos pedros...@gmail.com wrote: Possible alternative that will work on current wicket version, since MessageContainer is an private inner class public class AdjustLabel extends AbstractBehavior { @Override public void beforeRender(Component component) { if (component instanceof FormComponent) { final FormComponent formComponent = (FormComponent)component; component.getParent().visitChildren(MarkupContainer.class, new IVisitorMarkupContainer() { public Object component(MarkupContainer component) { if (component.getId().startsWith(_message_)) { formComponent.setLabel(new ResourceModel(component .getDefaultModelObjectAsString())); return IVisitor.STOP_TRAVERSAL; } else { return null; } } }); } } } then you set: input.add(new AdjustLabel()); On Wed, Nov 25, 2009 at 1:51 PM, Xavier López xavil...@gmail.com wrote: I forgot, A possible solution would be using a shared StringResourceModel for both the setLabel() method and providing the label tag like this: label wicket:id=labelXspan wicket:id=labelXText/span/label StringResourceModel m = new StringResourceModel(form.x.label, this, null); x.setLabel(m); FormComponentLabel labelX = new FormComponentLabel(labelX, x); form.add(labelX); Label labelXText = new Label(labelXText, m); But I'm looking for a less intrusive solution on pages already developed... Thanks, Xavier -- Forwarded message -- From: Xavier López xavil...@gmail.com Date: 2009/11/25 Subject: Component.setLabel and label tags To: users@wicket.apache.org Hi, In a form, I have multiple fields each one with its corresponding FormComponentLabel, with proper wicket:message content in the markup file. Now, I'm facing the fact that I need to provide the same keys I provided in wicket:message in a StringResourceModel in component's setLabel() method. Although I'm aware it's not straightforward (setLabel requires a Model, and label's body is just body markup), it would be great if there was some way to avoid this duplication telling Wicket to use the same key provided in the FormComponentLabel's body... Does anyone have a hint ? Thanks, Xavier -- Klein bottle for rent--inquire within. -- Pedro Henrique Oliveira dos Santos -- Pedro Henrique Oliveira dos Santos -- Klein bottle for rent--inquire within.
Re: Component.setLabel and label tags
Just out of curiosity, wouldn't it be possible to do that traversal upwards (from formComponent to Form) ? yes, component class has visitParents methos And I suppose the wicket:message tags get converted somehow to these MessageContainers yep, wicket has an component resolver that do it based on the tag On Wed, Nov 25, 2009 at 2:29 PM, Xavier López xavil...@gmail.com wrote: Thanks anyway Pedro, it's a good insight, and pretty original ;-) Didn't think of it, nor knew about visitors... Sadly, I'm on Wicket 1.3.5 and it wouldn't be working anyway, as MarkupContainer does not seem to provide ' getDefaultModelObjectAsString', apart from what you said about MessageContainer... Just out of curiosity, wouldn't it be possible to do that traversal upwards (from formComponent to Form) ? And I suppose the wicket:message tags get converted somehow to these MessageContainers (which are tried to localize in the visitor by means of _message_ in its id) Thanks, Xavier 2009/11/25 Pedro Santos pedros...@gmail.com ops, I just see: if you have an form with more than one form componente, that behavior will not work. So, it was just an idea :) On Wed, Nov 25, 2009 at 2:13 PM, Pedro Santos pedros...@gmail.com wrote: Possible alternative that will work on current wicket version, since MessageContainer is an private inner class public class AdjustLabel extends AbstractBehavior { @Override public void beforeRender(Component component) { if (component instanceof FormComponent) { final FormComponent formComponent = (FormComponent)component; component.getParent().visitChildren(MarkupContainer.class, new IVisitorMarkupContainer() { public Object component(MarkupContainer component) { if (component.getId().startsWith(_message_)) { formComponent.setLabel(new ResourceModel(component .getDefaultModelObjectAsString())); return IVisitor.STOP_TRAVERSAL; } else { return null; } } }); } } } then you set: input.add(new AdjustLabel()); On Wed, Nov 25, 2009 at 1:51 PM, Xavier López xavil...@gmail.com wrote: I forgot, A possible solution would be using a shared StringResourceModel for both the setLabel() method and providing the label tag like this: label wicket:id=labelXspan wicket:id=labelXText/span/label StringResourceModel m = new StringResourceModel(form.x.label, this, null); x.setLabel(m); FormComponentLabel labelX = new FormComponentLabel(labelX, x); form.add(labelX); Label labelXText = new Label(labelXText, m); But I'm looking for a less intrusive solution on pages already developed... Thanks, Xavier -- Forwarded message -- From: Xavier López xavil...@gmail.com Date: 2009/11/25 Subject: Component.setLabel and label tags To: users@wicket.apache.org Hi, In a form, I have multiple fields each one with its corresponding FormComponentLabel, with proper wicket:message content in the markup file. Now, I'm facing the fact that I need to provide the same keys I provided in wicket:message in a StringResourceModel in component's setLabel() method. Although I'm aware it's not straightforward (setLabel requires a Model, and label's body is just body markup), it would be great if there was some way to avoid this duplication telling Wicket to use the same key provided in the FormComponentLabel's body... Does anyone have a hint ? Thanks, Xavier -- Klein bottle for rent--inquire within. -- Pedro Henrique Oliveira dos Santos -- Pedro Henrique Oliveira dos Santos -- Klein bottle for rent--inquire within. -- Pedro Henrique Oliveira dos Santos
Re: wicket on Weblogic 10.3.1
Dear All, Thanks for the help so far; one of my problem was indeed a misconfig in the dns (hosts file), funny that tomcat worked that way. The next problem was -solved now- that the ajax requests did not work at all, because weblogic is always adding index.jsp into the ajax urls, so they will look like /contextpath/index.jsp?wicket:interface=... instead of the correct /cb/?wicket:interface=:. This happens because the wicket filter is mounted on /* and there is no welcome-file-list in the web.xml. The fix is to add this to web.xml: welcome-file-list welcome-file//welcome-file /welcome-file-list Now, my problem is that the ajax calls always respond with page-expired exception. Any hints on that? Thanks, Zoltan Edward Zarecor wrote: When you start up what ports and addresses does Weblogic say it's listening on: grep for is now listening I'd recommend capturing the headers with live headers or something similar and seeing what differs between access via localhost and 127.0.0.1. That those differ suggests a DNS/hosts issue to me. Ed. On Tue, Nov 24, 2009 at 9:06 AM, zoltan luspai zlus...@gmail.com wrote: I'm going directly to weblogic, which is running locally all configured to default, it is all on the same host, no apache and no proxies in between. Z Edward Zarecor wrote: Are you using Apache with the Weblogic plugin? If so, do you see the same behavior if you go directly against Weblogic? Can you confirm that subsequent requests are actually being handled by the app server? I ask because we've seen cases where URL mangling caused requests that should have mapped to our wicket app not being properly proxied by the Weblogic plugin. The result was an Apache error as it couldn't handle the request itself and wasn't forwarding it. Ed. On Tue, Nov 24, 2009 at 4:11 AM, zoltan luspai zlus...@gmail.com wrote: Hi All, Anybody has experience with wicket running on Weblogic 10.3.1? Any hints about? I'm having some problem with that wicket pages does not seem to handle page events properly, for example the first render of the page is fine, but if I click on a button that does not seem to go to the next page. Sorry for being foggy here; the thing is being investigated now... Thanks, Zoltan - 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 - 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
WWB and Wizard
Hi guys, I'm using Wicket Web Beans (WWB) and trying to create a wizard from it. I wonder if it's possible to use WWB's action buttons as wizard buttons (Prev, Next, etc)? Or calling WWB's validation from Wicket's Wizard, because I found that Wicket's Wizard doesn't trigger WWB's validation. Many thanks in advance. Warm Regards, Mike
Re: WicketSessionFilter and several domains
Bas, What I actually did was to login in .com and test the servlet I mentioned you. Then I logged out and logged in the site using .com.ar again. This second time failed. In this case, it seems that I am using different cookies and it shouldn't to affect if I get the session. To be more specific, I have some embeded flex clients which connects to Blazeds. I need to get wicket session to know who has logged in using wicket front end. Each flex client has been compiled using a specific url from the site. The servlet that is in charge is messageBroker that delegates to a class of my own the service called.There it is where I couldnt get the session when the user logged in to a specific domain. Thanks in advance. On Wed, Nov 25, 2009 at 9:36 AM, bgooren b...@iswd.nl wrote: If you are using session cookies, the answer is simple: your browser only sends the cookie for the domain from which it was set. Simply put: if a cookie gets set from the .com, it is not available on the .com.ar Bas Fernando Wermus-2 wrote: Hi all, I have several domain for a site: .com and a .com.ar. I got to get the session in a servlet using WicketSessionFilter for .com domain, but I failed in the another case. How come? thanks in advance. -- Fernando Wermus. www.linkedin.com/in/fernandowermus -- View this message in context: http://old.nabble.com/WicketSessionFilter-and-several-domains-tp26502429p26511240.html Sent from the Wicket - User 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 -- Fernando Wermus. www.linkedin.com/in/fernandowermus
Mail Error Sending Message to Wicket Forum From Google Account
All - I'm trying to post to the Wicket Users forum from my Google mail account, but cannot. I got several error messages over time, and then this one saying that it had failed permanently. Is this a known issue? Is it all Gmail accounts, or just mine? Thanks, Keith Delivery to the following recipient failed permanently: us...@apache.wicket.org Technical details of permanent failure: The recipient server did not accept our requests to connect. Learn more at http://mail.google.com/support/bin/answer.py?answer=7720 [apache.wicket.org (1): Connection refused] - Original message - The Google info page said: Google Help Gmail Help Your Messages 'The recipient server did not accept our requests...' 'The recipient server did not accept our requests...' This error message indicates that we've attempted to make a connection with your recipient's server but didn't receive a reply. Some possible causes include the following: * The other domain doesn't have up-to-date MX records or is otherwise misconfigured. * The other domain is blacklisting or graylisting messages from Gmail. * The other domain is experiencing temporary networking problems. We recommend contacting the customer service department of the recipient's domain for further instructions. If you receive this bounce message when sending to your Google Apps domain, please see our instructions for configuring your MX records.
SessionListeners and Wicket?
I have a requirement to have a queue of items that need work with a pool of people working on them. I need to lock the record while someone is working on it. Once the item is processed it will be removed permanently from the list. Occasionally users open an item and then close it. That part I've got taken care of. I also have the part taken care of where a user manually logs out and the system releases any locks the user has. However, that doesn't catch the problem where users sessions time out. My best guess is that I need to add a SessionListener to the web.xml to handle this corner case. So I have two questions: * Can I use the IMSSession.get() from my SessionListener and get the one for the running application? * Is there a more elegant Wicket way of doing the same thing? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Mail Error Sending Message to Wicket Forum From Google Account
I can post here from gmail. On Wed, Nov 25, 2009 at 8:35 PM, Bennett, Keith kbennet...@fedcsc.comwrote: All - I'm trying to post to the Wicket Users forum from my Google mail account, but cannot. I got several error messages over time, and then this one saying that it had failed permanently. Is this a known issue? Is it all Gmail accounts, or just mine? Thanks, Keith Delivery to the following recipient failed permanently: us...@apache.wicket.org Technical details of permanent failure: The recipient server did not accept our requests to connect. Learn more at http://mail.google.com/support/bin/answer.py?answer=7720 [apache.wicket.org (1): Connection refused] - Original message - The Google info page said: Google Help Gmail Help Your Messages 'The recipient server did not accept our requests...' 'The recipient server did not accept our requests...' This error message indicates that we've attempted to make a connection with your recipient's server but didn't receive a reply. Some possible causes include the following: * The other domain doesn't have up-to-date MX records or is otherwise misconfigured. * The other domain is blacklisting or graylisting messages from Gmail. * The other domain is experiencing temporary networking problems. We recommend contacting the customer service department of the recipient's domain for further instructions. If you receive this bounce message when sending to your Google Apps domain, please see our instructions for configuring your MX records. -- Rien de grand ne s'est accompli dans le monde sans passion. (G.W.F. Hegel, philosophe allemand)
Re: SessionListeners and Wicket?
I've done something similar. Using the SessionListener seems to be the only one way to do the trick (only here you can access the session which is still valid). And of course you can access your wicket strongly type session from SessionListener: MySession.get().getUser(). Alex Objelean Loritsch, Berin C. wrote: I have a requirement to have a queue of items that need work with a pool of people working on them. I need to lock the record while someone is working on it. Once the item is processed it will be removed permanently from the list. Occasionally users open an item and then close it. That part I've got taken care of. I also have the part taken care of where a user manually logs out and the system releases any locks the user has. However, that doesn't catch the problem where users sessions time out. My best guess is that I need to add a SessionListener to the web.xml to handle this corner case. So I have two questions: * Can I use the IMSSession.get() from my SessionListener and get the one for the running application? * Is there a more elegant Wicket way of doing the same thing? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/SessionListeners-and-Wicket--tp26519900p26520248.html Sent from the Wicket - User 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 tester test coverage
Without reference to his article, I can only guess that it may be pointless to test the position or the color of a button in automated tests. I think it was this one : http://www.infoq.com/news/2009/11/uncle-bob-tdd-applicability but in fact uncle bob mainly says it's pointless to do TDD when not knowing where it'll end, but still one should then write the tests afterwards. On the other hand, functionality of GUI can definitely be tested. For example, I am writing a Wicket application with TDD (sort of) with the library shown in my signature. It is working very well. I saw it, but we're using guice (when, it wouldn't be a show stopper in the end). Still, on the technical side, there's also this issue with selenium using mostly id, whereas wicket'ids change with each request... How do you solve this issue ? on a broader picture, my main question was about the way you proceed, Do you test every page, including every validator or.. ? If doing so, for pages that quite often are then not touched much, i would fear the time needed for proper testing quite hard to justify. Am i wrong here ? bye zedros - -- Kent Tong Better way to unit test Wicket pages (http://wicketpagetest.sourceforge.net) -- View this message in context: http://old.nabble.com/Wicket-tester-test-coverage-tp26505428p26509652.html Sent from the Wicket - User 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Timeout with Ajax requests
Hi all, I'm trying to implement a timeout mechanism that redirects to some page after a given period of inactivity. I know that this is a common problem and the mechanism (using AbstractAjaxTimerBehavior to decrement a timer in the session) in this blog post sort of works: http://javathoughts.capesugarbird.com/2007/08/user-configurable-timeout-for-your.html But, as the author says, it doesn't work for Ajax requests. He suggests that all Ajax requests call some timer reset method somewhere. Our app is heavily Ajaxy, and I really don't want to copy paste even one line call into every different ajax behavior, link, button etc. It's also important that the timer be reset for every Ajax call as we have some large pages that the user may spend some time filling out, but would be relatively talkative with Ajax requests. Using a common superclass is impossible as there are too many different classes and interfaces that Ajax requests can be generated from. I came up with this idea of using the onRequestTargetSet in a custom RequestCycle. It seems that this gets called for Ajax and non Ajax requests. The problem is that it also gets called for the Timer requests. I worked around this by checking if the target is a BehaviorRequestTarget and if the selected behavior is an instance of AbstractAjaxTimerBehavior. To do this, I had to copy a bit of code out of BehaviorRequestTarget (the bit that looks up the requested behavior). Also, I ignored AjaxRequestTargets as it seems that after invoking an ajax listener target, one of these is set as the request target, but this is not a user initiated request target (for example, a single timer tick generates two onRequestTargetSets, one with the TimerBehavior, the other with just an AjaxRequestTarget). This solution seems to be working so far. I was wondering if anybody else has found a better way to do this or could tell me if there's some problem I'm overlooking with my solution? Thanks, Neil
PropertyModels *without* strings
http://wicketinaction.com/2009/11/removing-fragile-string-expressions-from-wicket-code/ -igor - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Mail Error Sending Message to Wicket Forum From Google Account
Doh I thought I was subscribed from the GMail address but was not! The thing that threw me off was I would have thought that I would have gotten an immediate and clear message stating that I wasn't authorized to send a message to that list. Instead, the message appeared to indicate a connectivity or server issue. Google's help threw me off a bit too. Sorry to bother you all... - Keith -- View this message in context: http://old.nabble.com/Mail-Error-Sending-Message-to-Wicket-Forum-From-Google-Account-tp26518963p26521021.html Sent from the Wicket - User 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
how to override wicket DataTable.html
Hi, I want to add a css class to the tbody that is part of DataTable.html that looks like: wicket:panel thead wicket:id=topToolbars wicket:container wicket:id=toolbar/wicket:container /thead tfoot wicket:id=bottomToolbars wicket:container wicket:id=toolbar/wicket:container /tfoot tbody tr wicket:id=rows td wicket:id=cells span wicket:id=cell[cell]/span /td /tr /tbody /wicket:panel where none exists already? What is the easiest way to do this w/o modifying core wicket code that I would have to maintain? Thanks, Jason - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Mail Error Sending Message to Wicket Forum From Google Account
as can i -Rob On Wed, Nov 25, 2009 at 5:01 PM, keithrbennett keithrbenn...@gmail.comwrote: Doh I thought I was subscribed from the GMail address but was not! The thing that threw me off was I would have thought that I would have gotten an immediate and clear message stating that I wasn't authorized to send a message to that list. Instead, the message appeared to indicate a connectivity or server issue. Google's help threw me off a bit too. Sorry to bother you all... - Keith -- View this message in context: http://old.nabble.com/Mail-Error-Sending-Message-to-Wicket-Forum-From-Google-Account-tp26518963p26521021.html Sent from the Wicket - User 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: how to override wicket DataTable.html
Well, if you really want to override the HTML, just make a copy of the HTML file in your own source code, in the correct org.apache.wicket.** package. That will come first on the classpath and override the provided one. But I'd suggest just using a different CSS selector (like .yourTableClass tbody) to accomplish what you need. There's no real need to put a class directly on the tbody when it is so easily addressable. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Nov 25, 2009 at 4:23 PM, Jason Novotny jason.novo...@gmail.comwrote: Hi, I want to add a css class to the tbody that is part of DataTable.html that looks like: wicket:panel thead wicket:id=topToolbars wicket:container wicket:id=toolbar/wicket:container /thead tfoot wicket:id=bottomToolbars wicket:container wicket:id=toolbar/wicket:container /tfoot tbody tr wicket:id=rows td wicket:id=cells span wicket:id=cell[cell]/span /td /tr /tbody /wicket:panel where none exists already? What is the easiest way to do this w/o modifying core wicket code that I would have to maintain? Thanks, Jason - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: PropertyModels *without* strings
Is refactoring available for bindgen? -Ursprüngliche Nachricht- Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Gesendet: Mittwoch, 25. November 2009 22:56 An: users@wicket.apache.org; d...@wicket.apache.org Betreff: PropertyModels *without* strings http://wicketinaction.com/2009/11/removing-fragile-string-expressions-from-wicket-code/ -igor - 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: PropertyModels *without* strings
as far as i have read, the binding methods aren't automatically refactored (eg. renamed), but you get compiler errors in the code where you use the old names. so it should be fairly easy to fix your own code (in contrast to some strings) On Thu, Nov 26, 2009 at 8:04 AM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: Is refactoring available for bindgen? -Ursprüngliche Nachricht- Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Gesendet: Mittwoch, 25. November 2009 22:56 An: users@wicket.apache.org; d...@wicket.apache.org Betreff: PropertyModels *without* strings http://wicketinaction.com/2009/11/removing-fragile-string-expressions-from-wicket-code/ -igor - 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: PropertyModels *without* strings
If refactoring is not supported it is just easier to use string constants, which do not break. ** Martin 2009/11/26 Gerolf Seitz gerolf.se...@gmail.com: as far as i have read, the binding methods aren't automatically refactored (eg. renamed), but you get compiler errors in the code where you use the old names. so it should be fairly easy to fix your own code (in contrast to some strings) On Thu, Nov 26, 2009 at 8:04 AM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: Is refactoring available for bindgen? -Ursprüngliche Nachricht- Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Gesendet: Mittwoch, 25. November 2009 22:56 An: users@wicket.apache.org; d...@wicket.apache.org Betreff: PropertyModels *without* strings http://wicketinaction.com/2009/11/removing-fragile-string-expressions-from-wicket-code/ -igor - 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
AW: PropertyModels *without* strings
Ok thanks. -Ursprüngliche Nachricht- Von: Gerolf Seitz [mailto:gerolf.se...@gmail.com] Gesendet: Donnerstag, 26. November 2009 08:19 An: users@wicket.apache.org Betreff: Re: PropertyModels *without* strings as far as i have read, the binding methods aren't automatically refactored (eg. renamed), but you get compiler errors in the code where you use the old names. so it should be fairly easy to fix your own code (in contrast to some strings) On Thu, Nov 26, 2009 at 8:04 AM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: Is refactoring available for bindgen? -Ursprüngliche Nachricht- Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Gesendet: Mittwoch, 25. November 2009 22:56 An: users@wicket.apache.org; d...@wicket.apache.org Betreff: PropertyModels *without* strings http://wicketinaction.com/2009/11/removing-fragile-string-expressions-from-wicket-code/ -igor - 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
BookmarkablePageLink with https
Hello, How is it possible to generate BookmarkablePageLink with secured protocol https? Thank you
Re: PropertyModels *without* strings
the whole point is that strings brake, whether they are constants or not. eg add(new Label(parentName, new PropertyModel(person, parent.name))); suppose you rename Person.getName() to Person.getFullName(). now you have to find all places in your code where you have referenced name as part of a string property expression and change it to fullName. if you miss somewhere you wont know until runtime. in my projects a lot of objects have a name field, so the process of identifying all the places that need to be updated involves sifting through a bunch of strings and figuring out if what is before the .name is of type Person. tedious and error-prone. although bindgen does not support refactoring, as soon as the change is made all the places that need to be updated will be reported by the compiler. that is an *enormous* improvement in non-trivial applications. another big advantage is that bindings carry type information, eg: add(new TextFieldInteger(age, new PropertyModel(person, age))); there is no way to verify that age expression is of type Integer and not a value object or a string, but bindgen bindings are typesafe and a non-Integer binding would cause a compilation error. i am actually somewhat shocked that someone can look at this and not see the value. this fills in a huge gap in java until methods and fields become first-class citizens. but, maybe im just weird. -igor On Wed, Nov 25, 2009 at 11:28 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: If refactoring is not supported it is just easier to use string constants, which do not break. ** Martin 2009/11/26 Gerolf Seitz gerolf.se...@gmail.com: as far as i have read, the binding methods aren't automatically refactored (eg. renamed), but you get compiler errors in the code where you use the old names. so it should be fairly easy to fix your own code (in contrast to some strings) On Thu, Nov 26, 2009 at 8:04 AM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: Is refactoring available for bindgen? -Ursprüngliche Nachricht- Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Gesendet: Mittwoch, 25. November 2009 22:56 An: users@wicket.apache.org; d...@wicket.apache.org Betreff: PropertyModels *without* strings http://wicketinaction.com/2009/11/removing-fragile-string-expressions-from-wicket-code/ -igor - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: PropertyModels *without* strings
You're right, it's an improvment. And will use it. I just wanted to know is refactoring is supported. Anyway it's a nice thing. Thanks for that :) Greets -Ursprüngliche Nachricht- Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Gesendet: Donnerstag, 26. November 2009 08:44 An: users@wicket.apache.org Betreff: Re: PropertyModels *without* strings the whole point is that strings brake, whether they are constants or not. eg add(new Label(parentName, new PropertyModel(person, parent.name))); suppose you rename Person.getName() to Person.getFullName(). now you have to find all places in your code where you have referenced name as part of a string property expression and change it to fullName. if you miss somewhere you wont know until runtime. in my projects a lot of objects have a name field, so the process of identifying all the places that need to be updated involves sifting through a bunch of strings and figuring out if what is before the .name is of type Person. tedious and error-prone. although bindgen does not support refactoring, as soon as the change is made all the places that need to be updated will be reported by the compiler. that is an *enormous* improvement in non-trivial applications. another big advantage is that bindings carry type information, eg: add(new TextFieldInteger(age, new PropertyModel(person, age))); there is no way to verify that age expression is of type Integer and not a value object or a string, but bindgen bindings are typesafe and a non-Integer binding would cause a compilation error. i am actually somewhat shocked that someone can look at this and not see the value. this fills in a huge gap in java until methods and fields become first-class citizens. but, maybe im just weird. -igor On Wed, Nov 25, 2009 at 11:28 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: If refactoring is not supported it is just easier to use string constants, which do not break. ** Martin 2009/11/26 Gerolf Seitz gerolf.se...@gmail.com: as far as i have read, the binding methods aren't automatically refactored (eg. renamed), but you get compiler errors in the code where you use the old names. so it should be fairly easy to fix your own code (in contrast to some strings) On Thu, Nov 26, 2009 at 8:04 AM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: Is refactoring available for bindgen? -Ursprüngliche Nachricht- Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Gesendet: Mittwoch, 25. November 2009 22:56 An: users@wicket.apache.org; d...@wicket.apache.org Betreff: PropertyModels *without* strings http://wicketinaction.com/2009/11/removing-fragile-string-expressions-from-wicket-code/ -igor - 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 - 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: PropertyModels *without* strings
On Thu, Nov 26, 2009 at 8:43 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote: i am actually somewhat shocked that someone can look at this and not see the value. this fills in a huge gap in java until methods and fields become first-class citizens. but, maybe im just weird. i was like this close to enhancing lombok to automatically create at least java.reflect.Field/Method references and constants for property names. but the bindgen(-wicket) solution is way better. thanks for that :) -igor On Wed, Nov 25, 2009 at 11:28 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: If refactoring is not supported it is just easier to use string constants, which do not break. ** Martin 2009/11/26 Gerolf Seitz gerolf.se...@gmail.com: as far as i have read, the binding methods aren't automatically refactored (eg. renamed), but you get compiler errors in the code where you use the old names. so it should be fairly easy to fix your own code (in contrast to some strings) On Thu, Nov 26, 2009 at 8:04 AM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: Is refactoring available for bindgen? -Ursprüngliche Nachricht- Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Gesendet: Mittwoch, 25. November 2009 22:56 An: users@wicket.apache.org; d...@wicket.apache.org Betreff: PropertyModels *without* strings http://wicketinaction.com/2009/11/removing-fragile-string-expressions-from-wicket-code/ -igor - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: PropertyModels *without* strings
suppose you rename Person.getName() to Person.getFullName(). now you have to find all places in your code where you have referenced name as part of a string property expression and change it to fullName. If you have a constant PERSON.NAME all you need to do is refactor the constant and change the constant value. Instead of going through hundreds of broken lines of code, which is a mess even just in principle. I would say that refactoring calls for improvement in the bindgen approach. Is it theoretically possible to facilitate refactoring with bindgen? Is it practically possible to facilitate refactoring with bindgen? add(new TextFieldInteger(age, new PropertyModel(person, age))); there is no way to verify that age expression is of type Integer and not a value object or a string, but bindgen bindings are typesafe and a non-Integer binding would cause a compilation error. This is a great big plus. i am actually somewhat shocked that someone can look at this and not see the value. this fills in a huge gap in java until methods and fields become first-class citizens. but, maybe im just weird. I'm just saying that it should be made even better. ** Martin On Wed, Nov 25, 2009 at 11:28 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: If refactoring is not supported it is just easier to use string constants, which do not break. ** Martin 2009/11/26 Gerolf Seitz gerolf.se...@gmail.com: as far as i have read, the binding methods aren't automatically refactored (eg. renamed), but you get compiler errors in the code where you use the old names. so it should be fairly easy to fix your own code (in contrast to some strings) On Thu, Nov 26, 2009 at 8:04 AM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: Is refactoring available for bindgen? -Ursprüngliche Nachricht- Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Gesendet: Mittwoch, 25. November 2009 22:56 An: users@wicket.apache.org; d...@wicket.apache.org Betreff: PropertyModels *without* strings http://wicketinaction.com/2009/11/removing-fragile-string-expressions-from-wicket-code/ -igor - 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 - 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