Re: Wicket tester test coverage

2009-11-25 Thread Pierre Goupil
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

Re: Wicket tester test coverage

2009-11-25 Thread ZedroS Schwart
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

Re: Wicket tester test coverage

2009-11-25 Thread Jeremy Thomerson
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

Re: Wicket tester test coverage

2009-11-25 Thread Daan van Etten
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:

Re: Wicket tester test coverage

2009-11-25 Thread Martijn Dashorst
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

Re: Wicket tester test coverage

2009-11-25 Thread Kent Tong
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

Re: Wicket tester test coverage

2009-11-25 Thread Daan van Etten
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

Re: Wicket tester test coverage

2009-11-25 Thread Pierre Goupil
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)

Re: Wicket tester test coverage

2009-11-25 Thread Kent Tong
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

Re: Wicket tester test coverage

2009-11-25 Thread Pierre Goupil
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:

Re: Wicket tester test coverage

2009-11-25 Thread Pierre Goupil
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

Re: Wicket tester test coverage

2009-11-25 Thread Daan van Etten
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

[RFE] AjaxLazyLoadPanel callback script rendering

2009-11-25 Thread Objelean Alex
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

Re: Wicket tester test coverage

2009-11-25 Thread Pierre Goupil
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

Re: [RFE] AjaxLazyLoadPanel callback script rendering

2009-11-25 Thread Pedro Santos
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

Re: WicketSessionFilter and several domains

2009-11-25 Thread bgooren
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:

Passing parameters to Wicket application

2009-11-25 Thread Tomas Mihok
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

Re: Passing parameters to Wicket application

2009-11-25 Thread Martin Makundi
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    

Re: onclick auto-added to script tags?

2009-11-25 Thread bgooren
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

Re: Passing parameters to Wicket application

2009-11-25 Thread Tomas Mihok
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

Re: Passing parameters to Wicket application

2009-11-25 Thread Martin Makundi
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

Re: Update ListView using ajax

2009-11-25 Thread Roger Armstrong
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

RE: onclick auto-added to script tags?

2009-11-25 Thread Loritsch, Berin C.
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

Component.setLabel and label tags

2009-11-25 Thread Xavier López
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.

Component.setLabel and label tags

2009-11-25 Thread Xavier López
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);

Re: [RFE] AjaxLazyLoadPanel callback script rendering

2009-11-25 Thread Alex Objelean
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? :)

Re: Component.setLabel and label tags

2009-11-25 Thread Pedro Santos
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

Re: Component.setLabel and label tags

2009-11-25 Thread Pedro Santos
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

Re: Component.setLabel and label tags

2009-11-25 Thread Xavier López
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

Re: Component.setLabel and label tags

2009-11-25 Thread Pedro Santos
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

Re: wicket on Weblogic 10.3.1

2009-11-25 Thread zoltan luspai
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

WWB and Wizard

2009-11-25 Thread Gw
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.

Re: WicketSessionFilter and several domains

2009-11-25 Thread Fernando Wermus
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

Mail Error Sending Message to Wicket Forum From Google Account

2009-11-25 Thread Bennett, Keith
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

SessionListeners and Wicket?

2009-11-25 Thread Loritsch, Berin C.
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

Re: Mail Error Sending Message to Wicket Forum From Google Account

2009-11-25 Thread Pierre Goupil
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

Re: SessionListeners and Wicket?

2009-11-25 Thread Alex Objelean
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

Re: Wicket tester test coverage

2009-11-25 Thread ZedroS Schwart
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

Timeout with Ajax requests

2009-11-25 Thread Neil Curzon
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:

PropertyModels *without* strings

2009-11-25 Thread Igor Vaynberg
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

2009-11-25 Thread keithrbennett
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

how to override wicket DataTable.html

2009-11-25 Thread Jason Novotny
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

Re: Mail Error Sending Message to Wicket Forum From Google Account

2009-11-25 Thread Robert O'Connor
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

Re: how to override wicket DataTable.html

2009-11-25 Thread Jeremy Thomerson
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

AW: PropertyModels *without* strings

2009-11-25 Thread Giambalvo, Christian
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

Re: PropertyModels *without* strings

2009-11-25 Thread Gerolf Seitz
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

Re: PropertyModels *without* strings

2009-11-25 Thread Martin Makundi
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

AW: PropertyModels *without* strings

2009-11-25 Thread Giambalvo, Christian
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.

BookmarkablePageLink with https

2009-11-25 Thread Gatos
Hello, How is it possible to generate BookmarkablePageLink with secured protocol https? Thank you

Re: PropertyModels *without* strings

2009-11-25 Thread Igor Vaynberg
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

AW: PropertyModels *without* strings

2009-11-25 Thread Giambalvo, Christian
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:

Re: PropertyModels *without* strings

2009-11-25 Thread Gerolf Seitz
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

Re: PropertyModels *without* strings

2009-11-25 Thread Martin Makundi
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