Re: Has anyone gotten the tapestry 5 highcharts demo webapp to run?

2013-03-09 Thread François Facon
Hi,

I only use run jetty run with a none maven based project.
Most of the time,  we use the maven plugin for eclipse to create a new
maven build in Eclipse Run Configuration as follow.
-select imported project
- right click - run as - run configurations
- create a new configuration under maven build
- add jetty:run for the goals
click run

You can also run mvn jetty:run at your project directory which
contains the pom.xml in the shell prompt

François

2013/3/9 George Ludwig georgelud...@gmail.com:
 I've been trying to get the demo webapp running using run jetty run in
 Eclipse, but the best I've managed is to get jetty to boot, but all it does
 is serve a directory listing under
 http://localhost:8080/tapestry5-highcharts/

 Has anyone managed to get this to run in Eclipse using Jetty?

 -George

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



Re: Has anyone gotten the tapestry 5 highcharts demo webapp to run?

2013-03-09 Thread Shing Hing Man


I had the same problem a few weeks ago.

I was using the following Jetty Eclipse plugin.

http://wiki.eclipse.org/Jetty_WTP_Plugin


In the console,  I got the following message :  
Excluded 
entry=/home/matmsh/Downloads/tapestry/highChart/tapestry5-highcharts/target/test-classes
 


To fix above,  In Eclipse, I did 

Run configuration - Web app class path  -
add 
/home/matmsh/Downloads/tapestry/highChart/tapestry5-highcharts/target/test-classes
 

to the user custom classpath. 

(The  above path is already in under  default project path. Somehow, it is not 
being picked up.)

Shing 





From: George Ludwig georgelud...@gmail.com
To: Tapestry users users@tapestry.apache.org 
Sent: Saturday, March 9, 2013 1:33 AM
Subject: Has anyone gotten the tapestry 5 highcharts demo webapp to run?

I've been trying to get the demo webapp running using run jetty run in
Eclipse, but the best I've managed is to get jetty to boot, but all it does
is serve a directory listing under
http://localhost:8080/tapestry5-highcharts/

Has anyone managed to get this to run in Eclipse using Jetty?

-George 

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



Triggering a form submission via JavaScript in 5.4-alpha2

2013-03-09 Thread Bob Harner
Has anyone figured out how to trigger a form submission using
JavaScript in Tapestry 5.4?

In 5.3 I was able to do this:

this.form.fire(Tapestry.FORM_PROCESS_SUBMIT_EVENT)

but that does nothing under 5.4.

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



Re: Triggering a form submission via JavaScript in 5.4-alpha2

2013-03-09 Thread Lance Java
You could render a hidden submit button and fire the click() event on it



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Triggering-a-form-submission-via-JavaScript-in-5-4-alpha2-tp5720381p5720383.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: Triggering a form submission via JavaScript in 5.4-alpha2

2013-03-09 Thread Steve Eynon
Try this:

  this.form.fire(submit)

I've not tried it, but I was looking at:
http://people.apache.org/~hlship/t5api/coffeescript/forms.html

Steve.
---
If at first you don't succeed,
   so much for skydiving!

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



Page components are not loaded in JBoss

2013-03-09 Thread rakcheru

Tapestry version : 5.3.6
Jboss : 7.1.1

Greetings,

I had been struggling for most of the day trying to make tapestry run on 
jboss 7.1.1


Issue:
The page components are not at all working. Even the default page 
components are not loaded

The same app is working fine in jetty

Things i tried:
Gone through the wiki articles about overriding 
ClasspathURLConverter but couldnt make it work. Issue : no matter what i 
do, the AppModule is not LOADED at all. Steps followed:


1. Added a new ClasspathURLConverter subclass in the project
2. Placed AppModule.java under tapestry.app-package.services package
3. AppModule.java holds a method
public static void 
contributeServiceOverride(MappedConfigurationClass, Object 
configuration) {
configuration.add(ClasspathURLConverter.class, new 
JBoss711ClasspathURLConverter());

}

Things observed:
When compared the log data from jetty to that of jboss, seems like 
ComponentClassResolver is not invoked in jboss

