Re: Customize ActivationRequestParameter to take a list

2014-09-02 Thread Lance Java
@PageActivationContext is a convenience annotation that ultimately creates
onActivate(..) and onPassivate() methods on your page. I think you're
surpassing what it was designed for.

You should just declare onActivate(..) and onPassivate() instead (or maybe
create your own @PageActivationContexts annotation / worker).


Re: Simpler Hello World

2014-09-02 Thread Chris Mylonas
For future noobs, this is not a simpler hello world, it's making tapestry
respond with text only, no template, nothing but pure text.

I had to do this today and this thread caught my eye last month.

In the standard tapestry 5.3.7 archetype, my Contact.java looks like this.


package org.example.pages;

import org.apache.tapestry5.StreamResponse;
import org.apache.tapestry5.util.TextStreamResponse;

public class Contact {

StreamResponse onActivate(){
return new TextStreamResponse("text/plain","some plain old text -
no .tml file, no nothing. plain old text - yay!");
}
}

I wouldn't describe it as a simpler hello world at all because you're
making tapestry end it's goodness prematurely.  Like learning how to write
a program and the first statement in main() you learn is exit(1);


Customize ActivationRequestParameter to take a list

2014-09-02 Thread George Christman
Hi guys, I'm wondering if there is a way to customize the
ActivationRequestParameter to accept a list? What I'm looking to do is pass
a list of strings into the ActivationRequestParameter and ultimately form a
query parameter in the URL like so

 make=chevy|ford

My thought was something like this.

@ActivationRequestParameter(value = SearchParam.MAKE)
private List makes;

public void setFilters()  {
makes = Arrays.asList("chevy", "ford");
}

I'm trying to design a search where the user can filter on the same field
multiple times.

Thanks,
George


Re: Tynamo-Conversations + Tapestry-Atmosphere

2014-09-02 Thread Lance Java
Wrong link, make sure your dependencies match the table here
https://github.com/Atmosphere/atmosphere/wiki/Installing-AtmosphereServlet-with-or-without-native-support#quick-dependency-reference
 On 2 Sep 2014 19:31, "Lance Java"  wrote:

> Run "mvn:dependency tree" from the command line and make sure your
> dependencies match the table here
> http://tapestry-atmosphere.uklance.cloudbees.net/. You might need to
>  a dependency? Not sure.
>
> I had troubles with tomcat and apache on cloudbees and had to upgrade to
> http 1.1. Does it work on jetty (runjettyrun plugin?).
>
> Possibly best to ask further questions on atmosphere users list if it's
> more relevant there.
>


Re: Tynamo-Conversations + Tapestry-Atmosphere

2014-09-02 Thread Lance Java
Run "mvn:dependency tree" from the command line and make sure your
dependencies match the table here
http://tapestry-atmosphere.uklance.cloudbees.net/. You might need to
 a dependency? Not sure.

I had troubles with tomcat and apache on cloudbees and had to upgrade to
http 1.1. Does it work on jetty (runjettyrun plugin?).

Possibly best to ask further questions on atmosphere users list if it's
more relevant there.


Re: Tynamo-Conversations + Tapestry-Atmosphere

2014-09-02 Thread Semen Vishniakov
Yes, the exception is gone now, thank you!

But I have another question now:

The demo and my project work perfectly with cometd long-polling
connection. But when I try to change it to WebSocket, the event is not
triggered. There is no errors or exceptions, in browser console I have
"Websocket successfully opened". I assume that the cause could be
tomcat configuration. I use the 7th version and I've added
atmosphere-runtime-native, atmosphere-compat-jbossweb and
atmosphere-compat-tomcat dependencies.
Any ideas?

Thanks in advance!
Sem.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Trigger custom JS events and handle them on the server side

2014-09-02 Thread Martin Schneider
Hi François,

Thanks! I will have a look.

Martin


On Mon, Sep 1, 2014 at 7:27 PM, françois facon  wrote:

> Hi Martin,
>
> please have a look at the branch 5.4.
>
> https://github.com/got5/tapestry5-jquery/commit/a979f03a1feedb40a2fd1fbeb410f197d5e7bcf2
> .
>
> Regards
> François
>


Re: Tapestry ioc/registry startup exception?

2014-09-02 Thread Stephen Nutbrown
Hi,

I had this exact same question and problem, and found changing the JDK
to use 7 instead of 8 fixed it.

However, this seems to do it even when I download a snapshot of
Tapestry and run using JDK 8, is there any documentation anywhere with
any requirements and instructions on how to use JDK 8?  For my
project, I have just settled with using JDK 7, but that isn't
necessarily ideal.

Thanks,




On 2 September 2014 11:37, Lance Java  wrote:
> It's caused by asm.ClassReader. Which jvm version and tapestry version are
> you using? Tapestry has only recently added support for java 8 (asm5).

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Tapestry ioc/registry startup exception?

2014-09-02 Thread Lance Java
It's caused by asm.ClassReader. Which jvm version and tapestry version are
you using? Tapestry has only recently added support for java 8 (asm5).


Re: Tapestry ioc/registry startup exception?

2014-09-02 Thread John
This was caused by a JDK version conflict!
  - Original Message -
  From: John
  To: users@tapestry.apache.org
  Sent: Tuesday, September 02, 2014 11:08 AM
  Subject: Tapestry ioc/registry startup exception?


