0

Some questions about zats

asked 2016-03-12 10:10:34 +0800

mw88 gravatar image mw88
93 2
http://www.mw88.org

updated 2016-03-12 10:11:08 +0800

Hello,

I have tried to implement junit tests with zats and zk 8 and I have some problems that could be either caused by my code or maby zats doesn't support this :D

  1. I couldn't get zats to work with ZK8, only with ZK7. Is 8 supported yet?

  2. I also could't get it to run with Jetty9, only with Jetty8 which needs a different web.xml. I managed to set it in the environment settings but I think it would be better if I could use the same version for the test that I actually use. Is Jetty9 supported yet?

  3. I want to test my custom components and I noticed that some functions don't work with zats.

A few examples I noticed that don't work:

Executions.getCurrent().sendRedirect("/app/richletname");
Events.sendEvent(new Event(Events.ON_USER, component));

I managed to work around the problems from the examples above but this one is causing trouble for me:

component.detach();

This throws the following exception:

IllegalStateException: Components can be accessed only in event listeners

I noticed that there is a comment in this example about the same issue.

I think that this happens because the junit test runs in a different thread and that Executions.getCurrent() returns an invalid value. Is there a way to use components directly in zats or is this simply not supported?

Thanks in advance

delete flag offensive retag edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2016-04-11 14:16:19 +0800

MathieuPiette gravatar image MathieuPiette
1567 3

Could you get Zats running with ZK 8? I have a FileNotFoundException.

link publish delete flag offensive edit
0

answered 2016-04-12 12:53:56 +0800

Gasgeber gravatar image Gasgeber
1

I support the question and would like some information about this please. See my other question on a similar topic.

link publish delete flag offensive edit
0

answered 2016-04-12 17:12:02 +0800

jpboudreau gravatar image jpboudreau
18 3

Hi,

I don't think you can manipulate component in a Zats runtime.

Maybe you could try to activate the desktop like in desktop push. I never tried it thought.

I don't remember if I actually tested it or not, but I think you can add an event listener to your component and call what you need in there.

Thanks

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2016-03-12 10:10:34 +0800

Seen: 32 times

Last updated: Apr 12 '16

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More