jetty:
[INFO] ioc.RegistryBuilder Adding module definition for class 
org.apache.tapestry5.ioc.services.TapestryIOCModule
[INFO] ioc.RegistryBuilder Adding module definition for class 
org.apache.tapestry5.json.services.JSONModule
[INFO] ioc.RegistryBuilder Adding module definition for class 
org.apache.tapestry5.services.TapestryModule
[INFO] ioc.RegistryBuilder Adding module definition for class 
org.apache.tapestry5.internal.services.InternalModule
[INFO] ioc.RegistryBuilder Adding module definition for class 
org.apache.tapestry5.services.assets.AssetsModule
[INFO] ioc.RegistryBuilder Adding module definition for class 
org.apache.tapestry5.services.pageload.PageLoadModule
[WARN] TapestryFilter Application Module class 
com.rakesh.demotapestry.web.services.TapestryModule not found
[DEBUG] TapestryModule.ComponentClassResolver Creating proxy 
for service ComponentClassResolver
[DEBUG] TapestryModule.ComponentClassResolver Constructing 
service implementation via 
org.apache.tapestry5.services.TapestryModule.buildComponentClassResolver(ComponentClassResolverImpl, 
InvalidationEventHub) (at TapestryModule.java:1213)



jboss:
INFO  ioc.RegistryBuilder] Adding module definition for class 
org.apache.tapestry5.ioc.services.TapestryIOCModule
INFO  ioc.RegistryBuilder] Adding module definition for class 
org.apache.tapestry5.json.services.JSONModule
INFO  ioc.RegistryBuilder] Adding module definition for class 
org.apache.tapestry5.services.TapestryModule
INFO  ioc.RegistryBuilder] Adding module definition for class 
org.apache.tapestry5.internal.services.InternalModule
INFO  ioc.RegistryBuilder] Adding module definition for class 
org.apache.tapestry5.services.assets.AssetsModule
INFO  ioc.RegistryBuilder] Adding module definition for class 
org.apache.tapestry5.services.pageload.PageLoadModule
WARN  TapestryFilter] Application Module class 
com.rakesh.demotapestry.web.services.TapestryModule not found

INFO  TapestryFilter] Startup status:

Any help greatly appreciated.

Thanks in advance,
Rakesh

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



Re: Has anyone gotten the tapestry 5 highcharts demo webapp to run?

2013-03-09 Thread George Ludwig
@Francois: Thanks for reminding me to run it from the command line with
maven...that works fine.

@Shing: I got the same excluded entry, but in my run configuration, it
showed it as being included. I set/unset the path, restarted Eclipse, and
now it runs as expected.

This is just weird, and I don't know where the issue came from. Was it
related to EGit (which seems extremely flaky)? Was it Eclipse? No have no
idea, and it makes me really nervous when I can't explain why something was
failing, and then magically starts working...


On Sat, Mar 9, 2013 at 3:28 AM, Shing Hing Man mat...@yahoo.com wrote:



 I had the same problem a few weeks ago.

 I was using the following Jetty Eclipse plugin.

 http://wiki.eclipse.org/Jetty_WTP_Plugin


 In the console,  I got the following message :
 Excluded
 entry=/home/matmsh/Downloads/tapestry/highChart/tapestry5-highcharts/target/test-classes


 To fix above,  In Eclipse, I did

 Run configuration - Web app class path  -
 add
 /home/matmsh/Downloads/tapestry/highChart/tapestry5-highcharts/target/test-classes

 to the user custom classpath.

 (The  above path is already in under  default project path. Somehow, it is
 not being picked up.)

 Shing




 
 From: George Ludwig georgelud...@gmail.com
 To: Tapestry users users@tapestry.apache.org
 Sent: Saturday, March 9, 2013 1:33 AM
 Subject: Has anyone gotten the tapestry 5 highcharts demo webapp to run?

 I've been trying to get the demo webapp running using run jetty run in
 Eclipse, but the best I've managed is to get jetty to boot, but all it does
 is serve a directory listing under
 http://localhost:8080/tapestry5-highcharts/

 Has anyone managed to get this to run in Eclipse using Jetty?

 -George

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




Re: Has anyone gotten the tapestry 5 highcharts demo webapp to run?

2013-03-09 Thread George Ludwig
Just a quick note...the difference may have been how I imported the
project. Yesterday, I got caught up in importing it in to Eclipse using
EGit's import function. Today, just before everything worked, I used
Eclipse's native import, and imported EGit's working directory for the
project.

If anyone else is experiencing similar issues, it's worth a try.


