Re: How to provide a tapestry method to be access from another application?

2019-09-04 Thread Qbyte Consulting
Another approach is to export the logic of the login process to a separate 
service and have both client applications call it.

John

Sent from my iPhone

> On 5 Sep 2019, at 02:27, Rbsn Lbk  wrote:
> 
> Hi,
> 
> I have developed a Tapestry application. Inside of that application I have
> a method that process the login. I would to access/call this method from
> another non-tapestry application.
> 
> I've tried to access the method via ajax, exactly the way I would access
> from inside of the tapestry application. The issue is, tapestry does not
> recognize the request as ajax. Any idea how to solve this?
> 
> Thanks a lot for your help.

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



Re: Jetbrains considers to deprecate Tapestry plugin in IntelliJ 2019.3

2019-07-10 Thread Qbyte Consulting
Good grief, not this again.

Tapestry is a great choice where the developer has java skills (it works quite 
well with Scala too) and doesn’t want to spend hundreds of hours gaining 
proficiency in a java script framework (that change every few years) and where 
there isn’t budget or requirements to develop an API.

A JavaScript centric framework is fine for enterprises that have teams of 
backend and front end devs. This approach is not suitable for all scenarios.

John

Sent from my iPhone

> On 4 Jul 2019, at 17:05, Emmanuel Sowah  wrote:
> 
> Lance,
> 
> I am not hating Tapestry, I am only a messenger preaching the good news
> that the world has moved on and left behind antiquated frameworks like
> Tapestry. Even the founder, Howard Lewis Ship, the captain of this Tapestry
> ship, has long left this sinking ship. He is now using other better and
> modern frameworks. Damn, he even used Wicket on his client's project.
> I am not surprised Tapestry cult followers like you always want to
> persecute the messenger by calling me names. I am sure you would thank me
> in the future for opening your eyes.
> 
> On Tue, Jul 2, 2019 at 11:04 PM Lance Java
>  wrote:
> 
>> Emmanuel Sowah - I think you deserve some form of long service award.
>> You've been hating on Tapestry for over 13 years now. Way to hold a grudge
>> dude!
>> 
>> https://wiki.apache.org/tapestry/Tapestry5Trolls
>> 
>>> On Wed, 19 Jun 2019, 10:18 am Emmanuel Sowah,  wrote:
>>> 
>>> Of course it's understandable that they are going to deprecate it. What
>>> kind of creatures are you still stuck to a failed and stone-age framework
>>> like Tapestry? Even the original creator, Howard Lewis Ship, has
>> abandoned
>>> it for better frameworks like React, Angular and Wicket. Guys, wake up
>> and
>>> stop wasting your time.
>>> 
>>> On Tue, Jun 18, 2019 at 10:46 PM Nicolas Bouillon 
>>> wrote:
>>> 
 Hi,
 
 Not sure if many of you are using the Tapestry plugins of IntellJ
>>> Ultimate.
 
 I do and it's very handy to navigate fastly between components and for
>>> code
 completion in templates.
 
 
 
>>> 
>> https://blog.jetbrains.com/idea/2019/06/plugin-deprecations-in-intellij-idea-v2019-2/
 
 Tapestry is my favorite framework, and I haven't found any replacement
>>> with
 the killing features such as Live Class Reloading (natively) and
>>> excellent
 error reporting.
 
 Keep up the good work.
 
 Nicolas.
 
>>> 
>> 

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



Apache site rendering on mobile browser

2019-07-04 Thread Qbyte Consulting
Both my mobile chrome and safari render the apache tapestry pages down the left 
margin while menu bar separators spread across the top?

https://tapestry.apache.org/modules.html



Not creating a good impression. Is that apache sites fault or maintained by 
tapestry group?

John 

Sent from my iPhone

Re: Jetbrains considers to deprecate Tapestry plugin in IntelliJ 2019.3

2019-06-19 Thread Qbyte Consulting
React repeats the same sins as JSP by mixing code and presentation. A problem 
tapestry addressed. Its kind of strange seeing this JSP age issue afflict those 
“better frameworks”.

I’d also wager a SPA could be developed more quickly in tapestry than with any 
JS framework plus an API. Then there there’s also the fact that tapestry apps 
can be developed by any Java developer without a need for much additional JS 
expertise.

Can’t really compare apples and oranges.

John

Sent from my iPhone

> On 19 Jun 2019, at 16:18, Emmanuel Sowah  wrote:
> 
> Of course it's understandable that they are going to deprecate it. What
> kind of creatures are you still stuck to a failed and stone-age framework
> like Tapestry? Even the original creator, Howard Lewis Ship, has abandoned
> it for better frameworks like React, Angular and Wicket. Guys, wake up and
> stop wasting your time.
> 
> On Tue, Jun 18, 2019 at 10:46 PM Nicolas Bouillon 
> wrote:
> 
>> Hi,
>> 
>> Not sure if many of you are using the Tapestry plugins of IntellJ Ultimate.
>> 
>> I do and it's very handy to navigate fastly between components and for code
>> completion in templates.
>> 
>> 
>> https://blog.jetbrains.com/idea/2019/06/plugin-deprecations-in-intellij-idea-v2019-2/
>> 
>> Tapestry is my favorite framework, and I haven't found any replacement with
>> the killing features such as Live Class Reloading (natively) and excellent
>> error reporting.
>> 
>> Keep up the good work.
>> 
>> Nicolas.
>> 

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



Re: Jetty not reloading

2018-11-28 Thread Qbyte Consulting
So it turns out IntelliJ doesn’t copy resources to the target folder. Gotta do 
a mvn compile.

Sent from my iPhone

> On 28 Nov 2018, at 15:34, Mats Andersson  wrote:
> 
> Usually tapestry.production-mode is used to check for updates less often so 
> how can that help?
> 
> Maybe tapestry.file-check-interval is defined somewhere? Default is 1s which 
> should be enough in development. Also, make sure resources are actually 
> copied to the target directory when they are changed in the souce. This is 
> needed to make Tapestry aware of changes.
> 
> 
> /Mats
> 
> 
>> On 2018-11-28 09:09, Dmitry Gusev wrote:
>> Hi!
>> 
>> Make sure you have tapestry.production-mode=true set in one of your
>> tapestry modules, or set in the system properties section in your pom.xml.
>> 
>> Execution mode only specifies a list of additional tapestry modules
>> (usually just one) for runtime configuration.
>> 
>> On Wed, Nov 28, 2018 at 6:12 AM Qbyte Consulting 
>> wrote:
>> 
>>> I’m finding resources are not dynamically reloading. Jetty config below,
>>> what do I need to do?
>>> 
>>> 
>>> 
>>> org.eclipse.jetty
>>> jetty-maven-plugin
>>> 9.2.0.M0
>>> 
>>> 
>>> 9095
>>> 
>>> 
>>> 
>>> 
>>> tapestry.execution-mode
>>> 
>>> development
>>> 
>>> 
>>> 
>>> version
>>> 
>>> ${project.version}
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Sent from my iPhone
>>> -
>>> 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
> 

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



Jetty not reloading

2018-11-27 Thread Qbyte Consulting
I’m finding resources are not dynamically reloading. Jetty config below, what 
do I need to do?



org.eclipse.jetty
jetty-maven-plugin
9.2.0.M0


9095




tapestry.execution-mode

development


version

${project.version}







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



Re: QuickStart

2018-11-26 Thread Qbyte Consulting
I was recently working on a project with React components connected to 
controllers in C# to provide the API for the back end. Development is slow and 
tedious because there’s lots of boilerplate code, although there is the benefit 
of some component reuse.

Looking at the react components reminded me somewhat of the bad old days of 
JSP, because they build the markup structure inside code rather than have it 
all in a separate markup template. It’s simply not as good as tapestry 
components.

Sometimes the “new” way is still the old way.

Sent from my iPhone

> On 27 Nov 2018, at 03:06, Emmanuel Sowah  wrote:
> 
> Thiago,
> 
> It seems you cannot read English. I was suggesting Angular and Spring
> backend services being exposed via Rest to the Angular. It's seems all you
> know is Tapestry and nothing else. The world is bigger than Tapestry, boy;-)
> 
> On Mon, Nov 26, 2018 at 8:52 PM Thiago H. de Paula Figueiredo <
> thiag...@gmail.com> wrote:
> 
>>> On Mon, Nov 26, 2018 at 6:24 AM Emmanuel Sowah  wrote:
>>> 
>>> There we go again. Instead of engaging in constructive arguments, you
>>> behave like a child with comments like "Don't feed the trolls". Pathetic.
>>> 
>> 
>> Replacing a mostly-server-side framework with a JavaScript client-side
>> library isn't what I'd call a constructive argument.
>> 
>> And we know Emmanuel Sowah is an old, low-quality troll. He used to suggest
>> Apache Wicket (which is a nice framework, by the way, but I'm partial to
>> Tapestry, of course, hehehe) and is now suggesting Spring? Weird turn of
>> events. But yet a low-quality troll. Good ones have good arguments and make
>> tough questions.
>> 
>> 
>>> 
>>> On Mon, Nov 26, 2018 at 9:21 AM Juicy Cocktail >> 
>>> wrote:
>>> 
>>>> Here is something I throw at you: 🥗🍕
>>>> 
>>>> Best Regards,
>>>> Rafael
>>>> 
>>>> P.S. Don’t feed the trolls.
>>>> 
>>>> 
>>>>> On Nov 26, 2018, at 9:17 AM, Emmanuel Sowah 
>> wrote:
>>>>> 
>>>>> But is web application framework not an overkill for this small
>>>> application
>>>>> you are building? Something you could quickly do with Angular in a
>> more
>>>>> efficient way.
>>>>> 
>>>>> On Mon, Nov 26, 2018 at 9:12 AM Qbyte Consulting <
>>>> qbyteconsult...@gmail.com>
>>>>> wrote:
>>>>> 
>>>>>> Setting up a tapestry project for building a trivial webapp for back
>>>>>> office data entry is still very efficient.
>>>>>> 
>>>>>> Angular is a glorified java script library, not a web application
>>>>>> framework.
>>>>>> 
>>>>>> Sent from my iPhone
>>>>>> 
>>>>>>> On 26 Nov 2018, at 14:09, Emmanuel Sowah  wrote:
>>>>>>> 
>>>>>>> Dude,
>>>>>>> 
>>>>>>> Really setting up tapestry for a new project? Are you out of your
>>> mind?
>>>>>>> Tapestry is a dying project, even it's founder Howard Lewis Ship
>> has
>>>>>>> abandoned his ship long ago and jumped onto another modern
>> framework.
>>>>>>> Pickup Angular or another modern framework for your new project.
>>>>>>> Cheers.
>>>>>>> 
>>>>>>> On Mon, Nov 26, 2018 at 6:53 AM Qbyte Consulting <
>>>>>> qbyteconsult...@gmail.com>
>>>>>>> wrote:
>>>>>>> 
>>>>>>>> Hi,
>>>>>>>> 
>>>>>>>> I’m trying to setup a bare bones tapestry project in maven 3.
>>>>>>>> 
>>>>>>>> Can anyone point me an example how to do that please?
>>>>>>>> 
>>>>>>>> John
>>>>>>>> 
>>>>>>>> Sent from my iPhone
>>>>>>>> 
>>> -
>>>>>>>> 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
>>>>>> 
>>>>>> 
>>>> 
>>>> 
>>>> -
>>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>> 
>>>> 
>>> 
>> 
>> 
>> --
>> Thiago
>> 

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



Re: QuickStart

2018-11-26 Thread Qbyte Consulting
Setting up a tapestry project for building a trivial webapp for back office 
data entry is still very efficient.

Angular is a glorified java script library, not a web application framework.

Sent from my iPhone

> On 26 Nov 2018, at 14:09, Emmanuel Sowah  wrote:
> 
> Dude,
> 
> Really setting up tapestry for a new project? Are you out of your mind?
> Tapestry is a dying project, even it's founder Howard Lewis Ship has
> abandoned his ship long ago and jumped onto another modern framework.
> Pickup Angular or another modern framework for your new project.
> Cheers.
> 
> On Mon, Nov 26, 2018 at 6:53 AM Qbyte Consulting 
> wrote:
> 
>> Hi,
>> 
>> I’m trying to setup a bare bones tapestry project in maven 3.
>> 
>> Can anyone point me an example how to do that please?
>> 
>> John
>> 
>> Sent from my iPhone
>> -
>> 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



QuickStart

2018-11-25 Thread Qbyte Consulting
Hi,

I’m trying to setup a bare bones tapestry project in maven 3.

Can anyone point me an example how to do that please?

John

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



problems with Tapestry 5.4.3+JPA and jetty plugin

2017-11-18 Thread Qbyte Consulting
Hi,

I can run my app better with glassfish but get problems with the postgres
driver.

With Jetty I get this below, any ideas please?

John

[INFO] --- jetty-maven-plugin:9.2.0.M0:run (default-cli) @ AuditServices ---
[INFO] Logging initialized @2422ms
[INFO] Configuring Jetty for project: Audit Services
[INFO] webAppSourceDirectory not set. Trying src\main\webapp
[INFO] Reload Mechanic: automatic
[INFO] Classes = D:\Temp\colemanj\workspace\AuditServices\target\classes
[INFO] Context path = /
[INFO] Tmp directory = D:\Temp\colemanj\workspace\AuditServices\target\tmp
[INFO] Web defaults = org/eclipse/jetty/webapp/webdefault.xml
[INFO] Web overrides =  none
[INFO] web.xml file =
file:/D:/Temp/colemanj/workspace/AuditServices/src/main/we
bapp/WEB-INF/web.xml
[INFO] Webapp directory =
D:\Temp\colemanj\workspace\AuditServices\src\main\weba
pp
[INFO] jetty-9.2.0.M0
[INFO] Warning: No org.apache.tomcat.JarScanner set in ServletContext.
Falling b
ack to default JarScanner implementation.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further
detail
s.
[WARNING] Failed startup of context o.e.j.m.p.JettyWebAppContext@e22d35
{/AuditSe
rvices,file:/D:/Temp/colemanj/workspace/AuditServices/src/main/webapp/,STARTING}
{file:/D:/Temp/colemanj/workspace/AuditServices/src/main/webapp/}
java.lang.RuntimeException: Error invoking service binder method
epulse.audit.ma
nager.services.AppModule.bind(ServiceBinder) (at AppModule.java:68): class
"java
x.persistence.TupleElement"'s signer information does not match signer
informati
on of other classes in the same package
at
org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.bind(DefaultMo
duleDefImpl.java:624)
at
org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.(Default
ModuleDefImpl.java:148)
at
org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:123
)
at
org.apache.tapestry5.internal.TapestryAppInitializer.(TapestryA
ppInitializer.java:115)
at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:95)
at
org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:1
37)
at
org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.ja
va:817)


Re: problems with JPA and tapestry 5.4.0

2017-11-12 Thread Qbyte Consulting

When I update to 5.4.3 and host on GlassFish the app stalls because it can’t 
find the Postgres driver. This is odd because I provide a jdbc4 driver. Anyway 
I will copy it to the glassfish modules directory and see what happens. This 
same build still fails on jetty:run.

A completely different problem I also dont understand.

John

Sent from my iPhone

