How to add JUnit Tests in default tapestry pom?

2012-06-08 Thread Fuhrmann, Hauke
Hi there, I'm quite new to Maven and don't know how to add my standard JUnit Tests to my Tapestry project. I added a standalone test (i.e. a test that does not test any tapestry stuff) to the src/test/java/package.../FooTest.java I also added the dependency to junit 4 to my pom. There

Re: How to add JUnit Tests in default tapestry pom?

2012-06-08 Thread nquirynen
Normally that's all you have to do. Are you sure you used @Test annotation on your test method? -- View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-add-JUnit-Tests-in-default-tapestry-pom-tp5713713p5713714.html Sent from the Tapestry - User mailing list archive at Nabbl

Re: Popup a pdf or word document

2012-06-08 Thread Lance Java
The following TML will not be transformed by tapestry (replace "[]" with "<>") [param name="src" value="context:test.pdf" /] I *think* you want to do the following: [param name="src" value="${context:test.pdf}" /] See also: http://wiki.apache.org/tapestry/Tapestry5HowToCreateADynamicPDF http://ta

Re: Clear clientside validation from tapestrys memory.

2012-06-08 Thread George Christman
Resolved, Manu suggested creating a new required validator leaving out the render method. This worked perfectly. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Clear-clientside-validation-from-tapestrys-memory-tp5713644p5713718.html Sent from the Tapestry - User mailing l

Zone Refresh with dynamic context

2012-06-08 Thread tomandjerry
I would like to keep the lastUpdated time in the browser so that new events can be propagated to the browser. For this I am using a Zone with zonerefresh mixin where I am trying to dynamically change the context passed to the ZoneRefresh mixin. The below approach does not work. I appreciate if any

Re: Zone Refresh with dynamic context

2012-06-08 Thread Thiago H de Paula Figueiredo
Instead of using context, use a request parameter instead, so you avoid having to deal with changing the URL Tapestry generated. In addition, I don't think you will be able to use the ZoneRefresh mixin, so you'll need a little bit of custom JavaScript, most probably adapted from ZoneRefresh

Re: Zone Refresh with dynamic context

2012-06-08 Thread Lance Java
Firstly, Tapestry.Initializer.zoneRefresh requires an "id" to be present in the json object. Secondly, each time "zoneRefresh" is called, a PeriodicalExecuter is created so you are likely creating more and more of these every time your zone is refreshed until you run out of memory. I think you ar

Re: overriding a service implementation...

2012-06-08 Thread Howard Lewis Ship
public class MyModule { public static TroubleMaker decorateTroubleMaker(TroubleMaker defaultImpl) { return new MyTroubleMakerImpl(...); } } The convention is that decorateFoo decorates service id "Foo". There's other options, based on annotations, to decorate a wider swath of services (th

Re: Zone Refresh with dynamic context

2012-06-08 Thread Taha Siddiqi
I use my own implementation for Periodic display which displays a block till you return null from the event handler . It is for tapestry-jquery, so you will have to change the js from jquery to prototype. (I am not sure it will help because of the size of the code :). May be I will write a po

FindBugs and the @Inject annotation on global fields

2012-06-08 Thread Ray Nicholus
Is anyone using FindBugs in a T5 project? If so, have you managed to find a way to suppress the NPE warnings when dereferencing an injected field? This doesn't appear to be possible, which makes FB useless in a T5 app, for the most part. It's not clear that any other static analysis tools provid

Re: Injecting Session into DAO

2012-06-08 Thread Lance Java
This conversation sounds like the "Anemic Domain Model vs. Rich Domain Model" argument where an ADM only contains data and a RDM contains data and services. I have always used an ADM and like Thiago, I sometimes add functions that do not require a database connection. I have never really understood

Re: FindBugs and the @Inject annotation on global fields

2012-06-08 Thread Martin Strand
I use constructor injection for all services, so Findbugs works as expected there. But I've had to disable Findbugs for page/component classes since there is so much magic going on there. On Fri, 08 Jun 2012 17:32:20 +0200, Ray Nicholus wrote: Is anyone using FindBugs in a T5 project? If so

Re: FindBugs and the @Inject annotation on global fields