On Sat, Mar 9, 2013 at 12:31 PM, George Ludwig georgelud...@gmail.comwrote:

 @Francois: Thanks for reminding me to run it from the command line with
 maven...that works fine.

 @Shing: I got the same excluded entry, but in my run configuration, it
 showed it as being included. I set/unset the path, restarted Eclipse, and
 now it runs as expected.

 This is just weird, and I don't know where the issue came from. Was it
 related to EGit (which seems extremely flaky)? Was it Eclipse? No have no
 idea, and it makes me really nervous when I can't explain why something was
 failing, and then magically starts working...


 On Sat, Mar 9, 2013 at 3:28 AM, Shing Hing Man mat...@yahoo.com wrote:



 I had the same problem a few weeks ago.

 I was using the following Jetty Eclipse plugin.

 http://wiki.eclipse.org/Jetty_WTP_Plugin


 In the console,  I got the following message :
 Excluded
 entry=/home/matmsh/Downloads/tapestry/highChart/tapestry5-highcharts/target/test-classes


 To fix above,  In Eclipse, I did

 Run configuration - Web app class path  -
 add
 /home/matmsh/Downloads/tapestry/highChart/tapestry5-highcharts/target/test-classes

 to the user custom classpath.

 (The  above path is already in under  default project path. Somehow, it
 is not being picked up.)

 Shing




 
 From: George Ludwig georgelud...@gmail.com
 To: Tapestry users users@tapestry.apache.org
 Sent: Saturday, March 9, 2013 1:33 AM
 Subject: Has anyone gotten the tapestry 5 highcharts demo webapp to run?

 I've been trying to get the demo webapp running using run jetty run in
 Eclipse, but the best I've managed is to get jetty to boot, but all it
 does
 is serve a directory listing under
 http://localhost:8080/tapestry5-highcharts/

 Has anyone managed to get this to run in Eclipse using Jetty?

 -George

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





Re: How to get a lot of data in to highcharts?

2013-03-09 Thread Jay Ginete

On 3/10/2013 5:40 AM, George Ludwig wrote:

I've been reviewing the tapestry5/highcharts integration code, and I see
that the data for the charts has been hardcoded in to a javascript file.

What is the best way to display a lot of data from the server? For example,
I have a series with hundreds or thousands of data points, and I need to
calculate them on the server, and somehow get them in to highcharts.

I haven't done a lot of work with Tapestry's javascript support, so forgive
me if this is obvious...

-George

Write a public function that returns a JSONObject 
(http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/json/JSONObject.html) 
in the page class.


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



Re: First stab at CDI module for tapestry

2013-03-09 Thread Kalle Korhonen
Hey Magnus,