> On 12 Nov 2017, at 21:26, Cezary Biernacki  wrote:
> 
> I don't use JPA so I don't have a solution, but in your stack trace most
> notable is root exception "java.lang.NoSuchMethodError". Usually such
> exception indicates that an incorrect version of a class is on the class
> path. This can happen if you have two different JARs of the same library is
> on the class path or if dependencies were not upgraded. E.g. you changed
> Tapestry version from 5.3.6 to 5.4.0 and forgot to clean your output
> directory so old versions are still included (if your build scripts are not
> clever enough to remove unused dependencies) or you forgot to upgrade all
> dependencies. So ensure that tapestry-jpa and other related libraries are
> appropriate for Tapestry 5.4.0 and each library appears only once.
> 
> Cezary
> 
> 
> On Sun, Nov 12, 2017 at 5:37 AM, Qbyte Consulting > wrote:
> 
>> I just started using Tapestry 5.4.0 on a project that uses tapestry-jpa.
>> The project worked fine with 5.3.6 tapestry but the JPA fails under 5.4.0.
>> 
>> Any ideas?
>> 
>> John
>> 
>> 
>> Info:   [ERROR] ioc.Registry Error invoking service contribution method
>> org.apache.tapestry5.jpa.JpaModule.provideObjectProviders(
>> OrderedConfiguration):
>> org.apache.tapestry5.plastic.PlasticManager.createProxy(
>> Ljava/lang/Class;Ljava/lang/Class;Lorg/apache/tapestry5/plastic/
>> PlasticClassTransformer;)Lorg/apache/tapestry5/plastic/ClassInstantiator;
>> Info:   [ERROR] ioc.Registry Operations trace:
>> Info:   [ERROR] ioc.Registry [ 1] Realizing service
>> ServletApplicationInitializer
>> Info:   [ERROR] ioc.Registry [ 2] Instantiating service
>> ServletApplicationInitializer implementation via
>> org.apache.tapestry5.services.TapestryModule.
>> buildServletApplicationInitializer(Logger,
>> List, ApplicationInitializer) (at TapestryModule.java:1396)
>> Info:   [ERROR] ioc.Registry [ 3] Constructing module class
>> org.apache.tapestry5.services.TapestryModule
>> Info:   [ERROR] ioc.Registry [ 4] Determining injection value for parameter
>> #1 (org.apache.tapestry5.ioc.services.PipelineBuilder)
>> Info:   [ERROR] ioc.Registry [ 5] Realizing service MasterObjectProvider
>> Info:   [ERROR] ioc.Registry [ 6] Instantiating service
>> MasterObjectProvider implementation via
>> org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl(List,
>> OperationTracker) (at MasterObjectProviderImpl.java:33) via
>> org.apache.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder)
>> (at
>> TapestryIOCModule.java:49)
>> Info:   [ERROR] ioc.Registry [ 7] Creating plan to instantiate
>> org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl via
>> public
>> org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl(java.
>> util.List,org.apache.tapestry5.ioc.OperationTracker)
>> Info:   [ERROR] ioc.Registry [ 8] Determining injection value for parameter
>> #1 (java.util.List)
>> Info:   [ERROR] ioc.Registry [ 9] Collecting ordered configuration for
>> service MasterObjectProvider
>> Info:   [ERROR] ioc.Registry [10] Invoking
>> org.apache.tapestry5.jpa.JpaModule.provideObjectProviders(
>> OrderedConfiguration)
>> (at JpaModule.java:105)
>> Info:   [ERROR] TapestryIOCModule.MasterObjectProvider Construction of
>> service MasterObjectProvider failed: Error invoking service contribution
>> method
>> org.apache.tapestry5.jpa.JpaModule.provideObjectProviders(
>> OrderedConfiguration):
>> org.apache.tapestry5.plastic.PlasticManager.createProxy(
>> Ljava/lang/Class;Ljava/lang/Class;Lorg/apache/tapestry5/plastic/
>> PlasticClassTransformer;)Lorg/apache/tapestry5/plastic/ClassInstantiator;
>> org.apache.tapestry5.ioc.internal.OperationException: Error invoking
>> service contribution method
>> org.apache.tapestry5.jpa.JpaModule.provideObjectProviders(
>> OrderedConfiguration):
>> 
>> ...
> 
>> ... 147 more
>> Caused by: java.lang.NoSuchMethodError:
>> org.apache.tapestry5.plastic.PlasticManager.createProxy(
>> Ljava/lang/Class;Ljava/lang/Class;Lorg/apache/tapestry5/plastic/
>> PlasticClassTransformer;)Lorg/apache/tapestry5/plastic/ClassInstantiator;
>> at
>> org.apache.tapestry5.ioc.internal.services.PlasticProxyFactoryImpl.
>> createProxy(PlasticP
>> Severe:   WebModule[/AuditServices]Exception starting filter app
>> java.lang.InstantiationException
>> 

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



problems with JPA and tapestry 5.4.0

2017-11-11 Thread Qbyte Consulting
I just started using Tapestry 5.4.0 on a project that uses tapestry-jpa.
The project worked fine with 5.3.6 tapestry but the JPA fails under 5.4.0.

Any ideas?

John


Info:   [ERROR] ioc.Registry Error invoking service contribution method
org.apache.tapestry5.jpa.JpaModule.provideObjectProviders(OrderedConfiguration):
org.apache.tapestry5.plastic.PlasticManager.createProxy(Ljava/lang/Class;Ljava/lang/Class;Lorg/apache/tapestry5/plastic/PlasticClassTransformer;)Lorg/apache/tapestry5/plastic/ClassInstantiator;
Info:   [ERROR] ioc.Registry Operations trace:
Info:   [ERROR] ioc.Registry [ 1] Realizing service
ServletApplicationInitializer
Info:   [ERROR] ioc.Registry [ 2] Instantiating service
ServletApplicationInitializer implementation via
org.apache.tapestry5.services.TapestryModule.buildServletApplicationInitializer(Logger,
List, ApplicationInitializer) (at TapestryModule.java:1396)
Info:   [ERROR] ioc.Registry [ 3] Constructing module class
org.apache.tapestry5.services.TapestryModule
Info:   [ERROR] ioc.Registry [ 4] Determining injection value for parameter
#1 (org.apache.tapestry5.ioc.services.PipelineBuilder)
Info:   [ERROR] ioc.Registry [ 5] Realizing service MasterObjectProvider
Info:   [ERROR] ioc.Registry [ 6] Instantiating service
MasterObjectProvider implementation via
org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl(List,
OperationTracker) (at MasterObjectProviderImpl.java:33) via
org.apache.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder) (at
TapestryIOCModule.java:49)
Info:   [ERROR] ioc.Registry [ 7] Creating plan to instantiate
org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl via
public
org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl(java.util.List,org.apache.tapestry5.ioc.OperationTracker)
Info:   [ERROR] ioc.Registry [ 8] Determining injection value for parameter
#1 (java.util.List)
Info:   [ERROR] ioc.Registry [ 9] Collecting ordered configuration for
service MasterObjectProvider
Info:   [ERROR] ioc.Registry [10] Invoking
org.apache.tapestry5.jpa.JpaModule.provideObjectProviders(OrderedConfiguration)
(at JpaModule.java:105)
Info:   [ERROR] TapestryIOCModule.MasterObjectProvider Construction of
service MasterObjectProvider failed: Error invoking service contribution
method
org.apache.tapestry5.jpa.JpaModule.provideObjectProviders(OrderedConfiguration):
org.apache.tapestry5.plastic.PlasticManager.createProxy(Ljava/lang/Class;Ljava/lang/Class;Lorg/apache/tapestry5/plastic/PlasticClassTransformer;)Lorg/apache/tapestry5/plastic/ClassInstantiator;
org.apache.tapestry5.ioc.internal.OperationException: Error invoking
service contribution method
org.apache.tapestry5.jpa.JpaModule.provideObjectProviders(OrderedConfiguration):
org.apache.tapestry5.plastic.PlasticManager.createProxy(Ljava/lang/Class;Ljava/lang/Class;Lorg/apache/tapestry5/plastic/PlasticClassTransformer;)Lorg/apache/tapestry5/plastic/ClassInstantiator;
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.OperationTrackerImpl.run(OperationTrackerImpl.java:47)
at
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.run(PerThreadOperationTracker.java:76)
at
org.apache.tapestry5.ioc.internal.RegistryImpl.addToOrderedConfiguration(RegistryImpl.java:629)
at
org.apache.tapestry5.ioc.internal.RegistryImpl.getOrderedConfiguration(RegistryImpl.java:483)
at
org.apache.tapestry5.ioc.internal.ServiceResourcesImpl$2.invoke(ServiceResourcesImpl.java:110)
at
org.apache.tapestry5.ioc.internal.ServiceResourcesImpl$2.invoke(ServiceResourcesImpl.java:107)
at
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74)
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.ServiceResourcesImpl.getOrderedConfiguration(ServiceResourcesImpl.java:105)
at
org.apache.tapestry5.ioc.internal.AbstractServiceCreator.getOrderedConfiguration(AbstractServiceCreator.java:123)
at
org.apache.tapestry5.ioc.internal.AbstractServiceCreator.access$200(AbstractServiceCreator.java:35)
at
org.apache.tapestry5.ioc.internal.AbstractServiceCreator$1.findResource(AbstractServiceCreator.java:103)
at
org.apache.tapestry5.ioc.internal.util.DelegatingInjectionResources.findResource(DelegatingInjectionResources.java:38)
at
org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateInjection(InternalUtils.java:231)
at
org.apache.tapestry5.ioc.internal.util.InternalUtils.access$000(InternalUtils.java:50)
at
org.apache.tapestry5.ioc.internal.util.InternalUtils$4.invoke(InternalUtils.java:289)
at
org.apache.tapestry5.ioc.internal.util.InternalUtils$4.invoke(InternalUtils.java:286)
at
org.apache.tapestry5.ioc.internal.OperationTrackerImp

Sign in with Facebook component

2017-01-02 Thread Qbyte Consulting
I'd like to add a sign in/register with Facebook type component to my apps 
login page.

Has anyone created such a component and/or able to shed light?

John

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



Re: Tapestry w Scala

2016-12-16 Thread Qbyte Consulting
Thank you Thiago.

I found that project and it has been very useful for creating my own.

The only trouble I've had so far is delivering Scala collections back to pages 
for loop components. I ended up using Java collections in the Scala and that 
works fine.

Sent from my iPhone

> On 16 Dec 2016, at 18:11, Thiago H. de Paula Figueiredo  
> wrote:
> 
> On Fri, Dec 16, 2016 at 6:53 AM, Qbyte Consulting > wrote:
> 
>> Hi,
>> 
> Hi!
> 
> 
>> Has anyone implemented a T5.4 site with Scala, or are there any kickstart
>> type Scala projects out there for T5.4 please? I'd like to see how it's
>> done.
>> 
> 
> Not me, but yes. Christian Köberl wrote a blog post about it,
> https://derkoe.wordpress.com/2011/11/18/tapestry-in-scala/, and also a demo
> project, https://github.com/derkoe/tapestry-scala-demo. It uses Tapestry
> 5.3, but changing the pom.xml to use 5.4.1 should work.
> 
> Tapestry works on class files, not Java sources, so it should just work
> with whatever JVM language as long as it generates class files. It has been
> reported with working with Groovy as well, for example.
> 
> -- 
> Thiago

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



Tapestry w Scala

2016-12-16 Thread Qbyte Consulting
Hi,

Has anyone implemented a T5.4 site with Scala, or are there any kickstart
type Scala projects out there for T5.4 please? I'd like to see how it's
done.

John


Re: WebSocket enpoint as a tapestry service

2016-10-27 Thread Qbyte Consulting
 I'll try tapestry-atmosphere, I had a quick look over demo code and it looks 
slick.

I think this or similar ought to be a core feature or at least a proper 
tapestry sub project. It would definitely make tapestry more appealing for 
today's SPAs and mobile apps.

John 

Sent from my iPhone

> On 27 Oct 2016, at 07:40, Peter Hvass  wrote:
> 
> I've been meaning to have a go with Lance's tapestry-atmosphere - seems
> very straightforward especially for teams with little time to roll their
> own!
> 
> Kalle + Cezary - (if feasible - licenses, projects etc.) would it not be
> worth all of us jumping on Lance's library (for plugging in Atmosphere) and
> possibly submitting patches/fixes so we have one bulletproof and
> fully-featured Tapestrified approach to this?
> 
> Is there an argument that this sort of push-related functionality should be
> built into Tapestry directly for a future version? Push and notifications
> are two headline features for an ever mobile-friendly web..
> 
> Thanks,
> Peter
> On 27 October 2016 at 01:35, Kalle Korhonen 
> wrote:
> 
>> It's relatively simple like Cezary says. The only potential issue is with
>> authenticating JSR 356 websockets, which may require a bit of gymnastics
>> depending on your needs. If you are using sessions, you can fetch
>> underlying (servlet) session from the handshake request (see
>> http://stackoverflow.com/questions/21888425/accessing-servletcontext-and-
>> httpsession-in-onmessage-of-a-jsr-356-serverendpo/27057359).
>> If you are using sessionless authentication (w/ JWT), you can pass the
>> bearer token around in the sub-protocol header,
>> namely Sec-WebSocket-Protocol (see
>> http://stackoverflow.com/questions/22383089/is-it-possible-to-use-bearer-
>> authentication-for-websocket-upgrade-requests/35108078
>> ).
>> 
>> Kalle
>> 
>> On Wed, Oct 26, 2016 at 2:27 PM, Lance Java 
>> wrote:
>> 
>>> There's a chat demo in both tapestry-atmosphere and tapestry-cometd
>>> 
>>> Atmosphere
>>> Demo: http://t5atmosphere-lazan.rhcloud.com/
>>> Source:
>>> https://github.com/uklance/tapestry-atmosphere/tree/
>>> master/tapestry-atmosphere-demo
>>> 
>>> Cometd
>>> Demo: http://t5cometd-lazan.rhcloud.com/chat
>>> Source:
>>> https://github.com/uklance/tapestry-cometd/tree/master/
>>> tapestry-cometd-demo
>>> 
>>> On 26 Oct 2016 7:16 p.m., "Qbyte Consulting" 
>>> wrote:
>>> 
>>>> I want to develop a tapestry chat component that uses a WebSocket to
>>> handle
>>>> real time text messages. I need to integrate so that users can see who
>> is
>>>> logged in to the Tapestry app.
>>>> 
>>>> How would I make a class in a Tapestry app a WS endoint that can also
>>>> access my apps Tapestry services as well as handle the WS client?
>>>> 
>>>> John
>>>> 
>>> 
>> 

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



WebSocket enpoint as a tapestry service

2016-10-26 Thread Qbyte Consulting
I want to develop a tapestry chat component that uses a WebSocket to handle
real time text messages. I need to integrate so that users can see who is
logged in to the Tapestry app.

How would I make a class in a Tapestry app a WS endoint that can also
access my apps Tapestry services as well as handle the WS client?

John


running JS to attach client events to a zones content after it's rendered

2016-10-01 Thread Qbyte Consulting
Hi,

I have a zone with some conditional content so it doesn't appear when the
page is initially loaded but is added later when the zone is rerendered
with a flag set true.

There is a button in the zone that I need to attach jquery events handling
functions too from a module. How do I fire the module function each after
any time the zone is rendered?

John


Re: Password strength ...

2016-10-01 Thread Qbyte Consulting
Tapestry doesn't include this feature.

Just add the script to the page or component concerned along with any other 
requisite markup.

Have a look at mixins, could help do the job.

John

Sent from my iPhone

> On 1 Oct 2016, at 10:16, Juan M Garrido de Paz  
> wrote:
> 
> Hello... does Tapestry have any kind of component or something to show
> password strength besides a password field in a form as you type? A
> progress bar with colours.
> 
> I've been looking for it but didn't find much about it... doing it with
> bootstrap maybe.
> 
> How do you do it? Bootstrap or are there another good possibilities?
> 
> Thank you.

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



Re: tapestry-hibernate + tapestry-cdi

2016-09-23 Thread Qbyte Consulting
Ive been using tapestry jpa on an application that accesses 3 databases, 1 
Postgres and 2 mssql. It's just fine. Surprised tapestry hibernate doesn't 
support this.

Sent from my iPhone