  Hi,

  Any pointers on why my app won't start pls?

  John



  ioc.Registry Error building service proxy for service 'RegistryStartup' (at 
org.apache.tapestry5.ioc.internal.services.RegistryStartup(Logger, List) (at 
RegistryStartup.java:36) via 
org.apache.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder) (at 
TapestryIOCModule.java:49)): java.lang.IllegalArgumentException
  ioc.Registry Operations trace:
  ioc.Registry [ 1] Creating proxy for service RegistryStartup
  2014-09-02 10:58:14.744::WARN:  failed app
  org.apache.tapestry5.ioc.internal.OperationException: Error building service 
proxy for service 'RegistryStartup' (at 
org.apache.tapestry5.ioc.internal.services.RegistryStartup(Logger, List) (at 
RegistryStartup.java:36) via 
org.apache.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder) (at 
TapestryIOCModule.java:49)): java.lang.IllegalArgumentException
   at 
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:121)
   at 
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:88)
   at 
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87)
   at 
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1124)
   at org.apache.tapestry5.ioc.internal.ModuleImpl.create(ModuleImpl.java:332)
   at 
org.apache.tapestry5.ioc.internal.ModuleImpl.access$100(ModuleImpl.java:39)
   at org.apache.tapestry5.ioc.internal.ModuleImpl$1.invoke(ModuleImpl.java:191)
   at 
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withWrite(ConcurrentBarrier.java:140)
   at org.apache.tapestry5.ioc.internal.ModuleImpl$2.invoke(ModuleImpl.java:207)
   at 
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
   at 
org.apache.tapestry5.ioc.internal.ModuleImpl.findOrCreate(ModuleImpl.java:213)
   at 
org.apache.tapestry5.ioc.internal.ModuleImpl.getService(ModuleImpl.java:109)
   at 
org.apache.tapestry5.ioc.internal.RegistryImpl.getService(RegistryImpl.java:421)
   at 
org.apache.tapestry5.ioc.internal.RegistryImpl.performRegistryStartup(RegistryImpl.java:325)
   at 
org.apache.tapestry5.ioc.internal.RegistryWrapper.performRegistryStartup(RegistryWrapper.java:80)
   at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:118)
   at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
   at 
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:653)
   at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
   at 
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1239)
   at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
   at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:466)
   at 
org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:124)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
   at 
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
   at 
org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
   at 
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
   at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
   at org.mortbay.jetty.Server.doStart(Server.java:222)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
   at 
org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
   at 
org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:441)
   at 
org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:383)
   at 
org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:210)
   at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184)
   at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
   at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
   at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
   at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
   at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
   at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
   at 
org.apache.ma

Tapestry ioc/registry startup exception?

2014-09-02 Thread John
Hi,

Any pointers on why my app won't start pls?

John