2012-06-08 Thread Lance Java
Not really a tapestry question but I'm in a good mood ;) The findbugs maven plugin accepts an "excludeFilterFile" configuration parameter. This file can contain rules that you wish to exclude from the findbugs report. http://mojo.codehaus.org/findbugs-maven-plugin/usage.html http://findbugs.sourc

Re: FindBugs and the @Inject annotation on global fields

2012-06-08 Thread Richard Frovarp
On 06/08/2012 10:32 AM, Ray Nicholus wrote: Is anyone using FindBugs in a T5 project? If so, have you managed to find a way to suppress the NPE warnings when dereferencing an injected field? This doesn't appear to be possible, which makes FB useless in a T5 app, for the most part. It's not cl

Re: Injecting Session into DAO

2012-06-08 Thread Thiago H de Paula Figueiredo
On Fri, 08 Jun 2012 12:47:43 -0300, Lance Java wrote: This conversation sounds like the "Anemic Domain Model vs. Rich Domain Model" argument where an ADM only contains data and a RDM contains data and services. Hey, I don't use ADM! I explicitly said it sucks! ;) I have always used an

Re: FindBugs and the @Inject annotation on global fields

2012-06-08 Thread Thiago H de Paula Figueiredo
On Fri, 08 Jun 2012 13:20:24 -0300, Richard Frovarp wrote: Which version of FindBugs are you using? I'm using FindBugs 1.x via Sonar / Maven and I don't have any of those warnings being thrown. I've had to get rid of a few of the rules regarding Unread field and Unused field as @Property

Re: FindBugs and the @Inject annotation on global fields

2012-06-08 Thread Thiago H de Paula Figueiredo
What's a global field? As far as I know, Java has no such thing, just fields. On Fri, 08 Jun 2012 12:32:20 -0300, Ray Nicholus wrote: Is anyone using FindBugs in a T5 project? If so, have you managed to find a way to suppress the NPE warnings when dereferencing an injected field? Fr

Re: FindBugs and the @Inject annotation on global fields

2012-06-08 Thread Richard Frovarp
On 06/08/2012 11:39 AM, Thiago H de Paula Figueiredo wrote: On Fri, 08 Jun 2012 13:20:24 -0300, Richard Frovarp wrote: Which version of FindBugs are you using? I'm using FindBugs 1.x via Sonar / Maven and I don't have any of those warnings being thrown. I've had to get rid of a few of the rule

Re: FindBugs and the @Inject annotation on global fields

2012-06-08 Thread Thiago H de Paula Figueiredo
On Fri, 08 Jun 2012 14:23:16 -0300, Richard Frovarp wrote: It can't. @SuppressWarnings has a RentionPolicy of SOURCE, so doesn't survive past the compiler. Thanks for the information. I haven't noticed it yet. -- Thiago H. de Paula Figueiredo -

Re: FindBugs and the @Inject annotation on global fields

2012-06-08 Thread Ray Nicholus
The filter files do not allow you to filter by annotation. On Fri, Jun 8, 2012 at 11:11 AM, Lance Java wrote: > Not really a tapestry question but I'm in a good mood ;) > > The findbugs maven plugin accepts an "excludeFilterFile" configuration > parameter. This file can contain rules that you wis

Re: FindBugs and the @Inject annotation on global fields

2012-06-08 Thread Ray Nicholus
I'd hate to use such an annotation on every single instance. Instead, I'd love to filter out warnings based on annotation (in this case, Inject), but FB doesn't allow this in their filter files. On Fri, Jun 8, 2012 at 11:39 AM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > On Fri,

Re: Zone Refresh with dynamic context

2012-06-08 Thread tomandjerry
JSONObject json = new JSONObject(); json.put("period", 5); json.put("URL", createEventLink(newTime)); json.put("id", "poller"));

image cropper

2012-06-08 Thread sommeralex
has someone a image cropper plugin which works on all major browsers? / i was implementing mine with cropper, but it does not work with chrome and i cant figure out, why.. -- View this message in context: http://tapestry.1045711.n5.nabble.com/image-cropper-tp5713738.html Sent from the Tapestry -