> On 23 Sep 2016, at 09:36, Adam X  wrote:
> 
> Yes, JPA should an option. I don't think foo uses a single hibernate
> annotation and our foo team often brags how they code to the spec :)
> 
> So I will try tapestry-jpa (didn't even know about it). If that
> doesn't solve the problem I will try implementing @Session.
> 
> I may come back with this if I still have problems :)
> 
> On Fri, Sep 23, 2016 at 10:15 AM, Kalle Korhonen
>  wrote:
>> AFAIK, tapestry-hibernate simply doesn't support it. However, is switching
>> to JPA an option? You could still be using Hibernate as the provider.
>> tapestry-jpa merrily supports multi tenancy (and more). If JPA is not an
>> option, I'd look into implementing your own custom @Session - may not be
>> too bad - there isn't that much code in tapestry-hibernate. That would
>> resolve the version mismatch - since Hibernate is pretty finicky about it,
>> you could just build against the version of your choice.
>> 
>> Kalle
>> 
>>> On Fri, Sep 23, 2016 at 1:05 AM, Adam X  wrote:
>>> 
>>> Hi,
>>> 
>>> I have what seems like a major collision problem and don't know how to
>>> solve this. My current architecture is as following:
>>> 
>>> foo
>>> weld
>>> tapestry-cdi
>>> tapestry-core
>>> 
>>> I'd like to have:
>>> 
>>> foo
>>> weld
>>> tapestry-cdi
>>> tapestry-hibernate
>>> 
>>> foo (jar) is a major depenency of my project. It is an internal
>>> company framework which contains all the business logic, services,
>>> daos, etc etc. It it's only dependency is JSR-330 (cdi) as all
>>> services are CDI managed beans. It allows me to easily operate on AWS
>>> cloud (we're using DynamoDB, SNS, S3, IAM) as well as internal
>>> relational db (backed by hibernate). After integrating tapestry-cdi
>>> things work beautifully, as in my page classes I can do things like:
>>> 
>>> @Inject
>>> private TxDynamoDao dao;
>>> 
>>> or even
>>> 
>>> @Inject
>>> private Session session;
>>> 
>>> without tapestry-hibernate at all. In otherwords, my foo dependency
>>> bootstraps hibernate and makes session available to my tapestry app.
>>> 
>>> But now, I want to introduce a separate relational db specific to my
>>> project. Since I thought a lot about on my way to work in recent days,
>>> I expected some sort of collision. Sure enough, merely changing
>>> tapestry-core to tapestry-hibernate in my pom.xml, broke my app as my
>>> foo dependency could no longer bootstrap ITS hibernate. But I think in
>>> the grand schema of things it's a problem I could manage to get fixed
>>> as in the stack trace I noticed things like class not found, so
>>> tapestry-hibernate probably brought in some unwanted dependencies (our
>>> foo uses hibernate 5.0.7 and tapestry-hibernate wants to bring 4.x).
>>> 
>>> But let's assume that we could get past this initial problem. How do I
>>> proceed then? How do I tell Tapestry that:
>>> 
>>> @Inject
>>> private Session session;
>>> 
>>> is a no-no, because it belongs to foo, and rather I'd like to do something
>>> like:
>>> 
>>> @Inject @Named("tapestry-hibernate-session")
>>> private Session session;
>>> 
>>> Adam
>>> 
>>> -
>>> 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
> 

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



Re: tapestry-hibernate + tapestry-cdi

2016-09-23 Thread Qbyte Consulting
What about exclude tapestries default hibernate dependency with Maven exclude?

Sent from my iPhone

> On 23 Sep 2016, at 09:05, Adam X  wrote:
> 
> Hi,
> 
> I have what seems like a major collision problem and don't know how to
> solve this. My current architecture is as following:
> 
> foo
> weld
> tapestry-cdi
> tapestry-core
> 
> I'd like to have:
> 
> foo
> weld
> tapestry-cdi
> tapestry-hibernate
> 
> foo (jar) is a major depenency of my project. It is an internal
> company framework which contains all the business logic, services,
> daos, etc etc. It it's only dependency is JSR-330 (cdi) as all
> services are CDI managed beans. It allows me to easily operate on AWS
> cloud (we're using DynamoDB, SNS, S3, IAM) as well as internal
> relational db (backed by hibernate). After integrating tapestry-cdi
> things work beautifully, as in my page classes I can do things like:
> 
> @Inject
> private TxDynamoDao dao;
> 
> or even
> 
> @Inject
> private Session session;
> 
> without tapestry-hibernate at all. In otherwords, my foo dependency
> bootstraps hibernate and makes session available to my tapestry app.
> 
> But now, I want to introduce a separate relational db specific to my
> project. Since I thought a lot about on my way to work in recent days,
> I expected some sort of collision. Sure enough, merely changing
> tapestry-core to tapestry-hibernate in my pom.xml, broke my app as my
> foo dependency could no longer bootstrap ITS hibernate. But I think in
> the grand schema of things it's a problem I could manage to get fixed
> as in the stack trace I noticed things like class not found, so
> tapestry-hibernate probably brought in some unwanted dependencies (our
> foo uses hibernate 5.0.7 and tapestry-hibernate wants to bring 4.x).
> 
> But let's assume that we could get past this initial problem. How do I
> proceed then? How do I tell Tapestry that:
> 
> @Inject
> private Session session;
> 
> is a no-no, because it belongs to foo, and rather I'd like to do something 
> like:
> 
> @Inject @Named("tapestry-hibernate-session")
> private Session session;
> 
> Adam
> 
> -
> 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: some old criticisms of T5

2016-09-19 Thread Qbyte Consulting
No, HLS replies were spot on. The only irritation I have found with T5 is
some of the default styling that gets added to handle form errors and these
can be overriden with your own css - can be mucky, but works.

On Mon, Sep 19, 2016 at 5:23 PM, Bob Harner  wrote:

> That's a very old article (2009 -- I don't think many users care about
> IE6 redering quirks anymore), but Howard's comments there seem to do a
> pretty good job of explaining where the author is either mistaken or
> misunderstands the constraints and trade-offs involved. A lot of the
> other commenters do likewise. I don't know if there is much more to
> add, is there?
>
> On Mon, Sep 19, 2016 at 11:13 AM, Qbyte Consulting
>  wrote:
> > https://friendlybit.com/html/tapestry-5-and-how-not-to-treat-html/
> >
> > I'm wondering how users would respond to the above. I haven't found these
> > issues a big problem myself, but some of these behaviours are
> problematic,
> > for example someone mentioned the white-space issue recently.
> >
> > John
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


some old criticisms of T5

2016-09-19 Thread Qbyte Consulting
https://friendlybit.com/html/tapestry-5-and-how-not-to-treat-html/

I'm wondering how users would respond to the above. I haven't found these
issues a big problem myself, but some of these behaviours are problematic,
for example someone mentioned the white-space issue recently.

John


Re: WhiteSpace Compress

2016-09-12 Thread Qbyte Consulting
Even if Tapestry emits the white space, the browser will ignore it. You
must use   to include additional spaces, yes?

On Mon, Sep 12, 2016 at 1:28 PM, Lherm Nicolas  wrote:

> Hello,
>
> I read in paragraph http://tapestry.apache.org/component-templates.html $
> Whitespace in Templates , that Tapestry " compressed" the white -spaces.
>
> In my application , I have repeated whitespace and they are reduced to a
> single space character . However, I would like to keep those whitespaces on
> the final rendering.
>
> I try to add at my tml file : xml: space = "preserve " into the 
> however this did not worked .
>
>


best way to rebind events after a zone rerenders

2016-09-06 Thread Qbyte Consulting
Hi,

My zone contents are losing their client side event bindings after being
re-rendered.

Would there be a way to rerun my init modules script (imported by the page)
after a zone is again rendered?

John


Re: Swipe and touch

2016-09-05 Thread Qbyte Consulting
Okay, after splitting my JS up into logical pieces and deploying them using
the module approach I can get jquery mobile to work. Perhaps the loading
times or sequence of script run was breaking things before?

Some trivial behaviours I added to a sidebar including a swipe out:

(function () {
define(["jquery"], function ($) {

$("#go").click(function () {
$("#sidebar").show("fast");
});
$("#stop").click(function () {
$("#sidebar").hide("fast");
});
$("#sidebar").on("swipeleft", function () {
$("#sidebar").hide("slow");
});
});
}).call(this);

My locate module, I couldn't get to drips with the utils url extender so
have coded manually:

(function () {
define(["t5/core/ajax"], function (ajax) {
geoLocate = function (eventLinkURI) {
if (navigator.geolocation) {
navigator.geolocation
.getCurrentPosition(function (position)
{
var geolink = eventLinkURI
+ "?lat=" + position.coords.latitude
+ "&long=" + position.coords.longitude;
ajax(geolink, null);
}, geoError);
}
};
function geoError() {
alert('There was a problem determining your location. Some
features may not be available.');
}
return {
geoLocate: geoLocate
};
});
}).call(this);

I still can't figure out how to access functions defined in modules
directly using onclick= though, any ideas how to export them for direct
client side access?

On Fri, Sep 2, 2016 at 9:49 PM, Qbyte Consulting 
wrote:

> I tried to add jquery mobile to my T5.4 project for swipe but it cracks
> up. Same for angularjs.
>
> Is there additional config required to add js libraries? Since I have
> jquery set up already I figured I could just add the mobile.
>
> Sent from my iPhone
>
> > On 2 Sep 2016, at 19:40, Thiago H de Paula Figueiredo <
> thiag...@gmail.com> wrote:
> >
> >> On Fri, 02 Sep 2016 15:18:24 -0300, Svein-Erik Løken 
> wrote:
> >>
> >> I cannot find any swipe and touch JavaScript library in Tapestry. Are
> there any plans to include one in Tapestry in the future?
> >
> > No, as it's pretty easy to use almost any JS library or framework inside
> Tapestry. ;) :)
> >
> >> If it is - I will use that library now. The Tapestry dev team use to
> find the best library :) It seems that Hammer JS and Touch Swipe are
> popular(?). Any recommendation?
> >
> > I'm sorry, but I haven't used any of them.
> >
> > --
> > 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
> >
>


Re: Swipe and touch

2016-09-02 Thread Qbyte Consulting
I tried to add jquery mobile to my T5.4 project for swipe but it cracks up. 
Same for angularjs.

Is there additional config required to add js libraries? Since I have jquery 
set up already I figured I could just add the mobile.

Sent from my iPhone

> On 2 Sep 2016, at 19:40, Thiago H de Paula Figueiredo  
> wrote:
> 
>> On Fri, 02 Sep 2016 15:18:24 -0300, Svein-Erik Løken  
>> wrote:
>> 
>> I cannot find any swipe and touch JavaScript library in Tapestry. Are there 
>> any plans to include one in Tapestry in the future?
> 
> No, as it's pretty easy to use almost any JS library or framework inside 
> Tapestry. ;) :)
> 
>> If it is - I will use that library now. The Tapestry dev team use to find 
>> the best library :) It seems that Hammer JS and Touch Swipe are popular(?). 
>> Any recommendation?
> 
> I'm sorry, but I haven't used any of them.
> 
> -- 
> 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
> 

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



file upload doesn't set file value

2016-08-31 Thread Qbyte Consulting
Hi,

I'm always finding that file is null for file upload? If I submit the form
without async=true then file value is set and it works.









public void onValidateFromUploadForm() {
if (file != null) {
File copied = new File("./uploads/" + file.getFileName());
file.write(copied);
 } else {
 System.out.println("upload failed");
}
}


Re: how to pass geolocation coords as hidden values in login form

2016-08-31 Thread Qbyte Consulting
How can I trigger the locate function from the component Java after login 
success, what replaces .addScript?

Sent from my iPhone