ioc.Registry Error building service proxy for service 'RegistryStartup' (at 
org.apache.tapestry5.ioc.internal.services.RegistryStartup(Logger, List) (at 
RegistryStartup.java:36) via 
org.apache.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder) (at 
TapestryIOCModule.java:49)): java.lang.IllegalArgumentException
ioc.Registry Operations trace:
ioc.Registry [ 1] Creating proxy for service RegistryStartup
2014-09-02 10:58:14.744::WARN:  failed app
org.apache.tapestry5.ioc.internal.OperationException: Error building service 
proxy for service 'RegistryStartup' (at 
org.apache.tapestry5.ioc.internal.services.RegistryStartup(Logger, List) (at 
RegistryStartup.java:36) via 
org.apache.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder) (at 
TapestryIOCModule.java:49)): java.lang.IllegalArgumentException
 at 
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:121)
 at 
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:88)
 at 
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87)
 at 
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1124)
 at org.apache.tapestry5.ioc.internal.ModuleImpl.create(ModuleImpl.java:332)
 at org.apache.tapestry5.ioc.internal.ModuleImpl.access$100(ModuleImpl.java:39)
 at org.apache.tapestry5.ioc.internal.ModuleImpl$1.invoke(ModuleImpl.java:191)
 at 
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withWrite(ConcurrentBarrier.java:140)
 at org.apache.tapestry5.ioc.internal.ModuleImpl$2.invoke(ModuleImpl.java:207)
 at 
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
 at 
org.apache.tapestry5.ioc.internal.ModuleImpl.findOrCreate(ModuleImpl.java:213)
 at org.apache.tapestry5.ioc.internal.ModuleImpl.getService(ModuleImpl.java:109)
 at 
org.apache.tapestry5.ioc.internal.RegistryImpl.getService(RegistryImpl.java:421)
 at 
org.apache.tapestry5.ioc.internal.RegistryImpl.performRegistryStartup(RegistryImpl.java:325)
 at 
org.apache.tapestry5.ioc.internal.RegistryWrapper.performRegistryStartup(RegistryWrapper.java:80)
 at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:118)
 at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
 at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
 at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:653)
 at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
 at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1239)
 at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
 at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:466)
 at 
org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:124)
 at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
 at 
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
 at 
org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
 at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
 at 
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
 at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
 at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
 at org.mortbay.jetty.Server.doStart(Server.java:222)
 at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
 at 
org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
 at 
org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:441)
 at 
org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:383)
 at 
org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:210)
 at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184)
 at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
 at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
 at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
 at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
 at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
 at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
 at 
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
 at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
 at org.apache.m

Re: Tapestry in distributed environment

2014-09-02 Thread Mugat Gurkowsky
this works like charm- thanks a lot



On Fri, Aug 29, 2014 at 4:26 PM, Daniel Jue  wrote:

> For instance, in my project, see this BeforeSuite annotated method:
>
>
> https://github.com/Sotera/graphene/blob/master/graphene-parent/graphene-util/src/test/java/graphene/util/fs/PropertiesFileSymbolProviderTest.java
>
>
> On Fri, Aug 29, 2014 at 10:24 AM, Daniel Jue  wrote:
>
> > Another good place to look is in any of the unit or integration tests for
> > frameworks or apps that use Tapestry.  You often want to start up a
> > registry there so you can import modules to wire up DAOs, services, etc.
> >
> >
> > On Fri, Aug 29, 2014 at 8:50 AM, Thiago H de Paula Figueiredo <
> > thiag...@gmail.com> wrote:
> >
> >> On Fri, 29 Aug 2014 08:39:50 -0300, Mugat Gurkowsky <
> zenpunk...@gmail.com>
> >> wrote:
> >>
> >>  hello,
> >>>
> >>
> >> Hi!
> >>
> >>
> >>  i would like to be able to use tapestry IoC (especially injections) in
> >>> the> drone-clients, but i have run into problems with that. in the
> >>> documentations i have not seen any way which would make use of Tapestry
> >>> IoC from a java-main without the ise of a web-server, so i wanted to
> ask you
> >>> how i could do that best.
> >>>
> >>
> >> Have you seen http://tapestry.apache.org/starting-the-ioc-registry.html
> ?
> >> :D
> >>
> >> --
> >> Thiago H. de Paula Figueiredo
> >> Tapestry, Java and Hibernate consultant and developer
> >> http://machina.com.br
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>
> >>
> >
>