Hmm, very strange. Are you calling registry.shutdown() ever?
Is this perhaps an issue with registry.cleanupThread()?
How many @Test annotations in the class? Does the first @Test work and the
second fail?
Just grasping at straws here!
On 10 Sep 2014 02:05, George Christman
Hi,
Isn't this a matter of indicating which session you want injected? ( I
guess both sessions match Session ), there are some mechanisms for that
described here: http://tapestry.apache.org/injection-faq.html
--
Chris
On Wed, Sep 10, 2014 at 8:35 AM, Lance Java lance.j...@googlemail.com
wrote:
That's not my understanding of how the tapestry registry works. Spring ioc
works like this but tapestry should bind the service to the interface
supplied by your module.
On 10 Sep 2014 07:48, Chris Poulsen mailingl...@nesluop.dk wrote:
Hi,
Isn't this a matter of indicating which session you
Exception in method null, parameter #1: Could not find a coercion from
type java.lang.String to type Scene. context - 3
It looks like the context is -3? Is this primary key in the database?
Also annotation wont, really work for me as I have more then one field
You might be interested in this
Yea -3 is not propet db id, but what could have changed it into negative
number...strange
Is this partbof the 5.3.7 or 5.4 as I am still on the old offucial version.
I can try it out tonight and see what happen
Thanks
On 10 Sep 2014 09:16, Lance Java lance.j...@googlemail.com wrote:
No, this is a new feature.
Your onActivate methods are very complex. Have you considered a single
onActivate(EventContext)?
Perhaps the '-' in '-3' is just a presentation issue.
I think the main culprit is likely to be your onPassivate(). Does it return
all 3 objects (when populated).
I think I've seen messages on the mailing lists about problems related to
multiple onActivate's a long time ago.
https://issues.apache.org/jira/browse/TAPESTRY-1730 seems to suggest that
the method with the most parameters is called first, but whether the
execution stops here or continues to the
Hi,
How do I get a kaptcha image to refresh when a zone is rerendered on an ajax
request? At present this only happens for a form that submits for the page.
Without a new code the next validation always fails.
John
---
This email is free from viruses and malware because avast! Antivirus
Hi Lance, I hear ya, same here.
Okay I'm going to provide all the code and the full exception.
* AppModuleTest *
public class AppModuleTest {
public static void bind(ServiceBinder binder) {
try {
ClassLoader contextClassLoader =
Thank you, Lance!
Now it works perfectly.
And one more question: I would like to push custom javascript using
atmosphere. I've seen this
https://github.com/uklance/tapestry-atmosphere/issues/5 and my
question is, how can I override your tapesty-atmosphere.js?
Thanks,
Sem
Sorry email prematurely sent.
Exception with some output showing where the code is breaking. The first
query using sessionManager in the test class runs, the second query in the
service using the genericDAO fails.
[TestNG] Running:
Command line suite
[WARN ] (ConfigContext.java:257) -
Now it works perfectly.
Great! I'll add an issue to copy the isSecure() flag from the async
request.
how can I override your tapesty-atmosphere.js?
stick it in the right path under WEB-IBF/classes and your container's
classloader will give it precedence.
It looks like I'm wrong.
Ultimately Registry.getService(Class) passes through to
Module.findServiceIdsForInterface() which ultimately finds all services
where: serviceInterface.isAssignableFrom(def.getServiceInterface())
So it works the same as spring IOC which really surprised me.
So, as
Yes, that was my initial solution but I ran into problems, but strangely it
seems to work fine now?!
I just call the onX event I already use for catching the bubbled up events, so
it seems I can remove my doRefresh and onRefresh code afterall.
Confused but happy :)
- Original Message
Some more oddities, I looks as if I'm able to get past this issue if I use
@InjectService as Chris described, however I noticed if I try to do any
saves in the GenericDAO, it fails. I'm also running into problems where my
services are looking for Tapestry services but can't find them. Example
Hi George, PageRenderLinkSource is a part of the web framework.
I mentioned before that you could split your app into 2 modules:
api - depends on tapestry-ioc
web - depends on tapestry-core
The test case I setup for you only tests the api stuff (tapestry-ioc). If
you split into 2 modules this
Testing web stuff gets a bit messier, as I said before I usually have
simple pass throughs from web to api and concentrate my unit testing on the
api layer.
Having two modules can really define this separation and forces you to do
the right thing.
Loading all the tapestry web module gets messy
Thanks Lance, I figured out the DAO issue :) Anyhow this happens to be my
day job project and my co-worker is looking to test his generated emails.
So if I understand you correctly, I need to include the tapestry-core? If
so, is that just a mater of including TapestryModule or no?
On Wed, Sep 10,
We'll have to talk about mocking over the weekend, probably going to need a
lesson in it ;) Unit testing is still pretty new to me, so lots to learn
yet.
On Wed, Sep 10, 2014 at 12:40 PM, Lance Java lance.j...@googlemail.com
wrote:
Testing web stuff gets a bit messier, as I said before I
Unit tests don't need a module at all. Your colleague could mock the
PageRenderLinkSource using Mockito and pass it to the EmailService
constructor. Then test the hell out of it!
On 10 Sep 2014 17:41, George Christman gchrist...@cardaddy.com wrote:
Thanks Lance, I figured out the DAO issue :)
I'm not very framilar with Mockito, So I'm assuming you would do something
like this in AppModuleTest?
public static PageRenderLinkSource buildPageRenderLinkSource() {
return Mockito.mock(PageRenderLinkSource.class);
}
Next question is how do I go about passing it to the constructor?
Integration testing.
On Wed, Sep 10, 2014 at 1:06 PM, Lance Java lance.j...@googlemail.com
wrote:
There's 2 types of tests that I feel are getting blurred here
1. Unit test - tests a single class. All dependencies are mocked
2. Integration test - tests 2 or more services in concert (might
There is an in mem database
Two services
The second service layer contains PageRenderLinkSource
On Wed, Sep 10, 2014 at 1:08 PM, George Christman gchrist...@cardaddy.com
wrote:
Integration testing.
On Wed, Sep 10, 2014 at 1:06 PM, Lance Java lance.j...@googlemail.com
wrote:
There's 2 types
I have tried with EventContext
public void onActivate(EventContext eventContext) {
if (eventContext.getCount() == 3) {
activate(eventContext.get(Scene.class, 0),
eventContext.get(Shot.class, 1), eventContext.get(ShotComponent.class, 2));
} else if
On Wed, 10 Sep 2014 14:14:01 -0300, Boris Horvat
horvat.z.bo...@gmail.com wrote:
public List onPassivate() {
List a = new ArrayList();
a.add(selectedScene);
a.add(selectedShot);
a.add(selectedComponent);
return a;
}
onPassivate() doesn't work
Lance, I think I'm really close lol. I think my struggles have to do with
the concept of having to mock a service.
Anyhow I have the following mock
public static PageRenderLinkSource buildPageRenderLinkSource() {
PageRenderLinkSource pageRenderLinkSource =
On Wed, 10 Sep 2014 15:40:25 -0300, Boris Horvat
horvat.z.bo...@gmail.com wrote:
public String[] onPassivate() {
String[] a = new String[3];
a[0] = selectedScene != null ? selectedScene.getId().toString() :
null;
a[1] = selectedShot != null ?
It looks like .toAbsolute is null, but without it I can not return a
String. hmm Any thoughts?
On Wed, Sep 10, 2014 at 2:43 PM, George Christman gchrist...@cardaddy.com
wrote:
Lance, I think I'm really close lol. I think my struggles have to do with
the concept of having to mock a service.
This is getting a bit off topic for the tapestry user's list... I suggest
you do some further reading on mockito
It would probably look something like this:
Link link = mock(Link.class);
when(link.toAbsoluteURI()).thenReturn(http://test1;);
I know :) as I wrote in the previous mail I have tried both ways, but still
not working
On Wed, Sep 10, 2014 at 9:09 PM, Thiago H de Paula Figueiredo
thiag...@gmail.com wrote:
On Wed, 10 Sep 2014 15:40:25 -0300, Boris Horvat horvat.z.bo...@gmail.com
wrote:
public String[] onPassivate() {
30 matches
Mail list logo