> On 31 Aug 2016, at 08:07, Chris Poulsen  wrote:
> 
> The javaScriptSupport.addScript is deprectated in 5.4 iirc.
> 
> Instead I would use a module for the locate function, the url can be passed
> as an init parameter to require or stored somewhere in the DOM (the former
> probably makes the most sense in this case.
> 
> Also I would use the tapestry ajax module (
> http://tapestry.apache.org/current/coffeescript/ajax.html) instead of
> $.ajax as that will give you some code that understands the responses that
> tapestry may generate in from an event handler (error screen, additional
> stuff added using ajaxResponseRenderer etc.)
> 
> There is also a helper for adding url parameters (
> http://tapestry.apache.org/current/coffeescript/utils.html)
> 
> -- 
> Chris
> 
> 
> On Wed, Aug 31, 2016 at 1:19 AM, Qbyte Consulting > wrote:
> 
>> I could not get the form method to work, so ended up passing an eventlink
>> url to my javascript and adding parameters to it. Works a treat and simple.
>> 
>>Link link =
>> componentResources.createEventLink("geolocation", null);
>>final String eventLinkURI = link.toAbsoluteURI();
>>ajaxResponseRenderer.addCallback(new JavaScriptCallback()
>> {
>>@Override
>>public void run(JavaScriptSupport javascriptSupport) {
>>javascriptSupport.addScript(
>>"locate('" + eventLinkURI + "');");
>>}
>>});
>> 
>> 
>> function locate(eventLinkURI) {
>>if (navigator.geolocation) {
>>navigator.geolocation
>>.getCurrentPosition(function (position)
>>{
>>var geolink = eventLinkURI
>>+ "?lat=" + position.coords.latitude
>>+ "&long=" + position.coords.longitude;
>>$.ajax({url: geolink});
>>    }, geoError);
>>}
>> }
>> 
>> 
>> On Tue, Aug 30, 2016 at 12:11 PM, Chris Poulsen 
>> wrote:
>> 
>>> Use a form, request parameters or url context - The usual way of sending
>>> data to the server.
>>> 
>>> --
>>> Chris
>>> 
>>> On Tue, Aug 30, 2016 at 11:56 AM, Qbyte Consulting <
>>> qbyteconsult...@gmail.com> wrote:
>>> 
>>>> I get JS to populate the hidden form fields, they are passed as
>>> parameters
>>>> to the page, but they are empty strings?
>>>> 
>>>> function locate() {
>>>>//Geolocation
>>>>if (navigator.geolocation) {
>>>>navigator.geolocation
>>>>.getCurrentPosition(function (position)
>>>>{
>>>>$("#latitude").val(position.
>>>> coords.latitude.toString());
>>>> 
>>>> $("#longitude").val(position.coords.longitude.toString());
>>>>}, geoError);
>>>>$("#locateForm").submit();
>>>>}
>>>> }
>>>> 
>>>> On Tue, Aug 30, 2016 at 8:24 AM, Nathan Quirynen <
>>>> nat...@pensionarchitects.be> wrote:
>>>> 
>>>>> Hi
>>>>> 
>>>>> I guess you could do something like the following:
>>>>> 
>>>>> Create a component just containing two hidden fields and in the after
>>>>> render event of this component run a javascript module where you get
>>> the
>>>>> longitude and latitude and set these values to your hidden fields.
>>>>> Add two parameters (latitude and longitude) to the components java
>>> class
>>>>> to which you pass the latitude and longitude properties from your
>> page
>>>> that
>>>>> have to be set when submitting the form. Use these parameters in your
>>>>> component as the values for your hidden fields.
>>>>> Then you can add this component inside any form where you need.
>>>>> 
>>>>> Nathan
>>>>> 
>>>>> 
>>>>> 
>>>>>> On 30/08/16 01:10, Qbyte Consulting wrote:
>>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>> Does anyone have an idea how to pass latitude and longitude as
>> hidden
>>>>>> values in a login for with T5.4, or any other tricks to get this
>> data
>>>> into
>>>>>> a component?
>>>>>> 
>>>>>> John
>>>>> 
>>>>> 
>> -
>>>>> 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 pass geolocation coords as hidden values in login form

2016-08-31 Thread Qbyte Consulting
Thank you. Where can I find sample code implementing these suggestions or 
similar?

Sent from my iPhone

> On 31 Aug 2016, at 08:07, Chris Poulsen  wrote:
> 
> The javaScriptSupport.addScript is deprectated in 5.4 iirc.
> 
> Instead I would use a module for the locate function, the url can be passed
> as an init parameter to require or stored somewhere in the DOM (the former
> probably makes the most sense in this case.
> 
> Also I would use the tapestry ajax module (
> http://tapestry.apache.org/current/coffeescript/ajax.html) instead of
> $.ajax as that will give you some code that understands the responses that
> tapestry may generate in from an event handler (error screen, additional
> stuff added using ajaxResponseRenderer etc.)
> 
> There is also a helper for adding url parameters (
> http://tapestry.apache.org/current/coffeescript/utils.html)
> 
> -- 
> Chris
> 
> 
> On Wed, Aug 31, 2016 at 1:19 AM, Qbyte Consulting > wrote:
> 
>> I could not get the form method to work, so ended up passing an eventlink
>> url to my javascript and adding parameters to it. Works a treat and simple.
>> 
>>Link link =
>> componentResources.createEventLink("geolocation", null);
>>final String eventLinkURI = link.toAbsoluteURI();
>>ajaxResponseRenderer.addCallback(new JavaScriptCallback()
>> {
>>@Override
>>public void run(JavaScriptSupport javascriptSupport) {
>>javascriptSupport.addScript(
>>"locate('" + eventLinkURI + "');");
>>}
>>});
>> 
>> 
>> function locate(eventLinkURI) {
>>if (navigator.geolocation) {
>>navigator.geolocation
>>.getCurrentPosition(function (position)
>>{
>>var geolink = eventLinkURI
>>+ "?lat=" + position.coords.latitude
>>+ "&long=" + position.coords.longitude;
>>$.ajax({url: geolink});
>>    }, geoError);
>>}
>> }
>> 
>> 
>> On Tue, Aug 30, 2016 at 12:11 PM, Chris Poulsen 
>> wrote:
>> 
>>> Use a form, request parameters or url context - The usual way of sending
>>> data to the server.
>>> 
>>> --
>>> Chris
>>> 
>>> On Tue, Aug 30, 2016 at 11:56 AM, Qbyte Consulting <
>>> qbyteconsult...@gmail.com> wrote:
>>> 
>>>> I get JS to populate the hidden form fields, they are passed as
>>> parameters
>>>> to the page, but they are empty strings?
>>>> 
>>>> function locate() {
>>>>//Geolocation
>>>>if (navigator.geolocation) {
>>>>navigator.geolocation
>>>>.getCurrentPosition(function (position)
>>>>{
>>>>$("#latitude").val(position.
>>>> coords.latitude.toString());
>>>> 
>>>> $("#longitude").val(position.coords.longitude.toString());
>>>>}, geoError);
>>>>$("#locateForm").submit();
>>>>}
>>>> }
>>>> 
>>>> On Tue, Aug 30, 2016 at 8:24 AM, Nathan Quirynen <
>>>> nat...@pensionarchitects.be> wrote:
>>>> 
>>>>> Hi
>>>>> 
>>>>> I guess you could do something like the following:
>>>>> 
>>>>> Create a component just containing two hidden fields and in the after
>>>>> render event of this component run a javascript module where you get
>>> the
>>>>> longitude and latitude and set these values to your hidden fields.
>>>>> Add two parameters (latitude and longitude) to the components java
>>> class
>>>>> to which you pass the latitude and longitude properties from your
>> page
>>>> that
>>>>> have to be set when submitting the form. Use these parameters in your
>>>>> component as the values for your hidden fields.
>>>>> Then you can add this component inside any form where you need.
>>>>> 
>>>>> Nathan
>>>>> 
>>>>> 
>>>>> 
>>>>>> On 30/08/16 01:10, Qbyte Consulting wrote:
>>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>> Does anyone have an idea how to pass latitude and longitude as
>> hidden
>>>>>> values in a login for with T5.4, or any other tricks to get this
>> data
>>>> into
>>>>>> a component?
>>>>>> 
>>>>>> John
>>>>> 
>>>>> 
>> -
>>>>> 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 pass geolocation coords as hidden values in login form

2016-08-30 Thread Qbyte Consulting
I could not get the form method to work, so ended up passing an eventlink
url to my javascript and adding parameters to it. Works a treat and simple.

Link link =
componentResources.createEventLink("geolocation", null);
final String eventLinkURI = link.toAbsoluteURI();
ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
@Override
public void run(JavaScriptSupport javascriptSupport) {
javascriptSupport.addScript(
"locate('" + eventLinkURI + "');");
}
});


function locate(eventLinkURI) {
if (navigator.geolocation) {
navigator.geolocation
.getCurrentPosition(function (position)
{
var geolink = eventLinkURI
+ "?lat=" + position.coords.latitude
+ "&long=" + position.coords.longitude;
$.ajax({url: geolink});
}, geoError);
}
}


On Tue, Aug 30, 2016 at 12:11 PM, Chris Poulsen 
wrote:

> Use a form, request parameters or url context - The usual way of sending
> data to the server.
>
> --
> Chris
>
> On Tue, Aug 30, 2016 at 11:56 AM, Qbyte Consulting <
> qbyteconsult...@gmail.com> wrote:
>
> > I get JS to populate the hidden form fields, they are passed as
> parameters
> > to the page, but they are empty strings?
> >
> > function locate() {
> > //Geolocation
> > if (navigator.geolocation) {
> > navigator.geolocation
> > .getCurrentPosition(function (position)
> > {
> > $("#latitude").val(position.
> > coords.latitude.toString());
> >
> > $("#longitude").val(position.coords.longitude.toString());
> > }, geoError);
> > $("#locateForm").submit();
> > }
> > }
> >
> > On Tue, Aug 30, 2016 at 8:24 AM, Nathan Quirynen <
> > nat...@pensionarchitects.be> wrote:
> >
> > > Hi
> > >
> > > I guess you could do something like the following:
> > >
> > > Create a component just containing two hidden fields and in the after
> > > render event of this component run a javascript module where you get
> the
> > > longitude and latitude and set these values to your hidden fields.
> > > Add two parameters (latitude and longitude) to the components java
> class
> > > to which you pass the latitude and longitude properties from your page
> > that
> > > have to be set when submitting the form. Use these parameters in your
> > > component as the values for your hidden fields.
> > > Then you can add this component inside any form where you need.
> > >
> > > Nathan
> > >
> > >
> > >
> > > On 30/08/16 01:10, Qbyte Consulting wrote:
> > >
> > >> Hi,
> > >>
> > >> Does anyone have an idea how to pass latitude and longitude as hidden
> > >> values in a login for with T5.4, or any other tricks to get this data
> > into
> > >> a component?
> > >>
> > >> John
> > >>
> > >>
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > > For additional commands, e-mail: users-h...@tapestry.apache.org
> > >
> > >
> >
>


Re: how to pass geolocation coords as hidden values in login form

2016-08-30 Thread Qbyte Consulting
I get JS to populate the hidden form fields, they are passed as parameters
to the page, but they are empty strings?

function locate() {
//Geolocation
if (navigator.geolocation) {
navigator.geolocation
.getCurrentPosition(function (position)
{
$("#latitude").val(position.coords.latitude.toString());

$("#longitude").val(position.coords.longitude.toString());
}, geoError);
$("#locateForm").submit();
}
}

On Tue, Aug 30, 2016 at 8:24 AM, Nathan Quirynen <
nat...@pensionarchitects.be> wrote:

> Hi
>
> I guess you could do something like the following:
>
> Create a component just containing two hidden fields and in the after
> render event of this component run a javascript module where you get the
> longitude and latitude and set these values to your hidden fields.
> Add two parameters (latitude and longitude) to the components java class
> to which you pass the latitude and longitude properties from your page that
> have to be set when submitting the form. Use these parameters in your
> component as the values for your hidden fields.
> Then you can add this component inside any form where you need.
>
> Nathan
>
>
>
> On 30/08/16 01:10, Qbyte Consulting wrote:
>
>> Hi,
>>
>> Does anyone have an idea how to pass latitude and longitude as hidden
>> values in a login for with T5.4, or any other tricks to get this data into
>> a component?
>>
>> John
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: how to pass geolocation coords as hidden values in login form

2016-08-30 Thread Qbyte Consulting
Thanks Nathan,

I want to drive the process from the submission of the login form, not from
the render process. So I could fire some JavaScript after the login
succeeds but how does the JS push the data to the page? Maybe I could use
an entirely hidden form and submit it from the JS?

John

On Tue, Aug 30, 2016 at 8:24 AM, Nathan Quirynen <
nat...@pensionarchitects.be> wrote:

> Hi
>
> I guess you could do something like the following:
>
> Create a component just containing two hidden fields and in the after
> render event of this component run a javascript module where you get the
> longitude and latitude and set these values to your hidden fields.
> Add two parameters (latitude and longitude) to the components java class
> to which you pass the latitude and longitude properties from your page that
> have to be set when submitting the form. Use these parameters in your
> component as the values for your hidden fields.
> Then you can add this component inside any form where you need.
>
> Nathan
>
>
>
> On 30/08/16 01:10, Qbyte Consulting wrote:
>
>> Hi,
>>
>> Does anyone have an idea how to pass latitude and longitude as hidden
>> values in a login for with T5.4, or any other tricks to get this data into
>> a component?
>>
>> John
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


how to pass geolocation coords as hidden values in login form

2016-08-29 Thread Qbyte Consulting
Hi,

Does anyone have an idea how to pass latitude and longitude as hidden
values in a login for with T5.4, or any other tricks to get this data into
a component?

John


Re: java.lang.AbstractMethodError loading Index page with T5.4?

2016-08-26 Thread Qbyte Consulting
Hi. Turns out to be another JS incompatibility. I remove angularjs from my 
context and the problem goes.

Sent from my iPhone

> On 26 Aug 2016, at 14:19, Thiago H de Paula Figueiredo  
> wrote:
> 
> I'd check whether you have some pre-T5.4 JARs in your classpath.
> 
>> On Fri, 26 Aug 2016 09:33:31 -0300, Qbyte Consulting 
>>  wrote:
>> 
>> well this is new, any ideas?
>> 
>> 
>> Info:   [ERROR] ioc.Registry java.lang.AbstractMethodError
>> Info:   [ERROR] ioc.Registry Operations trace:
>> Info:   [ERROR] ioc.Registry [ 1] Handling page render request for page
>> Index
>> Severe:   java.lang.AbstractMethodError
>> at
>> org.apache.tapestry5.internal.services.assets.JavaScriptStackMinimizeDisabler.getStreamableResource(JavaScriptStackMinimizeDisabler.java:54)
>> at
>> org.apache.tapestry5.internal.services.assets.UTF8ForTextAssets.getStreamableResource(UTF8ForTextAssets.java:40)
>> at
>> org.apache.tapestry5.internal.services.assets.SRSCachingInterceptor.getStreamableResource(SRSCachingInterceptor.java:55)
>> at
>> org.apache.tapestry5.internal.services.assets.SRSCompressingInterceptor.getStreamableResource(SRSCompressingInterceptor.java:38)
>> at
>> org.apache.tapestry5.internal.services.assets.SRSCachingInterceptor.getStreamableResource(SRSCachingInterceptor.java:48)
>> at $StreamableResourceSource_d6f2d007ea0.getStreamableResource(Unknown
>> Source)
>> at
>> org.apache.tapestry5.internal.services.AbstractAssetFactory$1.toClientURL(AbstractAssetFactory.java:87)
>> at
>> org.apache.tapestry5.internal.services.ajax.JavaScriptSupportImpl.getLibraryURLToStackName(JavaScriptSupportImpl.java:318)
>> at
>> org.apache.tapestry5.internal.services.ajax.JavaScriptSupportImpl.findStackForLibrary(JavaScriptSupportImpl.java:304)
>> at
>> org.apache.tapestry5.internal.services.ajax.JavaScriptSupportImpl.importJavaScriptLibrary(JavaScriptSupportImpl.java:276)
>> at
>> org.apache.tapestry5.internal.services.ajax.JavaScriptSupportImpl.importJavaScriptLibrary(JavaScriptSupportImpl.java:269)
>> at $JavaScriptSupport_d6f2d007f60.importJavaScriptLibrary(Unknown Source)
>> at $JavaScriptSupport_d6f2d007ed9.importJavaScriptLibrary(Unknown Source)
>> at
>> org.apache.tapestry5.internal.transform.ImportWorker$1.work(ImportWorker.java:52)
>> at
>> org.apache.tapestry5.internal.transform.ImportWorker$1.work(ImportWorker.java:49)
>> at org.apache.tapestry5.func.ArrayFlow.each(ArrayFlow.java:67)
>> at org.apache.tapestry5.func.ArrayFlow.each(ArrayFlow.java:30)
>> at
>> org.apache.tapestry5.internal.transform.ImportWorker$8.advise(ImportWorker.java:275)
>> at
>> org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:92)
>> at com.qbyte.vegr.components.Layout.setupRender(Layout.java)
>> at
>> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.invokeComponent(ComponentPageElementImpl.java:174)
>> at
>> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:133)
>> at
>> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.render(ComponentPageElementImpl.java:181)
>> at
>> org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:79)
>> at
>> org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:121)
>> at $PageRenderQueue_d6f2d007f5c.render(Unknown Source)
>> at $PageRenderQueue_d6f2d007f5b.render(Unknown Source)
>> at
>> org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37)
>> at
>> org.apache.tapestry5.modules.TapestryModule$29.renderMarkup(TapestryModule.java:1807)
>> at $MarkupRenderer_d6f2d007f5e.renderMarkup(Unknown Source)
>> at
>> org.apache.tapestry5.modules.TapestryModule$28.renderMarkup(TapestryModule.java:1797)
>> at $MarkupRenderer_d6f2d007f5e.renderMarkup(Unknown Source)
>> at
>> org.apache.tapestry5.modules.TapestryModule$27.renderMarkup(TapestryModule.java:1781)
>> at $MarkupRenderer_d6f2d007f5e.renderMarkup(Unknown Source)
>> at
>> org.apache.tapestry5.modules.TapestryModule$26.renderMarkup(TapestryModule.java:1765)
>> at $MarkupRenderer_d6f2d007f5e.renderMarkup(Unknown Source)
>> at
>> org.apache.tapestry5.modules.JavaScriptModule$1.renderMarkup(JavaScriptModule.java:268)
>> at $MarkupRenderer_d6f2d007f5e.renderMarkup(Unknown Source)
>> at
>> org.apache.tapestry5.modules.TapestryModule$25.renderMarkup(TapestryModule.java:1748)
>> at $MarkupRenderer_d6f2d007f

java.lang.AbstractMethodError loading Index page with T5.4?

2016-08-26 Thread Qbyte Consulting
well this is new, any ideas?


Info:   [ERROR] ioc.Registry java.lang.AbstractMethodError
Info:   [ERROR] ioc.Registry Operations trace:
Info:   [ERROR] ioc.Registry [ 1] Handling page render request for page
Index
Severe:   java.lang.AbstractMethodError
at
org.apache.tapestry5.internal.services.assets.JavaScriptStackMinimizeDisabler.getStreamableResource(JavaScriptStackMinimizeDisabler.java:54)
at
org.apache.tapestry5.internal.services.assets.UTF8ForTextAssets.getStreamableResource(UTF8ForTextAssets.java:40)
at
org.apache.tapestry5.internal.services.assets.SRSCachingInterceptor.getStreamableResource(SRSCachingInterceptor.java:55)
at
org.apache.tapestry5.internal.services.assets.SRSCompressingInterceptor.getStreamableResource(SRSCompressingInterceptor.java:38)
at
org.apache.tapestry5.internal.services.assets.SRSCachingInterceptor.getStreamableResource(SRSCachingInterceptor.java:48)
at $StreamableResourceSource_d6f2d007ea0.getStreamableResource(Unknown
Source)
at
org.apache.tapestry5.internal.services.AbstractAssetFactory$1.toClientURL(AbstractAssetFactory.java:87)
at
org.apache.tapestry5.internal.services.ajax.JavaScriptSupportImpl.getLibraryURLToStackName(JavaScriptSupportImpl.java:318)
at
org.apache.tapestry5.internal.services.ajax.JavaScriptSupportImpl.findStackForLibrary(JavaScriptSupportImpl.java:304)
at
org.apache.tapestry5.internal.services.ajax.JavaScriptSupportImpl.importJavaScriptLibrary(JavaScriptSupportImpl.java:276)
at
org.apache.tapestry5.internal.services.ajax.JavaScriptSupportImpl.importJavaScriptLibrary(JavaScriptSupportImpl.java:269)
at $JavaScriptSupport_d6f2d007f60.importJavaScriptLibrary(Unknown Source)
at $JavaScriptSupport_d6f2d007ed9.importJavaScriptLibrary(Unknown Source)
at
org.apache.tapestry5.internal.transform.ImportWorker$1.work(ImportWorker.java:52)
at
org.apache.tapestry5.internal.transform.ImportWorker$1.work(ImportWorker.java:49)
at org.apache.tapestry5.func.ArrayFlow.each(ArrayFlow.java:67)
at org.apache.tapestry5.func.ArrayFlow.each(ArrayFlow.java:30)
at
org.apache.tapestry5.internal.transform.ImportWorker$8.advise(ImportWorker.java:275)
at
org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:92)
at com.qbyte.vegr.components.Layout.setupRender(Layout.java)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.invokeComponent(ComponentPageElementImpl.java:174)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:133)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.render(ComponentPageElementImpl.java:181)
at
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:79)
at
org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:121)
at $PageRenderQueue_d6f2d007f5c.render(Unknown Source)
at $PageRenderQueue_d6f2d007f5b.render(Unknown Source)
at
org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37)
at
org.apache.tapestry5.modules.TapestryModule$29.renderMarkup(TapestryModule.java:1807)
at $MarkupRenderer_d6f2d007f5e.renderMarkup(Unknown Source)
at
org.apache.tapestry5.modules.TapestryModule$28.renderMarkup(TapestryModule.java:1797)
at $MarkupRenderer_d6f2d007f5e.renderMarkup(Unknown Source)
at
org.apache.tapestry5.modules.TapestryModule$27.renderMarkup(TapestryModule.java:1781)
at $MarkupRenderer_d6f2d007f5e.renderMarkup(Unknown Source)
at
org.apache.tapestry5.modules.TapestryModule$26.renderMarkup(TapestryModule.java:1765)
at $MarkupRenderer_d6f2d007f5e.renderMarkup(Unknown Source)
at
org.apache.tapestry5.modules.JavaScriptModule$1.renderMarkup(JavaScriptModule.java:268)
at $MarkupRenderer_d6f2d007f5e.renderMarkup(Unknown Source)
at
org.apache.tapestry5.modules.TapestryModule$25.renderMarkup(TapestryModule.java:1748)
at $MarkupRenderer_d6f2d007f5e.renderMarkup(Unknown Source)
at
org.apache.tapestry5.internal.services.javascript.AddBrowserCompatibilityStyles.renderMarkup(AddBrowserCompatibilityStyles.java:45)
at $MarkupRenderer_d6f2d007f5e.renderMarkup(Unknown Source)
at
org.apache.tapestry5.internal.services.javascript.ConfigureHTMLElementFilter.renderMarkup(ConfigureHTMLElementFilter.java:45)
at $MarkupRenderer_d6f2d007f5e.renderMarkup(Unknown Source)
at $MarkupRenderer_d6f2d007f5a.renderMarkup(Unknown Source)
at
org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:47)
at $PageMarkupRenderer_d6f2d007f58.renderPageMarkup(Unknown Source)
at
org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:64)
at $PageResponseRenderer_d6f2d007eed.renderPageResponse(Unknown Source)
at
org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:72)
at
org.apache.tapestry5.modules.TapestryModule$34.handle(TapestryModule.java:1974)
at $PageRe

null pointers after user hits enter in AJAX form

2016-08-18 Thread Qbyte Consulting
An unrecoverable error occurs after the user hits Enter key in a form
rendered by an enclosed component.

Is there a way to ignore the enter key and not submit the form? It's an
AJAX search value input, not a regular form for submission, so Enter key
hits should be ignored.









Re: T.5.4 ajax forms

2016-08-15 Thread Qbyte Consulting
I found out the cause of this.

My app was using the jquery mobile library and this damages the forms ajax
capability. A soon as I removed the dependency then my ajax form works! But
of course now the left swipe ability I had on one of my divs doesn't work!

Can't have it all I suppose. I'm now looking for an easy way to add swipe
capability back? AngularJS looks like it would integrate well without
fudging up the jquery, but it's swipe seems hard to implement and really
I'd like to stay with jquery.

On Sat, Aug 13, 2016 at 10:32 PM, Qbyte Consulting <
qbyteconsult...@gmail.com> wrote:

> I can't get an form in a zone to work with ajax to get an email address,
> events get fired, but the form data is not passed back to the page class
> property and the page goes black due to redirect! It seems like the form
> isn't working thru ajax.
>
>@Property
> @Persist(PersistenceConstants.FLASH)
> private String email;
>
> @InjectComponent
> private Zone registermeZone;
>
> @Component
> private Form registermeForm;
>
> @Inject
> private AjaxResponseRenderer ajaxResponseRenderer;
>
> @OnEvent(value = EventConstants.VALIDATE, component = "registermeForm")
> public void validateFromRegistermeform() {
> System.out.println("V>" + email);
> }
>
> @OnEvent(value = "submit", component = "registermeForm")
> public void successFromRegistermeform() {
> System.out.println("S>" + email);
>// return registermeZone.getBody();
> this.ajaxResponseRenderer.addRender(registermeZone);
> }
>
>
>
>  
> 
> 
> Please provide an email
> address, we will send you a registration code.
>  t:validate="email,required,minlength=6" size="45" placeholder="email"/>
> 
> 
> 
>


T.5.4 ajax forms

2016-08-13 Thread Qbyte Consulting
I can't get an form in a zone to work with ajax to get an email address,
events get fired, but the form data is not passed back to the page class
property and the page goes black due to redirect! It seems like the form
isn't working thru ajax.

   @Property
@Persist(PersistenceConstants.FLASH)
private String email;

@InjectComponent
private Zone registermeZone;

@Component
private Form registermeForm;

@Inject
private AjaxResponseRenderer ajaxResponseRenderer;

@OnEvent(value = EventConstants.VALIDATE, component = "registermeForm")
public void validateFromRegistermeform() {
System.out.println("V>" + email);
}