as part of your tapestry-cdi work, did you look into implementing a
Tapestry CDI SPI, i.e. an implementation of
javax.enterprise.inject.spi.BeanManager? This is related to my earlier
thread about injectable entitylisteners (
http://mail-archives.apache.org/mod_mbox/tapestry-dev/201210.mbox/%3CCA+=ewnb+tjv01fiyzsded3u5iyop3wcf1r3prhqtdjrm7ix...@mail.gmail.com%3E).
JPA 2.1 is required the check the SPI (see
http://java.dzone.com/articles/cdi-extensions-you-can-build,
http://java.net/downloads/jpa-spec/JavaPersistencePFD.pdf,
http://stackoverflow.com/questions/12951701/how-to-get-entity-manager-or-transaction-in-jpa-listener,
http://stackoverflow.com/questions/11740322/cdi-injection-is-not-working-in-servlets).
The CDI is a solid spec, we should start thinking about offering
tapestry-cdi or similar as a core Tapestry module.

Kalle


On Thu, Aug 18, 2011 at 11:59 AM, Magnus Kvalheim mag...@kvalheim.dkwrote:

 Yes, I've noticed. Great work Igor :)

 I've intentionally not done anything for tapestry-cdi in terms of
 supporting
 javax.inject.@Inject.

 As Tap @inject and javax @inject are interchangeable - cdi bean injection
 with either @inject should 'just work' with tapestry-cdi and T5.3 :)

 On Thu, Aug 18, 2011 at 12:56 PM, Igor Drobiazko
 igor.drobia...@gmail.comwrote:

  Just as a side note: starting with T5.3 it's possible to use JSR 330 for
  injection.
 
  Check this out:
  http://tapestry.apache.org/using-jsr-330-standard-annotations.html
 
  On Wed, Jun 8, 2011 at 1:56 PM, Magnus Kvalheim mag...@kvalheim.dk
  wrote:
 
   Hi all,
  
   We're looking into moving our apps from a 'traditional' servlet
 container
   with spring into a Java EE web profile server like glassfish 3.1.
   Motivations for doing this is to utilize cdi(jsr 299, 330), ejb3 and
  more.
   Not just for the tapestry app, but also the other applications in
   our portfoleo which share common core business logic.
  
   For reference on previous discussions:
  
  
 
 http://tapestry.1045711.n5.nabble.com/Java-based-spring-configuration-td3394086.html
   http://tapestry.1045711.n5.nabble.com/Discussion-td2421783i20.html
  
   Now, I've tried running the tapestry quickstart app in glassfish 3.1
  (with
   the eclipse connector for publishing).
   This works ok - although I cannot make live class reloading work. :(
  
   Glassfish uses Weld, so the CDIModule is basically an objectprovider
 for
   injecting Weld managed beans.
   (As you probably know CDI/Weld can also be used outside jee as
  alternative
   to tapestry-ioc, spring, etc)
  
   *CDIModule class*
   *public class CDIModule { *
   * public static void bind(ServiceBinder binder) {*
   *binder.bind(ObjectProvider.class,
   CDIObjectProvider.class).withId(CDIObjectProvider);*
   *} *
   * public static BeanManager buildBeanManager(Logger log) { *
   * try {*
   * BeanManager beanManager = (BeanManager) new
   InitialContext().lookup(java:comp/BeanManager);*
   * return beanManager; *
   * } catch (NamingException e) {*
   * log.error(Could not lookup jndi resource: java:comp/BeanManager,
 e);*
   * }*
   * return null;*
   * } *
   * public static void contributeMasterObjectProvider(*
   * @InjectService(CDIObjectProvider) ObjectProvider cdiProvider,*
   * OrderedConfigurationObjectProvider configuration) { *
   *// configuration.add(cdiProvider, cdiProvider,
  
  
 
 after:Service,after:AnnotationBasedContributions,after:Alias,after:Autobuild);
   *
   * configuration.add(cdiProvider, cdiProvider, after:*); *
   * } *
   *}*
   *
   *
   The beanmanager is expected to be found in jndi. If the beans.xml is
   present
   it will be available at this point.
   The BeanManager is also exposed as a service and injectable for other
   services or components.
   I've tested by adding the *@SubModule(CDIModule.class) *to my
 quickstart
   appmodule.
   *
   *
   *CDIObjectProvider class*
   *public class CDIObjectProvider implements ObjectProvider { *
   * private BeanManager beanManager;*
   * private Logger log;*
   * *
   * @SuppressWarnings({ unchecked, rawtypes })*
   * private Set allowedScopes = CollectionFactory.newSet(*
   * ApplicationScoped.class,*
   * Singleton.class);*
   *
   *
   * public CDIObjectProvider(*
   * Logger log,*
   * @InjectService(BeanManager) BeanManager manager) {*
   * this.beanManager = manager;*
   * this.log = log;*
   * }*
   * @SuppressWarnings(unchecked)*
   * public T T provide(ClassT objectType,*
   * AnnotationProvider annotationProvider, ObjectLocator locator) {*
   * SetBean? beans =  beanManager.getBeans(objectType);*
   * if(beans!=null  beans.size()0) {*
   * BeanT bean = (BeanT) beans.iterator().next(); *
   * if(hasValidScope(bean)) {*
   * CreationalContextT ctx =
 beanManager.createCreationalContext(bean);*
   * T o = (T) beanManager.getReference(bean, objectType, ctx); *
   * log.info(Found and returning: +objectType.getCanonicalName());*
   * return o; *
   * }*
   * }*
   * return null;*
   * } *
   * 

Re: First stab at CDI module for tapestry

2013-03-09 Thread François Facon
+1
Did you have a look at https://github.com/got5/cdi-tapestry-contribution?

François

2013/3/9 Kalle Korhonen kalle.o.korho...@gmail.com:
 Hey Magnus,

 as part of your tapestry-cdi work, did you look into implementing a
 Tapestry CDI SPI, i.e. an implementation of
 javax.enterprise.inject.spi.BeanManager? This is related to my earlier
 thread about injectable entitylisteners (
 http://mail-archives.apache.org/mod_mbox/tapestry-dev/201210.mbox/%3CCA+=ewnb+tjv01fiyzsded3u5iyop3wcf1r3prhqtdjrm7ix...@mail.gmail.com%3E).
 JPA 2.1 is required the check the SPI (see
 http://java.dzone.com/articles/cdi-extensions-you-can-build,
 http://java.net/downloads/jpa-spec/JavaPersistencePFD.pdf,
 http://stackoverflow.com/questions/12951701/how-to-get-entity-manager-or-transaction-in-jpa-listener,
 http://stackoverflow.com/questions/11740322/cdi-injection-is-not-working-in-servlets).
 The CDI is a solid spec, we should start thinking about offering
 tapestry-cdi or similar as a core Tapestry module.

 Kalle


 On Thu, Aug 18, 2011 at 11:59 AM, Magnus Kvalheim mag...@kvalheim.dkwrote:

 Yes, I've noticed. Great work Igor :)

 I've intentionally not done anything for tapestry-cdi in terms of
 supporting
 javax.inject.@Inject.

 As Tap @inject and javax @inject are interchangeable - cdi bean injection
 with either @inject should 'just work' with tapestry-cdi and T5.3 :)

 On Thu, Aug 18, 2011 at 12:56 PM, Igor Drobiazko
 igor.drobia...@gmail.comwrote:

  Just as a side note: starting with T5.3 it's possible to use JSR 330 for
  injection.
 
  Check this out:
  http://tapestry.apache.org/using-jsr-330-standard-annotations.html
 
  On Wed, Jun 8, 2011 at 1:56 PM, Magnus Kvalheim mag...@kvalheim.dk
  wrote:
 
   Hi all,
  
   We're looking into moving our apps from a 'traditional' servlet
 container
   with spring into a Java EE web profile server like glassfish 3.1.
   Motivations for doing this is to utilize cdi(jsr 299, 330), ejb3 and
  more.
   Not just for the tapestry app, but also the other applications in
   our portfoleo which share common core business logic.
  
   For reference on previous discussions:
  
  
 
 http://tapestry.1045711.n5.nabble.com/Java-based-spring-configuration-td3394086.html
   http://tapestry.1045711.n5.nabble.com/Discussion-td2421783i20.html
  
   Now, I've tried running the tapestry quickstart app in glassfish 3.1
  (with
   the eclipse connector for publishing).
   This works ok - although I cannot make live class reloading work. :(
  
   Glassfish uses Weld, so the CDIModule is basically an objectprovider
 for
   injecting Weld managed beans.
   (As you probably know CDI/Weld can also be used outside jee as
  alternative
   to tapestry-ioc, spring, etc)
  
   *CDIModule class*
   *public class CDIModule { *
   * public static void bind(ServiceBinder binder) {*
   *binder.bind(ObjectProvider.class,
   CDIObjectProvider.class).withId(CDIObjectProvider);*
   *} *
   * public static BeanManager buildBeanManager(Logger log) { *
   * try {*
   * BeanManager beanManager = (BeanManager) new
   InitialContext().lookup(java:comp/BeanManager);*
   * return beanManager; *
   * } catch (NamingException e) {*
   * log.error(Could not lookup jndi resource: java:comp/BeanManager,
 e);*
   * }*
   * return null;*
   * } *
   * public static void contributeMasterObjectProvider(*
   * @InjectService(CDIObjectProvider) ObjectProvider cdiProvider,*
   * OrderedConfigurationObjectProvider configuration) { *
   *// configuration.add(cdiProvider, cdiProvider,
  
  
 
 after:Service,after:AnnotationBasedContributions,after:Alias,after:Autobuild);
   *
   * configuration.add(cdiProvider, cdiProvider, after:*); *
   * } *
   *}*
   *
   *
   The beanmanager is expected to be found in jndi. If the beans.xml is
   present
   it will be available at this point.
   The BeanManager is also exposed as a service and injectable for other
   services or components.
   I've tested by adding the *@SubModule(CDIModule.class) *to my
 quickstart
   appmodule.
   *
   *
   *CDIObjectProvider class*
   *public class CDIObjectProvider implements ObjectProvider { *
   * private BeanManager beanManager;*
   * private Logger log;*
   * *
   * @SuppressWarnings({ unchecked, rawtypes })*
   * private Set allowedScopes = CollectionFactory.newSet(*
   * ApplicationScoped.class,*
   * Singleton.class);*
   *
   *
   * public CDIObjectProvider(*
   * Logger log,*
   * @InjectService(BeanManager) BeanManager manager) {*
   * this.beanManager = manager;*
   * this.log = log;*
   * }*
   * @SuppressWarnings(unchecked)*
   * public T T provide(ClassT objectType,*
   * AnnotationProvider annotationProvider, ObjectLocator locator) {*
   * SetBean? beans =  beanManager.getBeans(objectType);*
   * if(beans!=null  beans.size()0) {*
   * BeanT bean = (BeanT) beans.iterator().next(); *
   * if(hasValidScope(bean)) {*
   * CreationalContextT ctx =
 beanManager.createCreationalContext(bean);*
   * T o = (T) beanManager.getReference(bean, 

Re: First stab at CDI module for tapestry

2013-03-09 Thread Lenny Primak
I would love to contribute the FlowLogix module, or as much of it as it still 
applies to tapestry 5.4 into the core. It includes CDI support plus the JEE 
stack support. 
The CDI interface doesn't use SPI yet. 



On Mar 9, 2013, at 5:34 PM, Kalle Korhonen kalle.o.korho...@gmail.com wrote:

 Hey Magnus,
 
 as part of your tapestry-cdi work, did you look into implementing a
 Tapestry CDI SPI, i.e. an implementation of
 javax.enterprise.inject.spi.BeanManager? This is related to my earlier
 thread about injectable entitylisteners (
 http://mail-archives.apache.org/mod_mbox/tapestry-dev/201210.mbox/%3CCA+=ewnb+tjv01fiyzsded3u5iyop3wcf1r3prhqtdjrm7ix...@mail.gmail.com%3E).
 JPA 2.1 is required the check the SPI (see
 http://java.dzone.com/articles/cdi-extensions-you-can-build,
 http://java.net/downloads/jpa-spec/JavaPersistencePFD.pdf,
 http://stackoverflow.com/questions/12951701/how-to-get-entity-manager-or-transaction-in-jpa-listener,
 http://stackoverflow.com/questions/11740322/cdi-injection-is-not-working-in-servlets).
 The CDI is a solid spec, we should start thinking about offering
 tapestry-cdi or similar as a core Tapestry module.
 
 Kalle
 
 
 On Thu, Aug 18, 2011 at 11:59 AM, Magnus Kvalheim mag...@kvalheim.dkwrote:
 
 Yes, I've noticed. Great work Igor :)
 
 I've intentionally not done anything for tapestry-cdi in terms of
 supporting
 javax.inject.@Inject.
 
 As Tap @inject and javax @inject are interchangeable - cdi bean injection
 with either @inject should 'just work' with tapestry-cdi and T5.3 :)
 
 On Thu, Aug 18, 2011 at 12:56 PM, Igor Drobiazko
 igor.drobia...@gmail.comwrote:
 
 Just as a side note: starting with T5.3 it's possible to use JSR 330 for
 injection.
 
 Check this out:
 http://tapestry.apache.org/using-jsr-330-standard-annotations.html
 
 On Wed, Jun 8, 2011 at 1:56 PM, Magnus Kvalheim mag...@kvalheim.dk
 wrote:
 
 Hi all,
 
 We're looking into moving our apps from a 'traditional' servlet
 container
 with spring into a Java EE web profile server like glassfish 3.1.
 Motivations for doing this is to utilize cdi(jsr 299, 330), ejb3 and
 more.
 Not just for the tapestry app, but also the other applications in
 our portfoleo which share common core business logic.
 
 For reference on previous discussions:
 http://tapestry.1045711.n5.nabble.com/Java-based-spring-configuration-td3394086.html
 http://tapestry.1045711.n5.nabble.com/Discussion-td2421783i20.html
 
 Now, I've tried running the tapestry quickstart app in glassfish 3.1
 (with
 the eclipse connector for publishing).
 This works ok - although I cannot make live class reloading work. :(
 
 Glassfish uses Weld, so the CDIModule is basically an objectprovider
 for
 injecting Weld managed beans.
 (As you probably know CDI/Weld can also be used outside jee as
 alternative
 to tapestry-ioc, spring, etc)
 
 *CDIModule class*
 *public class CDIModule { *
 * public static void bind(ServiceBinder binder) {*
 *binder.bind(ObjectProvider.class,
 CDIObjectProvider.class).withId(CDIObjectProvider);*
 *} *
 * public static BeanManager buildBeanManager(Logger log) { *
 * try {*
 * BeanManager beanManager = (BeanManager) new
 InitialContext().lookup(java:comp/BeanManager);*
 * return beanManager; *
 * } catch (NamingException e) {*
 * log.error(Could not lookup jndi resource: java:comp/BeanManager,
 e);*
 * }*
 * return null;*
 * } *
 * public static void contributeMasterObjectProvider(*
 * @InjectService(CDIObjectProvider) ObjectProvider cdiProvider,*
 * OrderedConfigurationObjectProvider configuration) { *
 *// configuration.add(cdiProvider, cdiProvider,
 after:Service,after:AnnotationBasedContributions,after:Alias,after:Autobuild);
 *
 * configuration.add(cdiProvider, cdiProvider, after:*); *
 * } *
 *}*
 *
 *
 The beanmanager is expected to be found in jndi. If the beans.xml is
 present
 it will be available at this point.
 The BeanManager is also exposed as a service and injectable for other
 services or components.
 I've tested by adding the *@SubModule(CDIModule.class) *to my
 quickstart
 appmodule.
 *
 *
 *CDIObjectProvider class*
 *public class CDIObjectProvider implements ObjectProvider { *
 * private BeanManager beanManager;*
 * private Logger log;*
 * *
 * @SuppressWarnings({ unchecked, rawtypes })*
 * private Set allowedScopes = CollectionFactory.newSet(*
 * ApplicationScoped.class,*
 * Singleton.class);*
 *
 *
 * public CDIObjectProvider(*
 * Logger log,*
 * @InjectService(BeanManager) BeanManager manager) {*
 * this.beanManager = manager;*
 * this.log = log;*
 * }*
 * @SuppressWarnings(unchecked)*
 * public T T provide(ClassT objectType,*
 * AnnotationProvider annotationProvider, ObjectLocator locator) {*
 * SetBean? beans =  beanManager.getBeans(objectType);*
 * if(beans!=null  beans.size()0) {*
 * BeanT bean = (BeanT) beans.iterator().next(); *
 * if(hasValidScope(bean)) {*
 * CreationalContextT ctx =
 beanManager.createCreationalContext(bean);*
 * T o = (T) beanManager.getReference(bean, objectType, ctx); *
 

Re: How to get a lot of data in to highcharts?

2013-03-09 Thread Shing Hing Man

I have an example that builds the entire  JSONObject in Java.


http://lombok.demon.co.uk/tapestry5Demo/test/highcharts/hcdemotwosource


Th following specifies  part of the chart in Javascript and part of the charts 
in Java. 


http://lombok.demon.co.uk/tapestry5Demo/test/highcharts/hcdemothree



Shing 
 
- Original Message -
From: Jay Ginete killer.tila...@gmail.com
To: Tapestry users users@tapestry.apache.org
Cc: 
Sent: Saturday, March 9, 2013 10:01 PM
Subject: Re: How to get a lot of data in to highcharts?

On 3/10/2013 5:40 AM, George Ludwig wrote:
 I've been reviewing the tapestry5/highcharts integration code, and I see
 that the data for the charts has been hardcoded in to a javascript file.

 What is the best way to display a lot of data from the server? For example,
 I have a series with hundreds or thousands of data points, and I need to
 calculate them on the server, and somehow get them in to highcharts.

 I haven't done a lot of work with Tapestry's javascript support, so forgive
 me if this is obvious...

 -George

Write a public function that returns a JSONObject 
(http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/json/JSONObject.html)
 
in the page class.

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

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



Re: How to get a lot of data in to highcharts?

2013-03-09 Thread George Ludwig
@Shing: Thanks that's super helpful!!


On Sat, Mar 9, 2013 at 3:10 PM, Shing Hing Man mat...@yahoo.com wrote:


 I have an example that builds the entire  JSONObject in Java.


 http://lombok.demon.co.uk/tapestry5Demo/test/highcharts/hcdemotwosource


 Th following specifies  part of the chart in Javascript and part of the
 charts in Java.


 http://lombok.demon.co.uk/tapestry5Demo/test/highcharts/hcdemothree



 Shing

 - Original Message -
 From: Jay Ginete killer.tila...@gmail.com
 To: Tapestry users users@tapestry.apache.org
 Cc:
 Sent: Saturday, March 9, 2013 10:01 PM
 Subject: Re: How to get a lot of data in to highcharts?

 On 3/10/2013 5:40 AM, George Ludwig wrote:
  I've been reviewing the tapestry5/highcharts integration code, and I see
  that the data for the charts has been hardcoded in to a javascript file.
 
  What is the best way to display a lot of data from the server? For
 example,
  I have a series with hundreds or thousands of data points, and I need to
  calculate them on the server, and somehow get them in to highcharts.
 
  I haven't done a lot of work with Tapestry's javascript support, so
 forgive
  me if this is obvious...
 
  -George
 
 Write a public function that returns a JSONObject
 (
 http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/json/JSONObject.html
 )
 in the page class.

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

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




Re: First stab at CDI module for tapestry

2013-03-09 Thread Kalle Korhonen
Both of these seem to be about referencing and using CDI managed beans in
Tapestry services, please correct me if I'm wrong. What I'm asking is the
reverse - using Tapestry services in applications  frameworks expecting a
CDI environment.

Kalle


On Sat, Mar 9, 2013 at 3:41 PM, Lenny Primak lpri...@hope.nyc.ny.us wrote:

 Actually, the CDI SPI statement may not be accurate.
 CDI support uses BeanManager to do its job, so its CDI SPI.  Not sure,
 Kalle, if that's what you are referring to.


 http://code.google.com/p/flowlogix/source/browse/tapestry-services/src/main/java/com/flowlogix/web/services/CDIModule.java

 On Mar 9, 2013, at 5:56 PM, Lenny Primak wrote:

  I would love to contribute the FlowLogix module, or as much of it as it
 still applies to tapestry 5.4 into the core. It includes CDI support plus
 the JEE stack support.
  The CDI interface doesn't use SPI yet.
 
 
 
  On Mar 9, 2013, at 5:34 PM, Kalle Korhonen kalle.o.korho...@gmail.com
 wrote:
 
  Hey Magnus,
 
  as part of your tapestry-cdi work, did you look into implementing a
  Tapestry CDI SPI, i.e. an implementation of
  javax.enterprise.inject.spi.BeanManager? This is related to my earlier
  thread about injectable entitylisteners (
 
 http://mail-archives.apache.org/mod_mbox/tapestry-dev/201210.mbox/%3CCA+=ewnb+tjv01fiyzsded3u5iyop3wcf1r3prhqtdjrm7ix...@mail.gmail.com%3E
 ).
  JPA 2.1 is required the check the SPI (see
  http://java.dzone.com/articles/cdi-extensions-you-can-build,
  http://java.net/downloads/jpa-spec/JavaPersistencePFD.pdf,
 
 http://stackoverflow.com/questions/12951701/how-to-get-entity-manager-or-transaction-in-jpa-listener
 ,
 
 http://stackoverflow.com/questions/11740322/cdi-injection-is-not-working-in-servlets
 ).
  The CDI is a solid spec, we should start thinking about offering
  tapestry-cdi or similar as a core Tapestry module.
 
  Kalle
 
 
  On Thu, Aug 18, 2011 at 11:59 AM, Magnus Kvalheim mag...@kvalheim.dk
 wrote:
 
  Yes, I've noticed. Great work Igor :)
 
  I've intentionally not done anything for tapestry-cdi in terms of
  supporting
  javax.inject.@Inject.
 
  As Tap @inject and javax @inject are interchangeable - cdi bean
 injection
  with either @inject should 'just work' with tapestry-cdi and T5.3 :)
 
  On Thu, Aug 18, 2011 at 12:56 PM, Igor Drobiazko
  igor.drobia...@gmail.comwrote:
 
  Just as a side note: starting with T5.3 it's possible to use JSR 330
 for
  injection.
 
  Check this out:
  http://tapestry.apache.org/using-jsr-330-standard-annotations.html
 
  On Wed, Jun 8, 2011 at 1:56 PM, Magnus Kvalheim mag...@kvalheim.dk
  wrote:
 
  Hi all,
 
  We're looking into moving our apps from a 'traditional' servlet
  container
  with spring into a Java EE web profile server like glassfish 3.1.
  Motivations for doing this is to utilize cdi(jsr 299, 330), ejb3 and
  more.
  Not just for the tapestry app, but also the other applications in
  our portfoleo which share common core business logic.
 
  For reference on previous discussions:
 
 http://tapestry.1045711.n5.nabble.com/Java-based-spring-configuration-td3394086.html
  http://tapestry.1045711.n5.nabble.com/Discussion-td2421783i20.html
 
  Now, I've tried running the tapestry quickstart app in glassfish 3.1
  (with
  the eclipse connector for publishing).
  This works ok - although I cannot make live class reloading work. :(
 
  Glassfish uses Weld, so the CDIModule is basically an objectprovider
  for
  injecting Weld managed beans.
  (As you probably know CDI/Weld can also be used outside jee as
  alternative
  to tapestry-ioc, spring, etc)
 
  *CDIModule class*
  *public class CDIModule { *
  * public static void bind(ServiceBinder binder) {*
  *binder.bind(ObjectProvider.class,
  CDIObjectProvider.class).withId(CDIObjectProvider);*
  *} *
  * public static BeanManager buildBeanManager(Logger log) { *
  * try {*
  * BeanManager beanManager = (BeanManager) new
  InitialContext().lookup(java:comp/BeanManager);*
  * return beanManager; *
  * } catch (NamingException e) {*
  * log.error(Could not lookup jndi resource: java:comp/BeanManager,
  e);*
  * }*
  * return null;*
  * } *
  * public static void contributeMasterObjectProvider(*
  * @InjectService(CDIObjectProvider) ObjectProvider cdiProvider,*
  * OrderedConfigurationObjectProvider configuration) { *
  *// configuration.add(cdiProvider, cdiProvider,
 
 after:Service,after:AnnotationBasedContributions,after:Alias,after:Autobuild);
  *
  * configuration.add(cdiProvider, cdiProvider, after:*); *
  * } *
  *}*
  *
  *
  The beanmanager is expected to be found in jndi. If the beans.xml is
  present
  it will be available at this point.
  The BeanManager is also exposed as a service and injectable for other
  services or components.
  I've tested by adding the *@SubModule(CDIModule.class) *to my
  quickstart
  appmodule.
  *
  *
  *CDIObjectProvider class*
  *public class CDIObjectProvider implements ObjectProvider { *
  * private BeanManager beanManager;*
  * private Logger