@OnEvent(value = "submit", component = "registermeForm")
public void successFromRegistermeform() {
System.out.println("S>" + email);
   // return registermeZone.getBody();
this.ajaxResponseRenderer.addRender(registermeZone);
}



 


Please provide an email
address, we will send you a registration code.






Re: exception on page render

2016-08-12 Thread Qbyte Consulting
Thanks, yes that's what I did. I was using jquery mobile and I had added
the css and js to the assets but not the images that the css refers to.

On Fri, Aug 12, 2016 at 7:02 PM, Chris Poulsen 
wrote:

> It is being referenced from somewhere or you would not get the error...
>
> I would suggest starting from a working basis, like the t5 quickstart (
> http://tapestry.apache.org/getting-started.html ) and add one thing at the
> time ensuring that everything is working before moving on to next step.
>
> --
> Chris
>
> On Fri, Aug 12, 2016 at 6:35 PM, Qbyte Consulting <
> qbyteconsult...@gmail.com
> > wrote:
>
> > I resolved dependency conflicts and get to rendering a page but this pops
> > up, and it's not a resource I uses?
> >
> > *Render queue error in SetupRender[Index:layout]: Unable to locate asset
> > 'context:layout/images/icons-png/action-white.png' (the file does not
> > exist).*
> >
> > On Fri, Aug 12, 2016 at 3:16 PM, Qbyte Consulting <
> > qbyteconsult...@gmail.com
> > > wrote:
> >
> > > No I removed it. As I said, even after removing got5, I got a similar
> > > stack dump but minus mention of got 5. Sorry to confuse.
> > >
> > > On Fri, Aug 12, 2016 at 1:19 PM, Chris Poulsen  >
> > > wrote:
> > >
> > >> org.got5is still in your stacktrace... So maybe you have a jar
> > >> lingering somewhere.
> > >>
> > >> --
> > >> Chris
> > >>
> > >> On Fri, Aug 12, 2016 at 2:02 PM, Qbyte Consulting <
> > >> qbyteconsult...@gmail.com
> > >> > wrote:
> > >>
> > >> > I've been copying code from here https://tapestry-app.apache.or
> > >> g/hotels/
> > >> > but with my own database and other project dependencies.
> > >> >
> > >> > On Fri, Aug 12, 2016 at 12:39 PM, Barry Books 
> > wrote:
> > >> >
> > >> > > Which hotel booking app?
> > >> > >
> > >> > > On Thursday, August 11, 2016, Qbyte Consulting <
> > >> > qbyteconsult...@gmail.com>
> > >> > > wrote:
> > >> > >
> > >> > > > I'm writing a T5.4 app from scratch rather than a migration.
> > >> > > >
> > >> > > > I keep getting this stack dump, I've taken out the got5
> > dependency,
> > >> but
> > >> > > > still get much the same error.
> > >> > > >
> > >> > > > Any pointers to what this could be? I'm basing my code off the
> > hotel
> > >> > > > booking example.
> > >> > > >
> > >> > > > John
> > >> > > >
> > >> > > > HTTP ERROR 500
> > >> > > >
> > >> > > > Problem accessing /Context/. Reason:
> > >> > > >
> > >> > > > INTERNAL_SERVER_ERROR
> > >> > > >
> > >> > > > Caused by:
> > >> > > >
> > >> > > > java.lang.AbstractMethodError
> > >> > > > at org.apache.tapestry5.internal.services.ajax.
> > >> > > > JavaScriptSupportImpl.getModuleNameToStackName(
> > >> > > JavaScriptSupportImpl.java:
> > >> > > > 340)
> > >> > > > at org.apache.tapestry5.internal.services.ajax.
> > >> > > > JavaScriptSupportImpl.findStackForModule(JavaScriptSupportIm
> > >> pl.java:
> > >> > 328)
> > >> > > > at org.apache.tapestry5.internal.services.ajax.
> > >> > > > JavaScriptSupportImpl.require(JavaScriptSupportImpl.java:451)
> > >> > > > at $JavaScriptSupport_149ab64e3d59.require(Unknown
> > Source)
> > >> > > > at $JavaScriptSupport_149ab64e3cc1.require(Unknown
> > Source)
> > >> > > > at org.apache.tapestry5.internal.
> transform.ImportWorker$
> > >> > > > ModuleImport.apply(ImportWorker.java:168)
> > >> > > > at org.apache.tapestry5.internal.
> > transform.ImportWorker$5.
> > >> > > > advise(ImportWorker.java:197)
> > >> > > > at org.apache.tapestry5.internal.plastic.
> > >> > > AbstractMethodInvocation.
> > >> > > > proceed(AbstractMethodInvocation.java:92)
> &

Re: exception on page render

2016-08-12 Thread Qbyte Consulting
I resolved dependency conflicts and get to rendering a page but this pops
up, and it's not a resource I uses?

*Render queue error in SetupRender[Index:layout]: Unable to locate asset
'context:layout/images/icons-png/action-white.png' (the file does not
exist).*

On Fri, Aug 12, 2016 at 3:16 PM, Qbyte Consulting  wrote:

> No I removed it. As I said, even after removing got5, I got a similar
> stack dump but minus mention of got 5. Sorry to confuse.
>
> On Fri, Aug 12, 2016 at 1:19 PM, Chris Poulsen 
> wrote:
>
>> org.got5is still in your stacktrace... So maybe you have a jar
>> lingering somewhere.
>>
>> --
>> Chris
>>
>> On Fri, Aug 12, 2016 at 2:02 PM, Qbyte Consulting <
>> qbyteconsult...@gmail.com
>> > wrote:
>>
>> > I've been copying code from here https://tapestry-app.apache.or
>> g/hotels/
>> > but with my own database and other project dependencies.
>> >
>> > On Fri, Aug 12, 2016 at 12:39 PM, Barry Books  wrote:
>> >
>> > > Which hotel booking app?
>> > >
>> > > On Thursday, August 11, 2016, Qbyte Consulting <
>> > qbyteconsult...@gmail.com>
>> > > wrote:
>> > >
>> > > > I'm writing a T5.4 app from scratch rather than a migration.
>> > > >
>> > > > I keep getting this stack dump, I've taken out the got5 dependency,
>> but
>> > > > still get much the same error.
>> > > >
>> > > > Any pointers to what this could be? I'm basing my code off the hotel
>> > > > booking example.
>> > > >
>> > > > John
>> > > >
>> > > > HTTP ERROR 500
>> > > >
>> > > > Problem accessing /Context/. Reason:
>> > > >
>> > > > INTERNAL_SERVER_ERROR
>> > > >
>> > > > Caused by:
>> > > >
>> > > > java.lang.AbstractMethodError
>> > > > at org.apache.tapestry5.internal.services.ajax.
>> > > > JavaScriptSupportImpl.getModuleNameToStackName(
>> > > JavaScriptSupportImpl.java:
>> > > > 340)
>> > > > at org.apache.tapestry5.internal.services.ajax.
>> > > > JavaScriptSupportImpl.findStackForModule(JavaScriptSupportIm
>> pl.java:
>> > 328)
>> > > > at org.apache.tapestry5.internal.services.ajax.
>> > > > JavaScriptSupportImpl.require(JavaScriptSupportImpl.java:451)
>> > > > at $JavaScriptSupport_149ab64e3d59.require(Unknown Source)
>> > > > at $JavaScriptSupport_149ab64e3cc1.require(Unknown Source)
>> > > > at org.apache.tapestry5.internal.transform.ImportWorker$
>> > > > ModuleImport.apply(ImportWorker.java:168)
>> > > > at org.apache.tapestry5.internal.transform.ImportWorker$5.
>> > > > advise(ImportWorker.java:197)
>> > > > at org.apache.tapestry5.internal.plastic.
>> > > AbstractMethodInvocation.
>> > > > proceed(AbstractMethodInvocation.java:92)
>> > > > at org.apache.tapestry5.internal.transform.ImportWorker$8.
>> > > > advise(ImportWorker.java:271)
>> > > > at org.apache.tapestry5.internal.plastic.
>> > > AbstractMethodInvocation.
>> > > > proceed(AbstractMethodInvocation.java:92)
>> > > > at org.apache.tapestry5.corelib.c
>> omponents.ExceptionDisplay.
>> > > > setupRender(ExceptionDisplay.java)
>> > > > at org.apache.tapestry5.internal.structure.
>> > > > ComponentPageElementImpl$SetupRenderPhase.invokeComponent(
>> > > > ComponentPageElementImpl.java:174)
>> > > > at org.apache.tapestry5.internal.structure.
>> > > > ComponentPageElementImpl$AbstractPhase.invoke(
>> > > > ComponentPageElementImpl.java:133)
>> > > > at org.apache.tapestry5.internal.structure.
>> > > > ComponentPageElementImpl$SetupRenderPhase.render(
>> > > > ComponentPageElementImpl.java:181)
>> > > > at org.apache.tapestry5.internal.
>> services.RenderQueueImpl.run(
>> > > > RenderQueueImpl.java:79)
>> > > > at org.apache.tapestry5.internal.
>> services.PageRenderQueueImpl.
>> > > > render(PageRenderQueueImpl.java:121)
>> > > > at $PageRenderQueue_149ab64e3d54.render(Unknown Source)
>> > > > at $PageRenderQueue_149ab64e3d53.render(Unknown Source)
>> > > > at org.apache.tapestry5.internal.services.
>> > > > MarkupRendererTerminator.renderMarkup(MarkupRendererTerminat
>> or.java:
>> > 37)
>> > > > at org.got5.tapestry5.jquery.services.js.JSModule$1.
>> > > > renderMarkup(JSModule.java:40)
>> > > > at $MarkupRenderer_149ab64e3d57.renderMarkup(Unknown
>> Source)
>> > > > at org.apache.tapestry5.internal.
>> > services.PageNameMetaInjector.
>> > > > renderMarkup(PageNameMetaInjector.java:41)
>> > > > at $MarkupRenderer_149ab64e3d57.renderMarkup(Unknown
>> Source)
>> > > > at org.apache.tapestry5.modules.TapestryModule$29.
>> > > > renderMarkup(TapestryModule.java:1807)
>> > > >
>> > >
>> >
>>
>
>


tapestry5.4 + hibernate + postgres + postgis

2016-08-12 Thread Qbyte Consulting
Hi,

I'm changing my project to use postgres and hibernate, should be straight
forwards, right?

Tapestry starts to load up but then the below happens.

Any ideas? At least with JPA and eclipselink I could get the server to
start! Hibernate seems to be causing upset. :(

John

[main] ERROR org.apache.tapestry5.ioc.Registry - Duplicate method
name&signature in class file $Session_16d373532082
[main] ERROR org.apache.tapestry5.ioc.Registry - Operations trace:
[main] ERROR org.apache.tapestry5.ioc.Registry - [ 1] Realizing service
ServletApplicationInitializer
[main] ERROR org.apache.tapestry5.ioc.Registry - [ 2] Instantiating service
ServletApplicationInitializer implementation via
org.apache.tapestry5.modules.TapestryModule.buildServletApplicationInitializer(Logger,
List, ApplicationInitializer) (at TapestryModule.java:1294)
[main] ERROR org.apache.tapestry5.ioc.Registry - [ 3] Constructing module
class org.apache.tapestry5.modules.TapestryModule
[main] ERROR org.apache.tapestry5.ioc.Registry - [ 4] Determining injection
value for parameter #1 (org.apache.tapestry5.ioc.services.PipelineBuilder)
[main] ERROR org.apache.tapestry5.ioc.Registry - [ 5] Resolving object of
type org.apache.tapestry5.ioc.services.PipelineBuilder using
MasterObjectProvider
[main] ERROR org.apache.tapestry5.ioc.Registry - [ 6] Realizing service
ServiceOverride
[main] ERROR org.apache.tapestry5.ioc.Registry - [ 7] Instantiating service
ServiceOverride implementation via
org.apache.tapestry5.ioc.internal.services.ServiceOverrideImpl(Map) (at
ServiceOverrideImpl.java:31) via
org.apache.tapestry5.ioc.modules.TapestryIOCModule.bind(ServiceBinder) (at
TapestryIOCModule.java:52)
[main] ERROR org.apache.tapestry5.ioc.Registry - [ 8] Creating plan to
instantiate org.apache.tapestry5.ioc.internal.services.ServiceOverrideImpl
via public
org.apache.tapestry5.ioc.internal.services.ServiceOverrideImpl(java.util.Map)
[main] ERROR org.apache.tapestry5.ioc.Registry - [ 9] Determining injection
value for parameter #1 (java.util.Map)
[main] ERROR org.apache.tapestry5.ioc.Registry - [10] Collecting mapped
configuration for service ServiceOverride
[main] ERROR org.apache.tapestry5.ioc.Registry - [11] Invoking
org.apache.tapestry5.hibernate.modules.HibernateModule.provideInjectableSessionObject(MappedConfiguration,
Session) (at HibernateModule.java:75)
[main] ERROR org.apache.tapestry5.ioc.Registry - [12] Determining injection
value for parameter #2 (org.hibernate.Session)
[main] ERROR org.apache.tapestry5.ioc.Registry - [13] Creating proxy for
service Session
2016-08-12 15:11:08.061::WARN:  failed app
java.lang.ClassFormatError: Duplicate method name&signature in class file
$Session_16d373532082
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at java.lang.ClassLoader.defineClass(ClassLoader.java:642)
at
org.apache.tapestry5.internal.plastic.PlasticClassLoader.defineClassWithBytecode(PlasticClassLoader.java:52)
at
org.apache.tapestry5.internal.plastic.PlasticClassPool.realize(PlasticClassPool.java:160)
at
org.apache.tapestry5.internal.plastic.PlasticClassPool.realizeTransformedClass(PlasticClassPool.java:139)
at
org.apache.tapestry5.internal.plastic.PlasticClassImpl.createInstantiator(PlasticClassImpl.java:648)
at
org.apache.tapestry5.plastic.PlasticManager.createProxy(PlasticManager.java:253)
at
org.apache.tapestry5.ioc.internal.services.PlasticProxyFactoryImpl.createProxy(PlasticProxyFactoryImpl.java:68)
at
org.apache.tapestry5.ioc.internal.ModuleImpl.createProxyInstance(ModuleImpl.java:484)
at
org.apache.tapestry5.ioc.internal.ModuleImpl.createProxy(ModuleImpl.java:478)
at
org.apache.tapestry5.ioc.internal.ModuleImpl.access$900(ModuleImpl.java:40)
at
org.apache.tapestry5.ioc.internal.ModuleImpl$4.invoke(ModuleImpl.java:322)
at
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:82)
at
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:72)
at
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1260)
at org.apache.tapestry5.ioc.internal.ModuleImpl.create(ModuleImpl.java:344)
at
org.apache.tapestry5.ioc.internal.ModuleImpl.access$100(ModuleImpl.java:40)
at
org.apache.tapestry5.ioc.internal.ModuleImpl$1.invoke(ModuleImpl.java:198)
at
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withWrite(ConcurrentBarrier.java:139)
at
org.apache.tapestry5.ioc.internal.ModuleImpl$2.invoke(ModuleImpl.java:215)
at
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:83)
at
org.apache.tapestry5.ioc.internal.ModuleImpl.findOrCreate(ModuleImpl.java:221)
at
org.apache.tapestry5.ioc.internal.ModuleImpl.getService(ModuleImpl.java:112)
at
org.apache.tapestry5.ioc.internal.RegistryImpl.getService(RegistryImpl.java:497)
at
org.apache.tapestry5.ioc.internal.RegistryImpl.extractServiceFromMatches(RegistryImpl.java:1045)
at
org.apache.tapestry5.ioc.internal.RegistryImpl.findSe

Re: exception on page render

2016-08-12 Thread Qbyte Consulting
No I removed it. As I said, even after removing got5, I got a similar stack
dump but minus mention of got 5. Sorry to confuse.

On Fri, Aug 12, 2016 at 1:19 PM, Chris Poulsen 
wrote:

> org.got5is still in your stacktrace... So maybe you have a jar
> lingering somewhere.
>
> --
> Chris
>
> On Fri, Aug 12, 2016 at 2:02 PM, Qbyte Consulting <
> qbyteconsult...@gmail.com
> > wrote:
>
> > I've been copying code from here https://tapestry-app.apache.org/hotels/
> > but with my own database and other project dependencies.
> >
> > On Fri, Aug 12, 2016 at 12:39 PM, Barry Books  wrote:
> >
> > > Which hotel booking app?
> > >
> > > On Thursday, August 11, 2016, Qbyte Consulting <
> > qbyteconsult...@gmail.com>
> > > wrote:
> > >
> > > > I'm writing a T5.4 app from scratch rather than a migration.
> > > >
> > > > I keep getting this stack dump, I've taken out the got5 dependency,
> but
> > > > still get much the same error.
> > > >
> > > > Any pointers to what this could be? I'm basing my code off the hotel
> > > > booking example.
> > > >
> > > > John
> > > >
> > > > HTTP ERROR 500
> > > >
> > > > Problem accessing /Context/. Reason:
> > > >
> > > > INTERNAL_SERVER_ERROR
> > > >
> > > > Caused by:
> > > >
> > > > java.lang.AbstractMethodError
> > > > at org.apache.tapestry5.internal.services.ajax.
> > > > JavaScriptSupportImpl.getModuleNameToStackName(
> > > JavaScriptSupportImpl.java:
> > > > 340)
> > > > at org.apache.tapestry5.internal.services.ajax.
> > > > JavaScriptSupportImpl.findStackForModule(JavaScriptSupportImpl.java:
> > 328)
> > > > at org.apache.tapestry5.internal.services.ajax.
> > > > JavaScriptSupportImpl.require(JavaScriptSupportImpl.java:451)
> > > > at $JavaScriptSupport_149ab64e3d59.require(Unknown Source)
> > > > at $JavaScriptSupport_149ab64e3cc1.require(Unknown Source)
> > > > at org.apache.tapestry5.internal.transform.ImportWorker$
> > > > ModuleImport.apply(ImportWorker.java:168)
> > > > at org.apache.tapestry5.internal.transform.ImportWorker$5.
> > > > advise(ImportWorker.java:197)
> > > > at org.apache.tapestry5.internal.plastic.
> > > AbstractMethodInvocation.
> > > > proceed(AbstractMethodInvocation.java:92)
> > > > at org.apache.tapestry5.internal.transform.ImportWorker$8.
> > > > advise(ImportWorker.java:271)
> > > > at org.apache.tapestry5.internal.plastic.
> > > AbstractMethodInvocation.
> > > > proceed(AbstractMethodInvocation.java:92)
> > > > at org.apache.tapestry5.corelib.components.ExceptionDisplay.
> > > > setupRender(ExceptionDisplay.java)
> > > > at org.apache.tapestry5.internal.structure.
> > > > ComponentPageElementImpl$SetupRenderPhase.invokeComponent(
> > > > ComponentPageElementImpl.java:174)
> > > > at org.apache.tapestry5.internal.structure.
> > > > ComponentPageElementImpl$AbstractPhase.invoke(
> > > > ComponentPageElementImpl.java:133)
> > > > at org.apache.tapestry5.internal.structure.
> > > > ComponentPageElementImpl$SetupRenderPhase.render(
> > > > ComponentPageElementImpl.java:181)
> > > > at org.apache.tapestry5.internal.
> services.RenderQueueImpl.run(
> > > > RenderQueueImpl.java:79)
> > > > at org.apache.tapestry5.internal.
> services.PageRenderQueueImpl.
> > > > render(PageRenderQueueImpl.java:121)
> > > > at $PageRenderQueue_149ab64e3d54.render(Unknown Source)
> > > > at $PageRenderQueue_149ab64e3d53.render(Unknown Source)
> > > > at org.apache.tapestry5.internal.services.
> > > > MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:
> > 37)
> > > > at org.got5.tapestry5.jquery.services.js.JSModule$1.
> > > > renderMarkup(JSModule.java:40)
> > > > at $MarkupRenderer_149ab64e3d57.renderMarkup(Unknown Source)
> > > > at org.apache.tapestry5.internal.
> > services.PageNameMetaInjector.
> > > > renderMarkup(PageNameMetaInjector.java:41)
> > > > at $MarkupRenderer_149ab64e3d57.renderMarkup(Unknown Source)
> > > > at org.apache.tapestry5.modules.TapestryModule$29.
> > > > renderMarkup(TapestryModule.java:1807)
> > > >
> > >
> >
>


Re: exception on page render

2016-08-12 Thread Qbyte Consulting
I've been copying code from here https://tapestry-app.apache.org/hotels/
but with my own database and other project dependencies.

On Fri, Aug 12, 2016 at 12:39 PM, Barry Books  wrote:

> Which hotel booking app?
>
> On Thursday, August 11, 2016, Qbyte Consulting 
> wrote:
>
> > I'm writing a T5.4 app from scratch rather than a migration.
> >
> > I keep getting this stack dump, I've taken out the got5 dependency, but
> > still get much the same error.
> >
> > Any pointers to what this could be? I'm basing my code off the hotel
> > booking example.
> >
> > John
> >
> > HTTP ERROR 500
> >
> > Problem accessing /Context/. Reason:
> >
> > INTERNAL_SERVER_ERROR
> >
> > Caused by:
> >
> > java.lang.AbstractMethodError
> > at org.apache.tapestry5.internal.services.ajax.
> > JavaScriptSupportImpl.getModuleNameToStackName(
> JavaScriptSupportImpl.java:
> > 340)
> > at org.apache.tapestry5.internal.services.ajax.
> > JavaScriptSupportImpl.findStackForModule(JavaScriptSupportImpl.java:328)
> > at org.apache.tapestry5.internal.services.ajax.
> > JavaScriptSupportImpl.require(JavaScriptSupportImpl.java:451)
> > at $JavaScriptSupport_149ab64e3d59.require(Unknown Source)
> > at $JavaScriptSupport_149ab64e3cc1.require(Unknown Source)
> > at org.apache.tapestry5.internal.transform.ImportWorker$
> > ModuleImport.apply(ImportWorker.java:168)
> > at org.apache.tapestry5.internal.transform.ImportWorker$5.
> > advise(ImportWorker.java:197)
> > at org.apache.tapestry5.internal.plastic.
> AbstractMethodInvocation.
> > proceed(AbstractMethodInvocation.java:92)
> > at org.apache.tapestry5.internal.transform.ImportWorker$8.
> > advise(ImportWorker.java:271)
> > at org.apache.tapestry5.internal.plastic.
> AbstractMethodInvocation.
> > proceed(AbstractMethodInvocation.java:92)
> > at org.apache.tapestry5.corelib.components.ExceptionDisplay.
> > setupRender(ExceptionDisplay.java)
> > at org.apache.tapestry5.internal.structure.
> > ComponentPageElementImpl$SetupRenderPhase.invokeComponent(
> > ComponentPageElementImpl.java:174)
> > at org.apache.tapestry5.internal.structure.
> > ComponentPageElementImpl$AbstractPhase.invoke(
> > ComponentPageElementImpl.java:133)
> > at org.apache.tapestry5.internal.structure.
> > ComponentPageElementImpl$SetupRenderPhase.render(
> > ComponentPageElementImpl.java:181)
> > at org.apache.tapestry5.internal.services.RenderQueueImpl.run(
> > RenderQueueImpl.java:79)
> > at org.apache.tapestry5.internal.services.PageRenderQueueImpl.
> > render(PageRenderQueueImpl.java:121)
> > at $PageRenderQueue_149ab64e3d54.render(Unknown Source)
> > at $PageRenderQueue_149ab64e3d53.render(Unknown Source)
> > at org.apache.tapestry5.internal.services.
> > MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37)
> > at org.got5.tapestry5.jquery.services.js.JSModule$1.
> > renderMarkup(JSModule.java:40)
> > at $MarkupRenderer_149ab64e3d57.renderMarkup(Unknown Source)
> > at org.apache.tapestry5.internal.services.PageNameMetaInjector.
> > renderMarkup(PageNameMetaInjector.java:41)
> > at $MarkupRenderer_149ab64e3d57.renderMarkup(Unknown Source)
> > at org.apache.tapestry5.modules.TapestryModule$29.
> > renderMarkup(TapestryModule.java:1807)
> >
>


exception on page render

2016-08-11 Thread Qbyte Consulting
I'm writing a T5.4 app from scratch rather than a migration.

I keep getting this stack dump, I've taken out the got5 dependency, but
still get much the same error.

Any pointers to what this could be? I'm basing my code off the hotel
booking example.

John

HTTP ERROR 500

Problem accessing /Context/. Reason:

INTERNAL_SERVER_ERROR

Caused by:

java.lang.AbstractMethodError
at 
org.apache.tapestry5.internal.services.ajax.JavaScriptSupportImpl.getModuleNameToStackName(JavaScriptSupportImpl.java:340)
at 
org.apache.tapestry5.internal.services.ajax.JavaScriptSupportImpl.findStackForModule(JavaScriptSupportImpl.java:328)
at 
org.apache.tapestry5.internal.services.ajax.JavaScriptSupportImpl.require(JavaScriptSupportImpl.java:451)
at $JavaScriptSupport_149ab64e3d59.require(Unknown Source)
at $JavaScriptSupport_149ab64e3cc1.require(Unknown Source)
at 
org.apache.tapestry5.internal.transform.ImportWorker$ModuleImport.apply(ImportWorker.java:168)
at 
org.apache.tapestry5.internal.transform.ImportWorker$5.advise(ImportWorker.java:197)
at 
org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:92)
at 
org.apache.tapestry5.internal.transform.ImportWorker$8.advise(ImportWorker.java:271)
at 
org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:92)
at 
org.apache.tapestry5.corelib.components.ExceptionDisplay.setupRender(ExceptionDisplay.java)
at 
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.invokeComponent(ComponentPageElementImpl.java:174)
at 
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:133)
at 
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.render(ComponentPageElementImpl.java:181)
at 
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:79)
at 
org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:121)
at $PageRenderQueue_149ab64e3d54.render(Unknown Source)
at $PageRenderQueue_149ab64e3d53.render(Unknown Source)
at 
org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37)
at 
org.got5.tapestry5.jquery.services.js.JSModule$1.renderMarkup(JSModule.java:40)
at $MarkupRenderer_149ab64e3d57.renderMarkup(Unknown Source)
at 
org.apache.tapestry5.internal.services.PageNameMetaInjector.renderMarkup(PageNameMetaInjector.java:41)
at $MarkupRenderer_149ab64e3d57.renderMarkup(Unknown Source)
at 
org.apache.tapestry5.modules.TapestryModule$29.renderMarkup(TapestryModule.java:1807)


using media attributes with @Import stylesheet

2016-08-11 Thread Qbyte Consulting
I'm moving my prototype pages to T5.4.

I've put this on my Layout class:
@Import(stylesheet
= {"context:/layout/style.css",
"context:/layout/jquery.mobile-1.4.5.min.css"}, library
= {"context:/js/init.js","jquery.mobile-1.4.5.min.js"})

How do I handle the media attributes (see below)?

John


  



SPA with initial geolocation request

2016-08-11 Thread Qbyte Consulting
Hi,

I'm developing an SPA style app in which the geolocation needs to be
captured by JS on initial page render then fed back to the page so it
triggers AJAX loading of the dynamic zones in the page that depend on the
location.

How would I go about that?

regards,
John


Re: Tapestry vs Spring MVC + REST + Angular

2016-08-02 Thread Qbyte Consulting
Thanks for that feedback, it's always interesting to see what people are
doing by combining technologies.

I'm quite liking that REST is getting more popular, it makes a lot of sense
when so many platforms are being used.

It would be cool if Tapestry components could be bound directly to RESTful
resources in the client side instead of directly to page classes for their
data input and output.

I have had problems migrating apps from T5.3.6 to T5.4 so not entirely
happy.






On Tue, Aug 2, 2016 at 4:54 AM, JumpStart <
geoff.callender.jumpst...@gmail.com> wrote:

> Totally agree.
>
> Most recently I’ve built an extensive tablet app using T5.4 + PhoneGap.
>
> It’s massively AJAX, but I didn’t have to think about it very much -
> thanks to Zones.
>
> It employs only 5 pages instead of a few hundred - thanks to components
> and Zones. SPA without pain!
>
> The small amount of custom JavaScript is done as components and is
> beautiful (I'd never before thought that possible) - thanks to T5.4 using
> RequireJS.
>
> It runs so fast - fast enough to fool most into believing it is a native
> app - thanks to Zones, RequireJS, and T5.4’s asset handling (and AWS)!
>
> But most of all, it has been a joy to build, and it has let me focus on
> the domain most of the time, which I can’t say is true of any other
> framework I’ve used (not even GWT).
>
> Tapestry, and especially Tapestry 5.4, I take my hat off to you.
>
> Geoff
>
> > On 29 Jul 2016, at 8:38 PM, Qbyte Consulting 
> wrote:
> >
> > After years of Tapestry focus I finally got around to checking out how
> > others are building web apps these days. Spring MVC + REST and Angular
> seem
> > to be flavours of the day and can create some quite slick solutions.
> These
> > approaches are still full of boilerplate code, but things are looking a
> lot
> > better than the early days of Struts.
> >
> > So far as I can see Tapestry and maybe GWT are still the only one stop
> shop
> > for cutting out the boiler plate code and having a focus on domain driven
> > design with components instead of these pattern centric low level
> > approaches.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Tapestry 5.3.6 not recognising named queries

2016-08-01 Thread Qbyte Consulting
Hi,

I have a Maven dependency tree like this:
Entity Classes
DAO Layer
DAO Consumer (Tynamo resteasy layer)

java.lang.IllegalArgumentException: NamedQuery of name:
EUser.findByUsername not found.

In my consumer project everything runs, I can see the entity classes
registering in JPA and my DAO is wired up, but somehow the named queries
aren't available. Any ideas why?

I thought if I referenced the Entity Classes dependency directly in my
consumer layer that it may help because if I access the Entity Classes as a
direct dependency they work.

John

[EL Config]: metadata: 2016-08-01
14:51:09.96--ServerSession(27246127)--Thread(Thread[main,5,main])--The
alias name for the entity class [class EUser] is being defaulted to: EUser.


Tapestry launch a JEE 7 webservice?

2016-08-01 Thread Qbyte Consulting
I am attempting to combine a JPA layer built on Tapestry 5.3.6 with a
RESTful webservice built for JEE 7.

The web service is configured in code:
public class ApplicationConfig extends Application

However Tapestry JPA is configured with the servlet filter in web.xml:
org.apache.tapestry5.TapestryFilter

I'm actually wanting to deploy on Jetty and not use a JEE container. How
can I combine these 2 approaches?

Is there are way to get my AppModule to get Tapestry to serve the web
services?

thanks,
John


Tapestry vs Spring MVC + REST + Angular

2016-07-29 Thread Qbyte Consulting
After years of Tapestry focus I finally got around to checking out how
others are building web apps these days. Spring MVC + REST and Angular seem
to be flavours of the day and can create some quite slick solutions. These
approaches are still full of boilerplate code, but things are looking a lot
better than the early days of Struts.

So far as I can see Tapestry and maybe GWT are still the only one stop shop
for cutting out the boiler plate code and having a focus on domain driven
design with components instead of these pattern centric low level
approaches.


Re: after migrating to T5.4 home page won't load

2016-06-30 Thread Qbyte Consulting
Here are the effective dependencies:



  org.apache.tapestry
  tapestry-core
  5.4.1
  compile


  org.testng
  testng
  5.14.10
  test


  org.easymock
  easymock
  3.0
  test


  org.apache.tapestry
  tapestry-test
  5.4.1
  test


  javax.servlet
  servlet-api
  2.5
  provided


  org.apache.tapestry
  tapestry-javadoc
  5.4.1
  provided


  se.unbound
  tapestry-breadcrumbs
  1.9
  compile


  epulse.tapestry
  tapx-datefield
  1.2
  compile


  org.got5
  tapestry5-jquery
  4.1.1
  compile


  org.apache.tapestry
  tapestry-jpa
  5.4.1
  compile
  

  org.eclipse.persistence
  javax.persistence

  


  javax.mail
  mail
  1.4.5
  compile


  net.sourceforge.jtds
  jtds
  1.2.7
  compile


  postgresql
  postgresql
  9.1-901.jdbc4
  compile


  javax.annotation
  jsr250-api
  1.0
  compile


  org.apache.commons
  commons-io
  1.3.2
  compile


  eu.epulse.auditmanager
  sentinelplus
  1.0.0
  compile


  org.apache.tapestry
  tapestry-kaptcha
  5.4.1
  compile


  commons-beanutils
  commons-beanutils
  1.8.3
  compile


  org.apache.commons
  commons-email
  1.3.2
  compile

  

On Thu, Jun 30, 2016 at 7:22 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Thu, 30 Jun 2016 13:47:31 -0300, Qbyte Consulting <
> qbyteconsult...@gmail.com> wrote:
>
> I got jetty:run to launch the app, but when requesting the home page:
>>
>> HTTP ERROR 500
>>
>> Problem accessing /audit/. Reason:
>>
>> Server Error
>> Caused by:
>>
>> java.lang.AbstractMethodError
>>
>
> This very probably means you have mixed Tapestry versions in your
> classpath.
>
> --
> 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
>
>


after migrating to T5.4 home page won't load

2016-06-30 Thread Qbyte Consulting
I got jetty:run to launch the app, but when requesting the home page:

HTTP ERROR 500

Problem accessing /audit/. Reason:

Server Error
Caused by:

java.lang.AbstractMethodError
at
org.apache.tapestry5.internal.services.ajax.JavaScriptSupportImpl.getModuleNameToStackName(JavaScriptSupportImpl.java:340)
at
org.apache.tapestry5.internal.services.ajax.JavaScriptSupportImpl.findStackForModule(JavaScriptSupportImpl.java:328)
at
org.apache.tapestry5.internal.services.ajax.JavaScriptSupportImpl.require(JavaScriptSupportImpl.java:451)
at $JavaScriptSupport_4ff573b7bca2c.require(Unknown Source)
at $JavaScriptSupport_4ff573b7bc9bd.require(Unknown Source)
at
org.apache.tapestry5.internal.transform.ImportWorker$ModuleImport.apply(ImportWorker.java:168)
at
org.apache.tapestry5.internal.transform.ImportWorker$5.advise(ImportWorker.java:197)
at
org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:92)
at
org.apache.tapestry5.internal.transform.ImportWorker$8.advise(ImportWorker.java:271)
at
org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:92)
at
org.apache.tapestry5.corelib.components.ExceptionDisplay.setupRender(ExceptionDisplay.java)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.invokeComponent(ComponentPageElementImpl.java:174)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:133)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.render(ComponentPageElementImpl.java:181)
at
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:79)
at
org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:121)
at $PageRenderQueue_4ff573b7bca27.render(Unknown Source)
at $PageRenderQueue_4ff573b7bca18.render(Unknown Source)
at
org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37)
at
org.got5.tapestry5.jquery.services.js.JSModule$1.renderMarkup(JSModule.java:40)
at $MarkupRenderer_4ff573b7bca2a.renderMarkup(Unknown Source)
at
org.apache.tapestry5.internal.services.PageNameMetaInjector.renderMarkup(PageNameMetaInjector.java:41)
at $MarkupRenderer_4ff573b7bca2a.renderMarkup(Unknown Source)
at
org.apache.tapestry5.modules.TapestryModule$29.renderMarkup(TapestryModule.java:1807)
at $MarkupRenderer_4ff573b7bca2a.renderMarkup(Unknown Source)
at
org.apache.tapestry5.modules.TapestryModule$28.renderMarkup(TapestryModule.java:1797)
at $MarkupRenderer_4ff573b7bca2a.renderMarkup(Unknown Source)
at
org.apache.tapestry5.modules.TapestryModule$27.renderMarkup(TapestryModule.java:1781)
at $MarkupRenderer_4ff573b7bca2a.renderMarkup(Unknown Source)
at
org.apache.tapestry5.modules.TapestryModule$26.renderMarkup(TapestryModule.java:1765)
at $MarkupRenderer_4ff573b7bca2a.renderMarkup(Unknown Source)
at
org.apache.tapestry5.internal.services.javascript.AddBrowserCompatibilityStyles.renderMarkup(AddBrowserCompatibilityStyles.java:45)
at $MarkupRenderer_4ff573b7bca2a.renderMarkup(Unknown Source)
at
org.apache.tapestry5.internal.services.javascript.ConfigureHTMLElementFilter.renderMarkup(ConfigureHTMLElementFilter.java:45)
at $MarkupRenderer_4ff573b7bca2a.renderMarkup(Unknown Source)
at
org.apache.tapestry5.modules.JavaScriptModule$1.renderMarkup(JavaScriptModule.java:268)
at $MarkupRenderer_4ff573b7bca2a.renderMarkup(Unknown Source)
at
org.apache.tapestry5.modules.TapestryModule$25.renderMarkup(TapestryModule.java:1748)
at $MarkupRenderer_4ff573b7bca2a.renderMarkup(Unknown Source)
at $MarkupRenderer_4ff573b7bca26.renderMarkup(Unknown Source)
at
org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:47)
at $PageMarkupRenderer_4ff573b7bca24.renderPageMarkup(Unknown Source)
at
org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:64)
at $PageResponseRenderer_4ff573b7bca1f.renderPageResponse(Unknown Source)
at
org.apache.tapestry5.internal.services.DefaultRequestExceptionHandler.renderException(DefaultRequestExceptionHandler.java:262)
at
org.apache.tapestry5.internal.services.DefaultRequestExceptionHandler.handleRequestException(DefaultRequestExceptionHandler.java:145)
at $RequestExceptionHandler_4ff573b7bc996.handleRequestException(Unknown
Source)
at
org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:42)
at $RequestHandler_4ff573b7bc998.service(Unknown Source)
at
org.apache.tapestry5.modules.TapestryModule$3.service(TapestryModule.java:846)
at $RequestHandler_4ff573b7bc998.service(Unknown Source)
at
org.apache.tapestry5.modules.TapestryModule$2.service(TapestryModule.java:836)
at $RequestHandler_4ff573b7bc998.service(Unknown Source)
at
org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:89)
at $RequestHandler_4ff573b7bc998

problem accessing assets after migration to 5.4

2016-06-30 Thread Qbyte Consulting
Hi,

I've changed my project deps to T5.4. After fixing some depricated page
link methods my app compiles. However when I run I get exceptions from a
menu loading service:

is = assetSource.getClasspathAsset("menu.properties").getResource()
.openStream();
} catch (RuntimeException e) {
final String msg = "The menu.properties asset can not be found";

java.lang.RuntimeException: Exception constructing service 'MenuService':
Error
invoking constructor public
epulse.audit.manager.services.impl.MenuServiceImpl(o
rg.apache.tapestry5.services.AssetSource,org.slf4j.Logger) throws
java.io.IOExce
ption: The menu.properties asset can not be found
at
org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.ob
tainObjectFromCreator(JustInTimeObjectCreator.java:76)
at
org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.cr
eateObject(JustInTimeObjectCreator.java:55)
at
org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.ea
gerLoadService(JustInTimeObjectCreator.java:88)
at
org.apache.tapestry5.ioc.internal.RegistryImpl.performRegistryStartup
(RegistryImpl.java:357)

This reads in a properties file. It worked before, the files are under
resources in the maven project. Even copying them to the same source
package as the class doesn't resolve the issue, any idea?

John


Tapestry with Selenium and Cucumber

2016-06-30 Thread Qbyte Consulting
Hi,

Are there any Tapestry sample projects around with Selenium and/or Cucumber
tests?

thanks,
John


Re: obtaining markup in a page class to send in email

2016-06-23 Thread Qbyte Consulting
I am using T5.3.6 and sending the html hidden in the form causes jetty
exceptions, it's too much payload. Look like I have to do something server
side, template rendering from the page class would be ideal. Can I enhance
my app with this Tapestry 5.4 service, or is it incompatible?

Yes some smooth xslt integration would be nice. :)

On Thu, Jun 23, 2016 at 3:08 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Thu, 23 Jun 2016 10:25:52 -0300, Qbyte Consulting <
> qbyteconsult...@gmail.com> wrote:
>
> Hi,
>>
>
> Hi!
>
> What would be the way to implement an email button on a page that sends
>> some of the markup to someone? Is there a slick way to do this, or is it
>> more messy like grabbing the markup in JS and passing through the ajax
>> request?
>>
>
> If you're using Tapestry 5.4, use the PartialTemplateRenderer service.
> You'll find one example of its usage in this mailing list's archives.
>
> Anything that would make easier to perform an XML transformation would be
>> nice as well.
>>
>
> That's what XSLT is for. :) Or do you mean making it easier to use XSLT in
> Tapestry?
>
> --
> 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
>
>


obtaining markup in a page class to send in email

2016-06-23 Thread Qbyte Consulting
Hi,

What would be the way to implement an email button on a page that sends
some of the markup to someone? Is there a slick way to do this, or is it
more messy like grabbing the markup in JS and passing through the ajax
request?

Anything that would make easier to perform an XML transformation would be
nice as well.

thanks,
John


Re: Page must be specified before initializing for partial page render.

2016-06-17 Thread Qbyte Consulting
updating to tapestry5-jquery to 3.4.2 version seems to resolve this issue :)

On Fri, Jun 17, 2016 at 11:57 AM, Qbyte Consulting <
qbyteconsult...@gmail.com> wrote:

> Thanks Cezary,
>
> What I found is that making COMBINE_SCRIPTS=false resolves the issue.
>
> configuration.add(JQuerySymbolConstants.SUPPRESS_PROTOTYPE,
> "false");
> configuration.add(JQuerySymbolConstants.JQUERY_ALIAS, "$J");
> configuration.add(SymbolConstants.COMBINE_SCRIPTS, "false");
>
> This will be an acceptable work-around for now, but not ideal.
>
>
>
> On Thu, Jun 16, 2016 at 6:54 PM, Cezary Biernacki 
> wrote:
>
>> Hi John,
>> it is hard to answer your question without any source code or details
>> about
>> your application. My guess your application is using tapestry-jquery and
>> something is incorrectly initialised in production-mode. I would check if
>> you do not encounter problems with your browser caching some old version
>> of
>> JavaScript libraries (IIRC, in Tapestry 5.3 you need to change application
>> version every time asset changes - I recommend ensuring that your build
>> process does that for you). Probably because of failure on JavaScript
>> side,
>> your link clicks with JS, are not actually rewritten to be AJAX links, but
>> normal links, and your event handlers do not check if requests are AJAX
>> (us
>> Request.isXHR method to check that), and blindly try to prepare AJAX
>> rendering, which causes this exception.
>>
>> My recommendations:
>>
>>- See if your links are actually sent as AJAX requests from the
>> browser.
>>
>>- Find and fix the cause of problems reported for JavaScript in the
>>browser. First ensure that your browser does not cached some incorrect
>>version of assets. If it does, ensure that you change application
>> version
>>setting when assets changes. Preferably make your build process to set
>>application version in Tapestry in some automatic way.
>>
>>- In Java, event handlers should check if request is AJAX or not, and
>>use appropriate processing paths for preparing output. Even if you fix
>> your
>>JavaScript problems, your application will be more user friendly and
>> robust
>>by not assuming that these events are always sent via AJAX (e.g. user
>> can
>>have JavaScript disabled, or middle-click on the link, etc.).
>>
>>
>> As I said before, I can only guess what is wrong. If my recommendation
>> would not help, try providing more details and narrow down the problem.
>>
>> Best regards,
>> Cezary
>>
>>
>>
>> On Thu, Jun 16, 2016 at 5:14 PM, Qbyte Consulting <
>> qbyteconsult...@gmail.com
>> > wrote:
>>
>> > Hi,
>> >
>> > My T5.3.6 application works fine with production mode=false. However
>> when
>> > production-mode = true then some linkclicks with JS return:
>> >
>> > An unexpected application exception has occurred.
>> >
>> > Page must be specified before initializing for partial page render.
>> >
>> > This is on the browser console:
>> >
>> > core.js:6947 Uncaught TypeError: element.attachEvent is not a function
>> > SuperfishStack.js:383 Uncaught TypeError: Cannot read property
>> > 'extendInitializers' of undefined
>> > dialog.js:3 Uncaught TypeError: Cannot read property
>> 'extendInitializers'
>> > of undefined
>> > bind.js:3 Uncaught TypeError: Cannot read property 'extendInitializers'
>> of
>> > undefined
>> > jGrowl_init.js:2 Uncaught TypeError: Cannot read property
>> > 'extendInitializers' of undefined
>> > manageusers:17 Uncaught TypeError: Cannot set property 'JQUERY' of
>> > undefined
>> > core.js:7028 Uncaught TypeError: element.dispatchEvent is not a function
>> >
>> > Why is that happening?
>> >
>> > regards,
>> > John
>> >
>> >
>> >
>> > [ERROR] ioc.Registry Page must be specified before initializing for
>> partial
>> > page
>> >  render.
>> > [ERROR] ioc.Registry Operations trace:
>> > [ERROR] ioc.Registry [ 1] Triggering event 'alphabetfilter' on
>> > ManageUsers:users
>> > component
>> > [ERROR] TapestryModule.RequestExceptionHandler Processing of request
>> failed
>> > with
>> >  uncaught exception: Page must be specified before 

Re: Page must be specified before initializing for partial page render.

2016-06-17 Thread Qbyte Consulting
Thanks Cezary,

What I found is that making COMBINE_SCRIPTS=false resolves the issue.

configuration.add(JQuerySymbolConstants.SUPPRESS_PROTOTYPE,
"false");
configuration.add(JQuerySymbolConstants.JQUERY_ALIAS, "$J");
configuration.add(SymbolConstants.COMBINE_SCRIPTS, "false");

This will be an acceptable work-around for now, but not ideal.



On Thu, Jun 16, 2016 at 6:54 PM, Cezary Biernacki 
wrote:

> Hi John,
> it is hard to answer your question without any source code or details about
> your application. My guess your application is using tapestry-jquery and
> something is incorrectly initialised in production-mode. I would check if
> you do not encounter problems with your browser caching some old version of
> JavaScript libraries (IIRC, in Tapestry 5.3 you need to change application
> version every time asset changes - I recommend ensuring that your build
> process does that for you). Probably because of failure on JavaScript side,
> your link clicks with JS, are not actually rewritten to be AJAX links, but
> normal links, and your event handlers do not check if requests are AJAX (us
> Request.isXHR method to check that), and blindly try to prepare AJAX
> rendering, which causes this exception.
>
> My recommendations:
>
>- See if your links are actually sent as AJAX requests from the browser.
>
>- Find and fix the cause of problems reported for JavaScript in the
>browser. First ensure that your browser does not cached some incorrect
>version of assets. If it does, ensure that you change application
> version
>setting when assets changes. Preferably make your build process to set
>application version in Tapestry in some automatic way.
>
>- In Java, event handlers should check if request is AJAX or not, and
>use appropriate processing paths for preparing output. Even if you fix
> your
>JavaScript problems, your application will be more user friendly and
> robust
>by not assuming that these events are always sent via AJAX (e.g. user
> can
>have JavaScript disabled, or middle-click on the link, etc.).
>
>
> As I said before, I can only guess what is wrong. If my recommendation
> would not help, try providing more details and narrow down the problem.
>
> Best regards,
> Cezary
>
>
>
> On Thu, Jun 16, 2016 at 5:14 PM, Qbyte Consulting <
> qbyteconsult...@gmail.com
> > wrote:
>
> > Hi,
> >
> > My T5.3.6 application works fine with production mode=false. However when
> > production-mode = true then some linkclicks with JS return:
> >
> > An unexpected application exception has occurred.
> >
> > Page must be specified before initializing for partial page render.
> >
> > This is on the browser console:
> >
> > core.js:6947 Uncaught TypeError: element.attachEvent is not a function
> > SuperfishStack.js:383 Uncaught TypeError: Cannot read property
> > 'extendInitializers' of undefined
> > dialog.js:3 Uncaught TypeError: Cannot read property 'extendInitializers'
> > of undefined
> > bind.js:3 Uncaught TypeError: Cannot read property 'extendInitializers'
> of
> > undefined
> > jGrowl_init.js:2 Uncaught TypeError: Cannot read property
> > 'extendInitializers' of undefined
> > manageusers:17 Uncaught TypeError: Cannot set property 'JQUERY' of
> > undefined
> > core.js:7028 Uncaught TypeError: element.dispatchEvent is not a function
> >
> > Why is that happening?
> >
> > regards,
> > John
> >
> >
> >
> > [ERROR] ioc.Registry Page must be specified before initializing for
> partial
> > page
> >  render.
> > [ERROR] ioc.Registry Operations trace:
> > [ERROR] ioc.Registry [ 1] Triggering event 'alphabetfilter' on
> > ManageUsers:users
> > component
> > [ERROR] TapestryModule.RequestExceptionHandler Processing of request
> failed
> > with
> >  uncaught exception: Page must be specified before initializing for
> partial
> > page
> >  render.
> > org.apache.tapestry5.ioc.internal.OperationException: Page must be
> > specified bef
> > ore initializing for partial page render. [at
> > classpath:xx/audit/manager/pag
> > es/ManageUsers.tml, line 38]
> > at
> > org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(
> > OperationTrackerImpl.java:121)
> > at
> > org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(Operati
> > onTrackerImpl.java:88)
> > at
> > org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(Pe
> > 

Page must be specified before initializing for partial page render.

2016-06-16 Thread Qbyte Consulting
Hi,

My T5.3.6 application works fine with production mode=false. However when
production-mode = true then some linkclicks with JS return:

An unexpected application exception has occurred.

Page must be specified before initializing for partial page render.

This is on the browser console:

core.js:6947 Uncaught TypeError: element.attachEvent is not a function
SuperfishStack.js:383 Uncaught TypeError: Cannot read property
'extendInitializers' of undefined
dialog.js:3 Uncaught TypeError: Cannot read property 'extendInitializers'
of undefined
bind.js:3 Uncaught TypeError: Cannot read property 'extendInitializers' of
undefined
jGrowl_init.js:2 Uncaught TypeError: Cannot read property
'extendInitializers' of undefined
manageusers:17 Uncaught TypeError: Cannot set property 'JQUERY' of undefined
core.js:7028 Uncaught TypeError: element.dispatchEvent is not a function

Why is that happening?

regards,
John



[ERROR] ioc.Registry Page must be specified before initializing for partial
page
 render.
[ERROR] ioc.Registry Operations trace:
[ERROR] ioc.Registry [ 1] Triggering event 'alphabetfilter' on
ManageUsers:users
component
[ERROR] TapestryModule.RequestExceptionHandler Processing of request failed
with
 uncaught exception: Page must be specified before initializing for partial
page
 render.
org.apache.tapestry5.ioc.internal.OperationException: Page must be
specified bef
ore initializing for partial page render. [at
classpath:xx/audit/manager/pag
es/ManageUsers.tml, line 38]
at
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(
OperationTrackerImpl.java:121)
at
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(Operati
onTrackerImpl.java:88)
at
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(Pe
rThreadOperationTracker.java:87)
at
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.ja
va:1124)
at
org.apache.tapestry5.internal.structure.ComponentPageElementResources
Impl.invoke(ComponentPageElementResourcesImpl.java:146)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.trig
gerContextEvent(ComponentPageElementImpl.java:1053)
at
org.apache.tapestry5.internal.services.ComponentEventRequestHandlerIm
pl.handle(ComponentEventRequestHandlerImpl.java:81)
at
org.apache.tapestry5.internal.services.ImmediateActionRenderResponseF
ilter.handle(ImmediateActionRenderResponseFilter.java:42)
at $ComponentEventRequestHandler_ae9391b333f0.handle(Unknown Source)
at
org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.j
ava:42)
at $ComponentEventRequestHandler_ae9391b333f0.handle(Unknown Source)
at
org.apache.tapestry5.upload.internal.services.UploadExceptionFilter.h
andle(UploadExceptionFilter.java:75)
at $ComponentEventRequestHandler_ae9391b333f0.handle(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$41.handle(TapestryModule
.java:2476)
at $ComponentEventRequestHandler_ae9391b333f0.handle(Unknown Source)
at $ComponentEventRequestHandler_ae9391b3339f.handle(Unknown Source)
at
org.apache.tapestry5.internal.services.ComponentRequestHandlerTermina
tor.handleComponentEvent(ComponentRequestHandlerTerminator.java:43)
at
org.apache.tapestry5.services.InitializeActivePageName.handleComponen
tEvent(InitializeActivePageName.java:39)
at
$ComponentRequestHandler_ae9391b333a1.handleComponentEvent(Unknown So
urce)
at
xx.audit.manager.services.PageProtectionFilter.handleComponentEve
nt(PageProtectionFilter.java:113)
at
$ComponentRequestFilter_ae9391b3339e.handleComponentEvent(Unknown Sou
rce)
at
$ComponentRequestHandler_ae9391b333a1.handleComponentEvent(Unknown So
urce)
at
$ComponentRequestHandler_ae9391b33298.handleComponentEvent(Unknown So
urce)
at
org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispa
tch(ComponentEventDispatcher.java:46)
at $Dispatcher_ae9391b3329a.dispatch(Unknown Source)
at $Dispatcher_ae9391b33290.dispatch(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator
.service(TapestryModule.java:302)
at
org.apache.tapestry5.internal.services.RequestErrorFilter.service(Req
uestErrorFilter.java:26)
at $RequestHandler_ae9391b33291.service(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule
.java:902)
at $RequestHandler_ae9391b33291.service(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule
.java:892)
at $RequestHandler_ae9391b33291.service(Unknown Source)
at
org.apache.tapestry5.internal.services.StaticFilesFilter.service(Stat
icFilesFilter.java:90)
at $RequestHandler_ae9391b33291.service(Unknown Source)
at
xx.audit.manager.services.AppModule$1.service(AppModule.java:230)

at $RequestFilter_ae9391

http redirection to https port 443

2016-06-02 Thread Qbyte Consulting
Hi,

I've been trying to configure Jetty 9.2 to redirect http requests to https
port 443. No luck so far.

The app has confured web.xml to secure it.

I seem to recall that Tapestry (using 3.6) might have some kind of module
configuration for identifying ports to use?

As it stands http requests get converted to https requests but port 80 gets
inserted into the URL which of course does not work. The port needs to be
dropped or replaced with 443.

Any ideas if I am right and how to provide that secure port number
correctly or just drop the port number?

John


input form error causes div to clear left

2016-04-07 Thread Qbyte Consulting
I have a form made up of 4 divs, the top 2 lay side by side using
float:left, the next 2 are clear left so they stack underneath.

When a field in the top right div contains an error the whole div clears
left distorting the whole form into 4 stacked divs.

How do I stop tapestries errors from messing up my form layout?

regards,
John


Tapestry 5.3.7 with Tanuki service wrapper

2016-03-29 Thread Qbyte Consulting
Hi,

Has anyone had success running ioc via the Tanuki Service Wrapper product?

I'm having problems with Tapestry instantiating a DAO service that is
injected with EntityManager references.

Suspect a class loader problem, I'm getting inconsistent results. All works
fine from the command line launch?

Probably means this isn't a Tapestry issue, but just interested to know
anyone who's had a good result with Tanuki starting Tapestry?

John


Re: render nested component

2016-03-20 Thread Qbyte Consulting
tapestry5/corelib/components/Tree.java#Tree.0resources>.createEventLink
<http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tapestry/tapestry-core/5.3.1/org/apache/tapestry5/ComponentResourcesCommon.java#ComponentResourcesCommon.createEventLink%28java.lang.String%2Cjava.lang.Object%5B%5D%29>("markExpanded",
node.getId 
<http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tapestry/tapestry-core/5.3.1/org/apache/tapestry5/tree/TreeNode.java#TreeNode.getId%28%29>());

180 
<http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tapestry/tapestry-core/5.3.1/org/apache/tapestry5/corelib/components/Tree.java#180>

<http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tapestry/tapestry-core/5.3.1/org/apache/tapestry5/corelib/components/Tree.java#>

Link
<http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tapestry/tapestry-core/5.3.1/org/apache/tapestry5/Link.java#Link>
markCollapsed = resources
<http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tapestry/tapestry-core/5.3.1/org/apache/tapestry5/corelib/components/Tree.java#Tree.0resources>.createEventLink
<http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tapestry/tapestry-core/5.3.1/org/apache/tapestry5/ComponentResourcesCommon.java#ComponentResourcesCommon.createEventLink%28java.lang.String%2Cjava.lang.Object%5B%5D%29>("markCollapsed",
node.getId 
<http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tapestry/tapestry-core/5.3.1/org/apache/tapestry5/tree/TreeNode.java#TreeNode.getId%28%29>());

181 
<http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tapestry/tapestry-core/5.3.1/org/apache/tapestry5/corelib/components/Tree.java#181>

<http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tapestry/tapestry-core/5.3.1/org/apache/tapestry5/corelib/components/Tree.java#>

182 
<http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tapestry/tapestry-core/5.3.1/org/apache/tapestry5/corelib/components/Tree.java#182>

<http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tapestry/tapestry-core/5.3.1/org/apache/tapestry5/corelib/components/Tree.java#>

spec.put
<http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tapestry/tapestry-json/5.3.1/org/apache/tapestry5/json/JSONObject.java#JSONObject.put%28java.lang.String%2Cjava.lang.Object%29>("expandChildrenURL",
expandChildren.toString
<http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b27/java/lang/Object.java#Object.toString%28%29>())

183 
<http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tapestry/tapestry-core/5.3.1/org/apache/tapestry5/corelib/components/Tree.java#183>

<http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tapestry/tapestry-core/5.3.1/org/apache/tapestry5/corelib/components/Tree.java#>

.put
<http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tapestry/tapestry-json/5.3.1/org/apache/tapestry5/json/JSONObject.java#JSONObject.put%28java.lang.String%2Cjava.lang.Object%29>("markExpandedURL",
markExpanded.toString
<http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b27/java/lang/Object.java#Object.toString%28%29>())

184 
<http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tapestry/tapestry-core/5.3.1/org/apache/tapestry5/corelib/components/Tree.java#184>

<http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tapestry/tapestry-core/5.3.1/org/apache/tapestry5/corelib/components/Tree.java#>

.put
<http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tapestry/tapestry-json/5.3.1/org/apache/tapestry5/json/JSONObject.java#JSONObject.put%28java.lang.String%2Cjava.lang.Object%29>("markCollapsedURL",
markCollapsed.toString
<http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b27/java/lang/Object.java#Object.toString%28%29>());


On Mon, Mar 21, 2016 at 10:47 AM, Qbyte Consulting <
qbyteconsult...@gmail.com> wrote:

> Tree uses BaseComponent that doesn't seem to be in tapestry5?
>
> On Fri, Mar 18, 2016 at 2:15 PM, Chris Poulsen 
> wrote:
>
>> Hi,
>>
>> Take a look at the Tapestry Tree component to see how recursive rendering
>> can be done.
>>
>> --
>> Chris
>>
>> On Fri, Mar 18, 2016 at 6:17 AM, Qbyte Consulting <
>> qbyteconsult...@gmail.com
>> > wrote:
>>
>> > I am creating a Menu component (for a ul tag) that needs to
>> > programmatically generate the child links.
>> >
>> > I already have a MenuItem component, but this is parameter bound to a
>> > template, whereas now I need to programmatically drive the parameters.
>> >
>> > I either need to be able to create the existi

Re: render nested component

2016-03-20 Thread Qbyte Consulting
Tree uses BaseComponent that doesn't seem to be in tapestry5?

On Fri, Mar 18, 2016 at 2:15 PM, Chris Poulsen 
wrote:

> Hi,
>
> Take a look at the Tapestry Tree component to see how recursive rendering
> can be done.
>
> --
> Chris
>
> On Fri, Mar 18, 2016 at 6:17 AM, Qbyte Consulting <
> qbyteconsult...@gmail.com
> > wrote:
>
> > I am creating a Menu component (for a ul tag) that needs to
> > programmatically generate the child links.
> >
> > I already have a MenuItem component, but this is parameter bound to a
> > template, whereas now I need to programmatically drive the parameters.
> >
> > I either need to be able to create the existing MenuItem objects somehow
> in
> > the Menu component and render them, or I simply write the links out in
> the
> > menu - however since my Menu component isn't extending AbstractLink (like
> > MenuItem) I can't use writeLink().
> >
> > Any ideas what is the simplest approach to resolve this? Code below.
> >
> > John
> >
> >
> > public class Menu {
> >
> > /** The text. */
> > @Parameter(required = true, allowNull = false, defaultPrefix =
> > BindingConstants.LITERAL)
> > private String name;
> >
> > /** The resources. */
> > @Inject
> > private ComponentResources resources;
> >
> > /** The component source. */
> > @Inject
> > private ComponentSource componentSource;
> >
> > @Inject
> > private PageRenderLinkSource linkSource;
> >
> > /** The messages. */
> > @Inject
> > private Messages messages;
> >
> > @Inject
> > private MenuService menuService;
> >
> > /** The state bean. */
> > @SessionState(create = false)
> > private SessionStateBean stateBean;
> >
> > /**
> >  * If provided, this is the activation context for the target page
> (the
> >  * information will be encoded into the URL). If not provided, then
> the
> >  * target page will provide its own activation context.
> >  */
> > @Parameter
> > private Object[] context;
> >
> > /**
> >  * Begin render.
> >  *
> >  * @param writer the writer
> >  */
> > void beginRender(MarkupWriter writer) {
> > writer.element("ul");
> > for (String pageName :
> > menuService.getPageNames(MenuService.Menu.valueOf(name))) {
> > renderMenuItem(pageName, writer);
> > }
> > }
> >
> > private void renderMenuItem(String page, MarkupWriter writer) {
> > Link link = resources.createPageLink(page,
> >resources.isBound("context"), context);
> >writer.element("li");
> > NO!!writeLink(writer, link);
> >  writer.writeRaw(messages.get(page.toLowerCase().concat(".link")));
> > writer.end();
> > writer.end();
> > }
> >
> > /**
> >  * After render.
> >  *
> >  * @param writer the writer
> >  */
> > void afterRender(MarkupWriter writer) {
> >writer.end();
> > }
> > }
> >
> >
> > public class MenuItem extends AbstractLink {
> >
> > /**
> >  * The logical name of the page to link to.
> >  */
> > @Parameter(required = true, allowNull = false, defaultPrefix =
> > BindingConstants.LITERAL)
> > private String page;
> >
> > /** The text. */
> > @Parameter(required = true, allowNull = false, defaultPrefix =
> > BindingConstants.LITERAL)
> > private String text;
> >
> > /** The resources. */
> > @Inject
> > private ComponentResources resources;
> >
> > /** The component source. */
> > @Inject
> > private ComponentSource componentSource;
> >
> > /** The state bean. */
> > @SessionState(create = false)
> > private SessionStateBean stateBean;
> >
> > /**
> >  * If provided, this is the activation context for the target page
> (the
> >  * information will be encoded into the URL). If not provided, then
> the
> >  * target page will provide its own activation context.
> >  */
> > @Parameter
> > private Object[] context;
> >
> > /**
> >  * Begin render.
> >  *
> >  * @param writer the writer
> >  */
> > void beginRender(MarkupWriter writer) {
> > if (isDisabled())
> >return;
> >Link link = resources.createPageLink(page,
> >resources.isBound("context"), context);
> >writer.element("li");
> >writeLink(writer, link);
> >writer.writeRaw(text);
> > }
> >
> > /**
> >  * After render.
> >  *
> >  * @param writer the writer
> >  */
> > void afterRender(MarkupWriter writer) {
> > if (isDisabled())
> >return;
> > writer.end();
> > writer.end();
> > }
> > }
> >
>


Re: exception during bind

2016-03-19 Thread Qbyte Consulting
oryImpl.java:64)
at
org.apache.tapestry5.ioc.internal.ModuleImpl.createProxyInstance(ModuleImpl.java:465)
at
org.apache.tapestry5.ioc.internal.ModuleImpl.createProxy(ModuleImpl.java:459)
at
org.apache.tapestry5.ioc.internal.ModuleImpl.access$900(ModuleImpl.java:39)
at
org.apache.tapestry5.ioc.internal.ModuleImpl$4.invoke(ModuleImpl.java:311)
... 17 more

On Thu, Mar 17, 2016 at 10:25 AM, Qbyte Consulting <
qbyteconsult...@gmail.com> wrote:

>
> Exception in thread "main" java.lang.RuntimeException: Error invoking
> service binder method
> compliancereports.services.ComplianceReportsModule.bind(ServiceBinder) (at
> ComplianceReportsModule.java:65): Unresolved compilation problem:
>
> at
> org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.bind(DefaultModuleDefImpl.java:562)
> at
> org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.(DefaultModuleDefImpl.java:123)
> at org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:131)
> at
> org.apache.tapestry5.ioc.RegistryBuilder.buildAndStartupRegistry(RegistryBuilder.java:209)
> at
> org.apache.tapestry5.ioc.RegistryBuilder.buildAndStartupRegistry(RegistryBuilder.java:229)
> at
> compliancereports.ComplianceReportsMain.main(ComplianceReportsMain.java:26)
> Caused by: java.lang.Error: Unresolved compilation problem:
>
> at
> compliancereports.services.ComplianceReportsModule.bind(ComplianceReportsModule.java:65)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>


render nested component

2016-03-19 Thread Qbyte Consulting
I am creating a Menu component (for a ul tag) that needs to
programmatically generate the child links.

I already have a MenuItem component, but this is parameter bound to a
template, whereas now I need to programmatically drive the parameters.

I either need to be able to create the existing MenuItem objects somehow in
the Menu component and render them, or I simply write the links out in the
menu - however since my Menu component isn't extending AbstractLink (like
MenuItem) I can't use writeLink().

Any ideas what is the simplest approach to resolve this? Code below.

John


public class Menu {

/** The text. */
@Parameter(required = true, allowNull = false, defaultPrefix =
BindingConstants.LITERAL)
private String name;

/** The resources. */
@Inject
private ComponentResources resources;

/** The component source. */
@Inject
private ComponentSource componentSource;

@Inject
private PageRenderLinkSource linkSource;

/** The messages. */
@Inject
private Messages messages;

@Inject
private MenuService menuService;

/** The state bean. */
@SessionState(create = false)
private SessionStateBean stateBean;

/**
 * If provided, this is the activation context for the target page (the
 * information will be encoded into the URL). If not provided, then the
 * target page will provide its own activation context.
 */
@Parameter
private Object[] context;

/**
 * Begin render.
 *
 * @param writer the writer
 */
void beginRender(MarkupWriter writer) {
writer.element("ul");
for (String pageName :
menuService.getPageNames(MenuService.Menu.valueOf(name))) {
renderMenuItem(pageName, writer);
}
}

private void renderMenuItem(String page, MarkupWriter writer) {
Link link = resources.createPageLink(page,
   resources.isBound("context"), context);
   writer.element("li");
NO!!writeLink(writer, link);
 writer.writeRaw(messages.get(page.toLowerCase().concat(".link")));
writer.end();
writer.end();
}

/**
 * After render.
 *
 * @param writer the writer
 */
void afterRender(MarkupWriter writer) {
   writer.end();
}
}


public class MenuItem extends AbstractLink {

/**
 * The logical name of the page to link to.
 */
@Parameter(required = true, allowNull = false, defaultPrefix =
BindingConstants.LITERAL)
private String page;

/** The text. */
@Parameter(required = true, allowNull = false, defaultPrefix =
BindingConstants.LITERAL)
private String text;

/** The resources. */
@Inject
private ComponentResources resources;

/** The component source. */
@Inject
private ComponentSource componentSource;

/** The state bean. */
@SessionState(create = false)
private SessionStateBean stateBean;

/**
 * If provided, this is the activation context for the target page (the
 * information will be encoded into the URL). If not provided, then the
 * target page will provide its own activation context.
 */
@Parameter
private Object[] context;

/**
 * Begin render.
 *
 * @param writer the writer
 */
void beginRender(MarkupWriter writer) {
if (isDisabled())
   return;
   Link link = resources.createPageLink(page,
   resources.isBound("context"), context);
   writer.element("li");
   writeLink(writer, link);
   writer.writeRaw(text);
}

/**
 * After render.
 *
 * @param writer the writer
 */
void afterRender(MarkupWriter writer) {
if (isDisabled())
   return;
writer.end();
writer.end();
}
}


exception during bind

2016-03-19 Thread Qbyte Consulting
Exception in thread "main" java.lang.RuntimeException: Error invoking
service binder method
compliancereports.services.ComplianceReportsModule.bind(ServiceBinder) (at
ComplianceReportsModule.java:65): Unresolved compilation problem:

at
org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.bind(DefaultModuleDefImpl.java:562)
at
org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.(DefaultModuleDefImpl.java:123)
at org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:131)
at
org.apache.tapestry5.ioc.RegistryBuilder.buildAndStartupRegistry(RegistryBuilder.java:209)
at
org.apache.tapestry5.ioc.RegistryBuilder.buildAndStartupRegistry(RegistryBuilder.java:229)
at
compliancereports.ComplianceReportsMain.main(ComplianceReportsMain.java:26)
Caused by: java.lang.Error: Unresolved compilation problem:

at
compliancereports.services.ComplianceReportsModule.bind(ComplianceReportsModule.java:65)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)