T5.3 MethodInvocation

2012-10-26 Thread Blower, Andy
In Tapestry 5.3, the Invocation interface was deprecated in favour of 
MethodInvocation. I'm updating our code to use the new MethodInvocation 
interface and there are some things missing, most of which I can simply use 
getMethod() for.

E.g. (please correct me if any of these are wrong)

invocation.getResultType()  -  
invocation.getMethod().getReturnType()
invocation.getMethodName()-  invocation.getMethod().getName()
invocation.getParameterCount()   - 
invocation.getMethod().getParameterTypes().length


Unfortunately I can't find a replacement for getResult(), which we use in some 
of our method advice. What should I use instead or is this an oversight in the 
new interface?


RE: T5.3 MethodInvocation

2012-10-26 Thread Blower, Andy
Found it, there's getReturnValue() in the MethodInvocationResult interface.

-Original Message-
From: Blower, Andy [mailto:andy.blo...@proquest.co.uk] 
Sent: 26 October 2012 15:38
To: users@tapestry.apache.org
Subject: T5.3 MethodInvocation

In Tapestry 5.3, the Invocation interface was deprecated in favour of 
MethodInvocation. I'm updating our code to use the new MethodInvocation 
interface and there are some things missing, most of which I can simply use 
getMethod() for.

E.g. (please correct me if any of these are wrong)

invocation.getResultType()  -  
invocation.getMethod().getReturnType()
invocation.getMethodName()-  invocation.getMethod().getName()
invocation.getParameterCount()   - 
invocation.getMethod().getParameterTypes().length


Unfortunately I can't find a replacement for getResult(), which we use in some 
of our method advice. What should I use instead or is this an oversight in the 
new interface?


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



RE: Tapestry 5.3.4-rc-7

2012-08-28 Thread Blower, Andy
I've just tried the YUIcompressor 2.4.7 module from the T5.3.5 candidate and I 
am having issues with it too. It seems to be inserting the string get after 
closing curly braces which causes syntax errors when the browser parses the JS. 
Is this the issue you were seeing?

-Original Message-
From: Howard Lewis Ship [mailto:hls...@gmail.com] 
Sent: 28 June 2012 19:28
To: Tapestry users
Subject: Re: Tapestry 5.3.4-rc-7

I've been having problems with even with YUICompressor 2.4.7 in a production 
app.

On Thu, Jun 28, 2012 at 10:05 AM, Jochen Frey joc...@jochenfrey.com wrote:

 +1 for the YUI compressor.  It really looks broken in production
 environments, and it's an easy fix.

 On Jun 28, 2012, at 7:51 AM, Christian Riedel wrote:

  Ok, one thing could also be quickly done: upgrading the 
  yuicompressor
 lib to 2.4.7 like suggested in TAP5-1729.
  Minification/Resource combination with tapestry-yuicompressor is 
  really
 broken without that and it's quite easy to fix.
 
  https://issues.apache.org/jira/browse/TAP5-1729
 
 
  Am 28.06.2012 um 16:17 schrieb Luca Menegus:
 
  Hi,
  can someone fix TAP5-1926 and have a look at the problem I reported 
  on
 BeanEditor and BeanValidation [1]?
  And yes, Everything's stable with rc-7!
 
 
 
  [1]
 http://tapestry.1045711.n5.nabble.com/BeanEditor-should-always-provide
 -a-new-BeanValidationContext-JSR-303-tp5713975.html
 
 
  - Original Message -
  From: Howard Lewis Ship hls...@gmail.com
  To: Tapestry users users@tapestry.apache.org
  Sent: Monday, 25 June, 2012 7:44:33 PM
  Subject: Tapestry 5.3.4-rc-7
 
  I've just uploaded Tapestry 5.3.4-rc-7.  Key improvements:
 
  * More (minor) speed improvements
  * TAP5-1873: JavaScript execution exception is not logged
  * Fixes the Hibernate dependency to match 5.3.3
  * TAP5-1880: Disable GZip compression for HTTP/1.0
  * TAP5-1938: JpaValueEncoder encodes transient value as null 
  instead of throwing an exception
  * Upgrade to Gradle 1.0 (including the Maven archetype)
 
  I expect to run a vote to release this as 5.3.4 in the near 
  future, so feedback is greatly appreciated!
 
  --
  Howard M. Lewis Ship
 
  Creator of Apache Tapestry
 
  The source for Tapestry training, mentoring and support. Contact 
  me to learn how I can get you up and productive in Tapestry fast!
 
  (971) 678-5210
  http://howardlewisship.com
 
 
  ---
  -- 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
 

 ---
  joc...@jochenfrey.com
  +1.415.366.0450
   @jochen_frey




--
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to learn 
how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com


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



T5.3.5 candidate release dependency issue - yuicompressor

2012-08-21 Thread Blower, Andy
Hi,

Having trouble installing the latest version of tapestry-yuicompressor for the 
candidate release being voted on, T5.3.5.

It seems that the organisation for the yuicompressor module was changed from 
com.yahoo.platform.yui to 
com.google.code.maven-play-plugin.com.yahoo.platform.yui in T5.3.3, but since 
I've not updated since T5.3.2 was released I've not run into this issue. 
Basically I can't resolve this dependency. I can find 
com.yahoo.platform.yui/yuicompressor/2.4.7 but not  
com.google.code.maven-play-plugin.com.yahoo.platform.yui/yuicompressor/2.4.7 
anywhere.

What is the reason for this org change and what can I do to resolve this 
dependency? The rest of 5.3.5 looks good, but I can't +1 until this is 
resolved, although it's probably a simple thing.

For info, here are the lines from my Ivy.xml dependency files for 
tapestry-yuicompressor, 5.3.2 first and 5.3.5 second.

dependency org=com.yahoo.platform.yui name=yuicompressor rev=2.4.6 
force=true conf=compile-compile(*),master(*);runtime-runtime(*)/

dependency org=com.google.code.maven-play-plugin.com.yahoo.platform.yui 
name=yuicompressor rev=2.4.7 force=true 
conf=compile-compile(*),master(*);runtime-runtime(*)/


Thanks,

Andy.


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



RE: T5.3.5 candidate release dependency issue - yuicompressor

2012-08-21 Thread Blower, Andy
I finally managed to install it, figured out that it needed a new repository 
configuring. 

http://maven-play-plugin.googlecode.com/svn/mavenrepo/releases/

I'm still curious as to the reason for the change since there seems to be a 
version of yuicompressor 2.4.7 on 

http://mvnrepository.com/artifact/com.yahoo.platform.yui/yuicompressor/2.4.7


-Original Message-
From: Blower, Andy [mailto:andy.blo...@proquest.co.uk] 
Sent: 21 August 2012 12:59
To: Tapestry users
Subject: T5.3.5 candidate release dependency issue - yuicompressor

Hi,

Having trouble installing the latest version of tapestry-yuicompressor for the 
candidate release being voted on, T5.3.5.

It seems that the organisation for the yuicompressor module was changed from 
com.yahoo.platform.yui to 
com.google.code.maven-play-plugin.com.yahoo.platform.yui in T5.3.3, but since 
I've not updated since T5.3.2 was released I've not run into this issue. 
Basically I can't resolve this dependency. I can find 
com.yahoo.platform.yui/yuicompressor/2.4.7 but not  
com.google.code.maven-play-plugin.com.yahoo.platform.yui/yuicompressor/2.4.7 
anywhere.

What is the reason for this org change and what can I do to resolve this 
dependency? The rest of 5.3.5 looks good, but I can't +1 until this is 
resolved, although it's probably a simple thing.

For info, here are the lines from my Ivy.xml dependency files for 
tapestry-yuicompressor, 5.3.2 first and 5.3.5 second.

dependency org=com.yahoo.platform.yui name=yuicompressor rev=2.4.6 
force=true conf=compile-compile(*),master(*);runtime-runtime(*)/

dependency org=com.google.code.maven-play-plugin.com.yahoo.platform.yui 
name=yuicompressor rev=2.4.7 force=true 
conf=compile-compile(*),master(*);runtime-runtime(*)/


Thanks,

Andy.


-
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



Post-redirect-get paradigm

2012-07-24 Thread Blower, Andy
Hi, I'm trying to find the page of documentation that describes how Tapestry 
uses  processes URL's. With details of the post-redirect-get paradigm and page 
render vs. event handling etc.

Unfortunately I cannot find this anywhere, but I'm convinced I read one several 
years ago. Is my memory playing tricks on me or can anyone link to it for me.

Thanks,

Andy

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


RE: [T5.3] Contributing a Service Override using addInstance()

2012-02-24 Thread Blower, Andy
Sorry, premature celebration. :-(

It works until the proxy is serialized, which throws a 
NotSerializableException. In normal binding / override the proxy is a 
JustInTimeObjectCreator and using this proxy it seems to be a 
ReloadableObjectCreator, but nether of them are marked as Serializable so I'm 
not sure how it normally works. My understanding was that SSO's could hold 
references to services since these were simply referring to a proxy which 
essentially could be serialized and replicated across a cluster since it only 
sent a token.

How far out am I here?


-Original Message-
From: Blower, Andy [mailto:andy.blo...@proquest.co.uk] 
Sent: 22 February 2012 17:35
To: Tapestry users
Subject: RE: [T5.3] Contributing a Service Override using addInstance()

Yes that works! I had no idea you could do such a thing as I'd not see it 
anywhere in the documentation. 

I don't know if an addProxy() method is worth adding, our requirements seem 
quite unusual. If it would be useful to other Tapestry users then maybe.

Thanks for the reply Howard.

-Original Message-
From: Howard Lewis Ship [mailto:hls...@gmail.com]
Sent: 21 February 2012 19:51
To: Tapestry users
Subject: Re: [T5.3] Contributing a Service Override using addInstance()

This might work:

 @Contribute(ServiceOverride.class)

 public static void
setupApplicationServiceOverrides(MappedConfigurationClass,Object
configuration, ObjectLocator locator)

 {
  SomeServiceType override = locator.proxy(SomeServiceType.class,
SomeServiceTypeOverrideImpl.class);

   configuration.add(SomeServiceType.class, override);

 }


This contributes a proxy for the override, rather than the override itself ... 
meaning that eventual construction of SomeServiceTypeOverrideImpl is deferred 
until needed, and that will be after the MasterObjectProvider and 
ServicesOverride are constructed.

Give it a try and report back!

Perhaps we need complement addInstance() methods with addProxy() methods on the 
Configuration/OrderedConfiguration/MappedConfiguration
interfaces?


On Tue, Feb 21, 2012 at 6:33 AM, Blower, Andy andy.blo...@proquest.co.uk 
wrote:
 Thanks for the reply Steve. The two classes I mention are Tapestry IoC 
 classes, not my own.

 What you describe is how most of our overrides are implemented but this one 
 is conditional - we only need to override this service in a specific 
 environment and that's what causes the issue. If I define it like that if the 
 override is not applied then the IoC has two implementations bound (if you 
 don't bind it you can't have it injected into the override method) and will 
 throw errors whenever the service is injected without a specific ID. There 
 are 100's of places where we have plain injections and is not practical to 
 change them.


 -Original Message-
 From: Steve Eynon [mailto:steve.ey...@alienfactory.co.uk]
 Sent: 21 February 2012 10:36
 To: Tapestry users
 Subject: Re: [T5.3] Contributing a Service Override using
 addInstance()

 Hi, I'm not really sure what's going on as the two classes you mention, 
 ValidatingMappedConfigurationWrapper  AbstractConfigurationImpl, don't 
 appear in your code snippet.

 If you define your overriding service as an Interface (say in the
 bind() method) then T5 will create a proxy for it.

 public static void bind(ServiceBinder binder) {
        binder.bind(ToOverrideInterface.class,
 ToOverrideImpl.class).withId(anything so we don't conflict with the 
 existing ID); }

 then you can inject that in the service override like this:

 public static void contributeServiceOverride(MappedConfiguration
 config, @Local ToOverrideInterface override) {
        config.add(ToOverrideInterface.class, override); }

 The @Local is important, otherwise T5 doesn't know which serivce to inject 
 (yours or the one you're trying to override).

 Steve.


 On 20 February 2012 20:54, Blower, Andy andy.blo...@proquest.co.uk wrote:
 I managed to get this to work by tracking down all dependencies and finding 
 that one was being used in the services' constructor. Once I moved the 
 initialisation code into a lazy init method I stopped getting the exceptions.

 Unfortunately, I still have an issue because when using addInstance() 
 Tapestry is not using a proxy for the overriding service implementation, 
 instead I'm getting a concrete reference instead which I thought never 
 happened with Tapestry IoC. This causes problems when used in objects that 
 are serialized to the session because it tries to serialize the service 
 implementation rather than just the service proxy.

 My override looks like this:

        @Contribute(ServiceOverride.class)
        public static void
 setupApplicationServiceOverrides(MappedConfigurationClass?,
 Object
 configuration)
        {
                configuration.addInstance(ProductConfig.class,
 DynamicMultiProductConfig.class);
        }

 Basically the contributionType in ValidatingMappedConfigurationWrapper 
 (AbstractConfigurationImpl) is Object

RE: [T5.3] Contributing a Service Override using addInstance()

2012-02-22 Thread Blower, Andy
Yes that works! I had no idea you could do such a thing as I'd not see it 
anywhere in the documentation. 

I don't know if an addProxy() method is worth adding, our requirements seem 
quite unusual. If it would be useful to other Tapestry users then maybe.

Thanks for the reply Howard.

-Original Message-
From: Howard Lewis Ship [mailto:hls...@gmail.com] 
Sent: 21 February 2012 19:51
To: Tapestry users
Subject: Re: [T5.3] Contributing a Service Override using addInstance()

This might work:

 @Contribute(ServiceOverride.class)

 public static void
setupApplicationServiceOverrides(MappedConfigurationClass,Object
configuration, ObjectLocator locator)

 {
  SomeServiceType override = locator.proxy(SomeServiceType.class,
SomeServiceTypeOverrideImpl.class);

   configuration.add(SomeServiceType.class, override);

 }


This contributes a proxy for the override, rather than the override itself ... 
meaning that eventual construction of SomeServiceTypeOverrideImpl is deferred 
until needed, and that will be after the MasterObjectProvider and 
ServicesOverride are constructed.

Give it a try and report back!

Perhaps we need complement addInstance() methods with addProxy() methods on the 
Configuration/OrderedConfiguration/MappedConfiguration
interfaces?


On Tue, Feb 21, 2012 at 6:33 AM, Blower, Andy andy.blo...@proquest.co.uk 
wrote:
 Thanks for the reply Steve. The two classes I mention are Tapestry IoC 
 classes, not my own.

 What you describe is how most of our overrides are implemented but this one 
 is conditional - we only need to override this service in a specific 
 environment and that's what causes the issue. If I define it like that if the 
 override is not applied then the IoC has two implementations bound (if you 
 don't bind it you can't have it injected into the override method) and will 
 throw errors whenever the service is injected without a specific ID. There 
 are 100's of places where we have plain injections and is not practical to 
 change them.


 -Original Message-
 From: Steve Eynon [mailto:steve.ey...@alienfactory.co.uk]
 Sent: 21 February 2012 10:36
 To: Tapestry users
 Subject: Re: [T5.3] Contributing a Service Override using 
 addInstance()

 Hi, I'm not really sure what's going on as the two classes you mention, 
 ValidatingMappedConfigurationWrapper  AbstractConfigurationImpl, don't 
 appear in your code snippet.

 If you define your overriding service as an Interface (say in the
 bind() method) then T5 will create a proxy for it.

 public static void bind(ServiceBinder binder) {
        binder.bind(ToOverrideInterface.class,
 ToOverrideImpl.class).withId(anything so we don't conflict with the 
 existing ID); }

 then you can inject that in the service override like this:

 public static void contributeServiceOverride(MappedConfiguration
 config, @Local ToOverrideInterface override) {
        config.add(ToOverrideInterface.class, override); }

 The @Local is important, otherwise T5 doesn't know which serivce to inject 
 (yours or the one you're trying to override).

 Steve.


 On 20 February 2012 20:54, Blower, Andy andy.blo...@proquest.co.uk wrote:
 I managed to get this to work by tracking down all dependencies and finding 
 that one was being used in the services' constructor. Once I moved the 
 initialisation code into a lazy init method I stopped getting the exceptions.

 Unfortunately, I still have an issue because when using addInstance() 
 Tapestry is not using a proxy for the overriding service implementation, 
 instead I'm getting a concrete reference instead which I thought never 
 happened with Tapestry IoC. This causes problems when used in objects that 
 are serialized to the session because it tries to serialize the service 
 implementation rather than just the service proxy.

 My override looks like this:

        @Contribute(ServiceOverride.class)
        public static void
 setupApplicationServiceOverrides(MappedConfigurationClass?, 
 Object
 configuration)
        {
                configuration.addInstance(ProductConfig.class,
 DynamicMultiProductConfig.class);
        }

 Basically the contributionType in ValidatingMappedConfigurationWrapper 
 (AbstractConfigurationImpl) is Object which isn't an interface so a proxy 
 isn't created. How can I change the signature of my module service override 
 method so that contributionType is an interface and I get a service proxy 
 like every other service?

 Can anyone help me?


 -Original Message-
 From: Blower, Andy [mailto:andy.blo...@proquest.co.uk]
 Sent: 15 February 2012 14:51
 To: users@tapestry.apache.org
 Subject: [T5.3] Contributing a Service Override using addInstance()

 I've read the section below about contributing a service override. This 
 method is exactly what I need to resolve an issue I'm having getting a 
 conditional override implemented, but it doesn't appear to work if the 
 service implementations' constructor has any other T5 service dependencies 
 in the signature. (T5

RE: [T5.3] Contributing a Service Override using addInstance()

2012-02-21 Thread Blower, Andy
Thanks for the reply Steve. The two classes I mention are Tapestry IoC classes, 
not my own.

What you describe is how most of our overrides are implemented but this one is 
conditional - we only need to override this service in a specific environment 
and that's what causes the issue. If I define it like that if the override is 
not applied then the IoC has two implementations bound (if you don't bind it 
you can't have it injected into the override method) and will throw errors 
whenever the service is injected without a specific ID. There are 100's of 
places where we have plain injections and is not practical to change them.


-Original Message-
From: Steve Eynon [mailto:steve.ey...@alienfactory.co.uk] 
Sent: 21 February 2012 10:36
To: Tapestry users
Subject: Re: [T5.3] Contributing a Service Override using addInstance()

Hi, I'm not really sure what's going on as the two classes you mention, 
ValidatingMappedConfigurationWrapper  AbstractConfigurationImpl, don't appear 
in your code snippet.

If you define your overriding service as an Interface (say in the
bind() method) then T5 will create a proxy for it.

public static void bind(ServiceBinder binder) {
binder.bind(ToOverrideInterface.class,
ToOverrideImpl.class).withId(anything so we don't conflict with the existing 
ID); }

then you can inject that in the service override like this:

public static void contributeServiceOverride(MappedConfiguration
config, @Local ToOverrideInterface override) {
config.add(ToOverrideInterface.class, override); }

The @Local is important, otherwise T5 doesn't know which serivce to inject 
(yours or the one you're trying to override).

Steve.


On 20 February 2012 20:54, Blower, Andy andy.blo...@proquest.co.uk wrote:
 I managed to get this to work by tracking down all dependencies and finding 
 that one was being used in the services' constructor. Once I moved the 
 initialisation code into a lazy init method I stopped getting the exceptions.

 Unfortunately, I still have an issue because when using addInstance() 
 Tapestry is not using a proxy for the overriding service implementation, 
 instead I'm getting a concrete reference instead which I thought never 
 happened with Tapestry IoC. This causes problems when used in objects that 
 are serialized to the session because it tries to serialize the service 
 implementation rather than just the service proxy.

 My override looks like this:

        @Contribute(ServiceOverride.class)
        public static void 
 setupApplicationServiceOverrides(MappedConfigurationClass?, Object 
 configuration)
        {
                configuration.addInstance(ProductConfig.class, 
 DynamicMultiProductConfig.class);
        }

 Basically the contributionType in ValidatingMappedConfigurationWrapper 
 (AbstractConfigurationImpl) is Object which isn't an interface so a proxy 
 isn't created. How can I change the signature of my module service override 
 method so that contributionType is an interface and I get a service proxy 
 like every other service?

 Can anyone help me?


 -Original Message-
 From: Blower, Andy [mailto:andy.blo...@proquest.co.uk]
 Sent: 15 February 2012 14:51
 To: users@tapestry.apache.org
 Subject: [T5.3] Contributing a Service Override using addInstance()

 I've read the section below about contributing a service override. This 
 method is exactly what I need to resolve an issue I'm having getting a 
 conditional override implemented, but it doesn't appear to work if the 
 service implementations' constructor has any other T5 service dependencies in 
 the signature. (T5 complains that ServiceOverride depends on itself.

 Is this true, because that doesn't seem to be what's implied below by handle 
 dependency resolution, and makes addInstance of limited usefulness. I'm 
 hoping I'm just missing something here.



 From http://tapestry.apache.org/ioc-cookbook-overriding-ioc-services.html :

 In this case, it is very easy to supply your own alternate implementation of 
 a service.
 AppModule.java (partial)

  @Contribute(ServiceOverride.class)

  public static void 
 setupApplicationServiceOverrides(MappedConfigurationClass,Object 
 configuration)

  {

    configuration.addInstance(SomeServiceType.class, 
 SomeServiceTypeOverrideImpl.class);

  }

 The name of the method is not important, as long as the 
 @Contributehttp://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Contribute.html
  annotation is present on the method.

 In this example, we are using addInstance() which will instantiate the 
 indicated class and handle dependency resolution. (Be careful with this, 
 because in some cases, resolving dependencies of the override class can 
 require checking against the ServiceOverrides service, and you'll get a 
 runtime exception about ServiceOverrides requiring itself!)



 -
 To unsubscribe, e-mail: users-unsubscr

RE: [T5.3] Contributing a Service Override using addInstance()

2012-02-20 Thread Blower, Andy
I managed to get this to work by tracking down all dependencies and finding 
that one was being used in the services' constructor. Once I moved the 
initialisation code into a lazy init method I stopped getting the exceptions.

Unfortunately, I still have an issue because when using addInstance() Tapestry 
is not using a proxy for the overriding service implementation, instead I'm 
getting a concrete reference instead which I thought never happened with 
Tapestry IoC. This causes problems when used in objects that are serialized to 
the session because it tries to serialize the service implementation rather 
than just the service proxy.

My override looks like this:

@Contribute(ServiceOverride.class)
public static void 
setupApplicationServiceOverrides(MappedConfigurationClass?, Object 
configuration)
{
configuration.addInstance(ProductConfig.class, 
DynamicMultiProductConfig.class);
}

Basically the contributionType in ValidatingMappedConfigurationWrapper 
(AbstractConfigurationImpl) is Object which isn't an interface so a proxy isn't 
created. How can I change the signature of my module service override method so 
that contributionType is an interface and I get a service proxy like every 
other service?

Can anyone help me?


-Original Message-
From: Blower, Andy [mailto:andy.blo...@proquest.co.uk] 
Sent: 15 February 2012 14:51
To: users@tapestry.apache.org
Subject: [T5.3] Contributing a Service Override using addInstance()

I've read the section below about contributing a service override. This method 
is exactly what I need to resolve an issue I'm having getting a conditional 
override implemented, but it doesn't appear to work if the service 
implementations' constructor has any other T5 service dependencies in the 
signature. (T5 complains that ServiceOverride depends on itself.

Is this true, because that doesn't seem to be what's implied below by handle 
dependency resolution, and makes addInstance of limited usefulness. I'm hoping 
I'm just missing something here.



From http://tapestry.apache.org/ioc-cookbook-overriding-ioc-services.html :

In this case, it is very easy to supply your own alternate implementation of a 
service.
AppModule.java (partial)

  @Contribute(ServiceOverride.class)

  public static void 
setupApplicationServiceOverrides(MappedConfigurationClass,Object 
configuration)

  {

configuration.addInstance(SomeServiceType.class, 
SomeServiceTypeOverrideImpl.class);

  }

The name of the method is not important, as long as the 
@Contributehttp://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Contribute.html
 annotation is present on the method.

In this example, we are using addInstance() which will instantiate the 
indicated class and handle dependency resolution. (Be careful with this, 
because in some cases, resolving dependencies of the override class can require 
checking against the ServiceOverrides service, and you'll get a runtime 
exception about ServiceOverrides requiring itself!)



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



[T5.3] Contributing a Service Override using addInstance()

2012-02-15 Thread Blower, Andy
I've read the section below about contributing a service override. This method 
is exactly what I need to resolve an issue I'm having getting a conditional 
override implemented, but it doesn't appear to work if the service 
implementations' constructor has any other T5 service dependencies in the 
signature. (T5 complains that ServiceOverride depends on itself.

Is this true, because that doesn't seem to be what's implied below by handle 
dependency resolution, and makes addInstance of limited usefulness. I'm hoping 
I'm just missing something here.



From http://tapestry.apache.org/ioc-cookbook-overriding-ioc-services.html :

In this case, it is very easy to supply your own alternate implementation of a 
service.
AppModule.java (partial)

  @Contribute(ServiceOverride.class)

  public static void 
setupApplicationServiceOverrides(MappedConfigurationClass,Object 
configuration)

  {

configuration.addInstance(SomeServiceType.class, 
SomeServiceTypeOverrideImpl.class);

  }

The name of the method is not important, as long as the 
@Contributehttp://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Contribute.html
 annotation is present on the method.

In this example, we are using addInstance() which will instantiate the 
indicated class and handle dependency resolution. (Be careful with this, 
because in some cases, resolving dependencies of the override class can require 
checking against the ServiceOverrides service, and you'll get a runtime 
exception about ServiceOverrides requiring itself!)



IoC multiple service instances

2011-12-01 Thread Blower, Andy
I have an usual situation that I'm not sure what the best way of implementing 
is with T5 IoC. It feels like I need a Factory, but how that would fit in with 
the service binding and injection I'm not sure. I'm hoping that I can get some 
suggestions from the list.



I have a service that currently has a couple of different implementations, and 
I'm creating a third implementation that will actually hold 2+ instances of one 
of these existing implementations and then dynamically switch between them as 
directed by another new service. In the prototype, this new service 
implementation specifically instantiates the existing implementations using the 
'new' keyword. I want to decouple this and be able to select which of the two 
original implementations should be instantiated for these internal instances.



This would be simple if I only needed one internal instance, or one per thread 
as I could just use service names and have a singleton or perthread service. If 
I knew how many instances I need then I could use multiple service names.



The only idea I have is to use a factory, but this feels more like things 
before using IoC.



Any suggestions/ideas welcome, and I hope my explanation makes sense.



Thanks,



Andy.



[T5.2] Label tags not getting id attribute rendered, why?

2010-12-17 Thread Blower, Andy
The change was made in July and doesn't appear to be associated with a JIRA:

r931361 | hlship | 2010-04-07 00:01:00 BST

Do not render an id attribute for Label components, as they can be identified 
via their for attribute


Yes they can, but it's pretty standard to find tags in the dom via id's, 
especially when using prototype.

Howard, can you explain why this change was necessary, and the thinking behind 
it.

Unfortunately this change has broken our client side validation error messages. 
We only noticed yesterday. The change immediately before it changed the - to a 
_ before the 'label' suffix. I'd like to know why this was done before I raise 
a JIRA.

Thanks,

Andy.


RE: [T5.2] Label tags not getting id attribute rendered, why?

2010-12-17 Thread Blower, Andy
Thanks for the reply Andreas,

I wouldn't call it redundant myself, that expression is not anywhere near as 
efficient as finding the tag in the dom using an id.


 -Original Message-
 From: andre...@gmail.com [mailto:andre...@gmail.com] On Behalf Of
 Andreas Andreou
 Sent: 17 December 2010 16:51
 To: Tapestry users
 Subject: Re: [T5.2] Label tags not getting id attribute rendered, why?
 
 It makes sense to me to not output redundant html
 And if you know the id of the control you can get to its label by
 $$('label[for=' + id + ']')
 
 On Fri, Dec 17, 2010 at 18:35, Blower, Andy
 andy.blo...@proquest.co.uk wrote:
  The change was made in July and doesn't appear to be associated with
 a JIRA:
 
  r931361 | hlship | 2010-04-07 00:01:00 BST
 
  Do not render an id attribute for Label components, as they can be
 identified via their for attribute
 
 
  Yes they can, but it's pretty standard to find tags in the dom via
 id's, especially when using prototype.
 
  Howard, can you explain why this change was necessary, and the
 thinking behind it.
 
  Unfortunately this change has broken our client side validation error
 messages. We only noticed yesterday. The change immediately before it
 changed the - to a _ before the 'label' suffix. I'd like to know why
 this was done before I raise a JIRA.
 
  Thanks,
 
  Andy.
 
 
 
 
 --
 Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
 Tapestry PMC / Tacos developer
 Open Source / JEE Consulting
 
 -
 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



[T5.2.4] Why does BaseURLSource use getLocalPort() rather than getServerPort() ? A bug?

2010-12-15 Thread Blower, Andy
Line 31 of BaseURLSourceImpl:

int port = request.getLocalPort();

Which calls same method in the underlying ServletRequest.

getLocalPort javadoc: Returns the Internet Protocol (IP) port number of the 
interface on which the request was received.

getServerPort javadoc: Returns the port number to which the request was sent. 
It is the value of the part after : in the codeHost/code header, if any, 
or the server port where the client connection was accepted on.

I think that the second is the one that should be used and since this port 
number is paired with the host returned from getServerName() rather than 
getLocalName(), this seems like a bug to me. Admittedly one that will only 
rarely cause a problem, but it's just affected our site so it would be great if 
it could be fixed for 5.2.5 final release, unless anyone has a convincing 
argument why it should be this way, of course...

I've raised TAP5-1372 for this issue.


RE: [T5.2.4] Why does BaseURLSource use getLocalPort() rather than getServerPort() ? A bug?

2010-12-15 Thread Blower, Andy
This is more serious than I first thought, and was only introduced in T5.2.4 
which is why it's not been caught before. Also it does not affect single server 
environments, so most people will not have noticed this.

I think this must be fixed before the release of T5.2

 -Original Message-
 From: Blower, Andy [mailto:andy.blo...@proquest.co.uk]
 Sent: 15 December 2010 12:17
 To: 'Tapestry users'
 Subject: [T5.2.4] Why does BaseURLSource use getLocalPort() rather than
 getServerPort() ? A bug?
 
 Line 31 of BaseURLSourceImpl:
 
 int port = request.getLocalPort();
 
 Which calls same method in the underlying ServletRequest.
 
 getLocalPort javadoc: Returns the Internet Protocol (IP) port number
 of the interface on which the request was received.
 
 getServerPort javadoc: Returns the port number to which the request
 was sent. It is the value of the part after : in the
 codeHost/code header, if any, or the server port where the client
 connection was accepted on.
 
 I think that the second is the one that should be used and since this
 port number is paired with the host returned from getServerName()
 rather than getLocalName(), this seems like a bug to me. Admittedly one
 that will only rarely cause a problem, but it's just affected our site
 so it would be great if it could be fixed for 5.2.5 final release,
 unless anyone has a convincing argument why it should be this way, of
 course...
 
 I've raised TAP5-1372 for this issue.


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



RE: Tapestry Web Site Updated

2010-11-23 Thread Blower, Andy
Nice to see new and improved documentation. A couple of comments:

1) I find the green to initially be nice, but overused. When I am reading a 
documentation page the green titles and links don't contrast enough with the 
white page and it's *really* hard on the eyes.

2) No navigation, just a breadcrumb trail. I quite liked the persistent nav on 
the left of the page.

3) For long time developers it's useful to still have the older docs available 
because we know those like the back of our hands and have a lot of work to get 
done. Please don't make those disappear for a while.

 -Original Message-
 From: Howard Lewis Ship [mailto:hls...@gmail.com]
 Sent: 19 November 2010 21:15
 To: Tapestry users
 Subject: Tapestry Web Site Updated
 
 We're still working out the kinks ... and I've been working hard on
 revising
 the tutorial ... but at long last, we're debuting the new Tapestry Web
 Site:
 
 http://tapestry.apache.org/
 
 Feedback is encouraged; just post to users@tapestry.apache.org with
 [SITE]
 in the subject.
 
 --
 Howard M. Lewis Ship
 
 Creator of Apache Tapestry
 
 The source for Tapestry training, mentoring and support. Contact me to
 learn
 how I can get you up and productive in Tapestry fast!
 
 (971) 678-5210
 http://howardlewisship.com


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



Tapestry 5.2 - page pooling replacement

2010-10-27 Thread Blower, Andy
First indications show that the move away from page pooling has dramatically 
decreased the memory required by our Tapestry app. Thank you Howard. I've not 
been able to spend long profiling the differences unfortunately, so I have no 
concrete numbers.

I do have one question however, do the tapestry.page-pool.* configuration 
values have any effect any more?

Cheers,

Andy


RE: [T5.2.1] TAP5-1177 In a partial page update request, if the server returns an empty string for the content, the client-side is left as is, rather than cleared

2010-10-15 Thread Blower, Andy
Raised TAP5-1309. I will override  patch tapestry.js to T5.2.0 version of this 
line of code.

 -Original Message-
 From: Howard Lewis Ship [mailto:hls...@gmail.com]
 Sent: 14 October 2010 22:39
 To: Tapestry users
 Subject: Re: [T5.2.1] TAP5-1177 In a partial page update request, if
 the server returns an empty string for the content, the client-side is
 left as is, rather than cleared
 
 I think you've found a bug ... I think Tapestry should not set the
 content property of the response when there's a MultiZoneUpdate
 response, so as to leave the Zone's current content unchanged.  Please
 add to JIRA and I'll see about fixing it soon.
 
 On Thu, Oct 14, 2010 at 12:12 PM, Blower, Andy
 andy.blo...@proquest.co.uk wrote:
  I've spent all day chasing down an issue that appeared when we
 upgraded to Tapestry 5.2.1 - it doesn't occur with T5.2.0, and I
 finally managed to find the change that is causing the problem. It's
 the fix for TAP5-1177 where tapestry.js was changed from
 
 
                                 Tapestry.loadScriptsInReply(reply,
 function() {
                                                 /*
                                                  * In a multi-zone
 update, the reply.content may be blank or
                                                  * missing.
                                                  */
                                                 reply.content 
 this.show(reply.content);
  to
                                 Tapestry.loadScriptsInReply(reply,
 function() {
                                                 /*
                                                  * In a multi-zone
 update, the reply.content may be missing,
                                                  * in which case,
 leave the curent content in place. TAP5-1177
                                                  */
                                                 reply.content !=
 undefined  this.show(reply.content);
 
 
  The situation this is causing an issue for is where we have a form in
 a zone and submitting the form needs to update another zone so
 MultiZoneUpdate is used which has content in the json for the other
 zone. i.e.
 
  {
   content : ,
   zones : {
     someThingZone : bstuff/b
   }
  }
 
  This used to leave the form inside it's zone alone which is good
 because some other javascript fires which accesses part of the form. If
 the form has been removed from the DOM (as happens with T5.2.1) then
 this Javascript fails. I'm not very familiar with this code, and I've
 not personally used MultiZoneUpdate, but it seems to me at first glance
 that the content bit of the json will always be  for MultiZoneUpdate.
 All the content goes into the zones part of the json. Also, the
 comment in the T5.2.1 version seems to say that the content should be
 left alone if content is missing, but since missing is the same as 
 it doesn't do that.
 
  Howard, what's your opinion? Can content ever be set to something, or
 left undefined? I can't see how using MultiZoneUpdate. This is
 affecting some pretty major functionality and we have a release in a
 couple of weeks, so I need to find a solution to this problem pretty
 swiftly. I will see if I can modify our javascript code to work around
 this without breaking anything else, but I'm not that hopeful.
 
 
  Cheers,
 
  Andy.
 
  P.S. I found some other issues with the JS stacks, but that's not
 breaking anything - just may not be what you'd expect. I'll detail
 those in another email when I get the time.
 
 
 
 
 --
 Howard M. Lewis Ship
 
 Creator of Apache Tapestry
 
 The source for Tapestry training, mentoring and support. Contact me to
 learn how I can get you up and productive in Tapestry fast!
 
 (971) 678-5210
 http://howardlewisship.com
 
 -
 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: [T5.2.1] TAP5-1177 In a partial page update request, if the server returns an empty string for the content, the client-side is left as is, rather than cleared

2010-10-15 Thread Blower, Andy
Done and rolled out this morning. That's what I meant - I guess my Java is 
better than my English, eh?

;-)

 -Original Message-
 From: Howard Lewis Ship [mailto:hls...@gmail.com]
 Sent: 15 October 2010 17:20
 To: Tapestry users
 Subject: Re: [T5.2.1] TAP5-1177 In a partial page update request, if
 the server returns an empty string for the content, the client-side is
 left as is, rather than cleared
 
 You should be able to monkey-patch just this function, rather than all
 of tapestry.js.
 
 On Fri, Oct 15, 2010 at 1:59 AM, Blower, Andy
 andy.blo...@proquest.co.uk wrote:
  Raised TAP5-1309. I will override  patch tapestry.js to T5.2.0
 version of this line of code.
 
  -Original Message-
  From: Howard Lewis Ship [mailto:hls...@gmail.com]
  Sent: 14 October 2010 22:39
  To: Tapestry users
  Subject: Re: [T5.2.1] TAP5-1177 In a partial page update request, if
  the server returns an empty string for the content, the client-side
 is
  left as is, rather than cleared
 
  I think you've found a bug ... I think Tapestry should not set the
  content property of the response when there's a MultiZoneUpdate
  response, so as to leave the Zone's current content unchanged.
  Please
  add to JIRA and I'll see about fixing it soon.
 
  On Thu, Oct 14, 2010 at 12:12 PM, Blower, Andy
  andy.blo...@proquest.co.uk wrote:
   I've spent all day chasing down an issue that appeared when we
  upgraded to Tapestry 5.2.1 - it doesn't occur with T5.2.0, and I
  finally managed to find the change that is causing the problem. It's
  the fix for TAP5-1177 where tapestry.js was changed from
 
  
                                  Tapestry.loadScriptsInReply(reply,
  function() {
                                                  /*
                                                   * In a multi-zone
  update, the reply.content may be blank or
                                                   * missing.
                                                   */
                                                  reply.content 
  this.show(reply.content);
   to
                                  Tapestry.loadScriptsInReply(reply,
  function() {
                                                  /*
                                                   * In a multi-zone
  update, the reply.content may be missing,
                                                   * in which case,
  leave the curent content in place. TAP5-1177
                                                   */
                                                  reply.content !=
  undefined  this.show(reply.content);
  
  
   The situation this is causing an issue for is where we have a form
 in
  a zone and submitting the form needs to update another zone so
  MultiZoneUpdate is used which has content in the json for the other
  zone. i.e.
  
   {
    content : ,
    zones : {
      someThingZone : bstuff/b
    }
   }
  
   This used to leave the form inside it's zone alone which is good
  because some other javascript fires which accesses part of the form.
 If
  the form has been removed from the DOM (as happens with T5.2.1) then
  this Javascript fails. I'm not very familiar with this code, and
 I've
  not personally used MultiZoneUpdate, but it seems to me at first
 glance
  that the content bit of the json will always be  for
 MultiZoneUpdate.
  All the content goes into the zones part of the json. Also, the
  comment in the T5.2.1 version seems to say that the content should
 be
  left alone if content is missing, but since missing is the same as
 
  it doesn't do that.
  
   Howard, what's your opinion? Can content ever be set to something,
 or
  left undefined? I can't see how using MultiZoneUpdate. This is
  affecting some pretty major functionality and we have a release in a
  couple of weeks, so I need to find a solution to this problem pretty
  swiftly. I will see if I can modify our javascript code to work
 around
  this without breaking anything else, but I'm not that hopeful.
  
  
   Cheers,
  
   Andy.
  
   P.S. I found some other issues with the JS stacks, but that's not
  breaking anything - just may not be what you'd expect. I'll detail
  those in another email when I get the time.
  
 
 
 
  --
  Howard M. Lewis Ship
 
  Creator of Apache Tapestry
 
  The source for Tapestry training, mentoring and support. Contact me
 to
  learn how I can get you up and productive in Tapestry fast!
 
  (971) 678-5210
  http://howardlewisship.com
 
  
 -
  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
 
 
 
 
 
 --
 Howard M. Lewis Ship
 
 Creator of Apache Tapestry
 
 The source for Tapestry training

[T5.2] Problem switching to VALIDATE from VALIDATE_FORM

2010-10-15 Thread Blower, Andy
From one of my developers:

When using the VALIDATE event to validate form details, the validation method 
is called several times.

Eg.

@OnEvent(EventConstants.VALIDATE)
void validateChooseFolderForm() {

...
}

Is called at least three times, executing different sections of the code each 
time. Each time it is called, the test values show as null in Eclipse debug 
mode, though I suspect it is being run once per field in the form. The third 
time it is run, a NullPointerException is thrown by the else if 
(!isFolderNameUnique()) line.

Workaround is to change to @OnEvent(EventConstants.VALIDATE_FORM). This only 
calls the validate method once per submission.


This seems to have affected us in two places when deprecated events were 
updated to the new version. Is this a known issue?

Thanks,

Andy


RE: [T5.2] JavaScript combination

2010-10-12 Thread Blower, Andy
Yes, that's working beautifully. Now I know about it... ;-)

Thanks Howard!

 -Original Message-
 From: Howard Lewis Ship [mailto:hls...@gmail.com]
 Sent: 11 October 2010 17:45
 To: Tapestry users
 Subject: Re: [T5.2] JavaScript combination
 
 Yes, stacks can have dependencies on other stacks. Is that not working
 correctly?
 
 On Mon, Oct 11, 2010 at 9:19 AM, Blower, Andy
 andy.blo...@proquest.co.uk wrote:
  I've been trying the new stack implementation in T5.2.1 and it's much
 better. I am having a problem with the order they're put into the page.
 It seems (I'm guessing/trying to spot a pattern here) to be dependent
 on the first import of a stack element which means the stacks can
 easily be requested in an order that means that extensions appear
 before the definitions of what they're trying to extend. This is a real
 problem, especially when using modules.
 
  Is there a way to define the order JS stacks are outputted?
 
 
  -Original Message-
  From: Blower, Andy [mailto:andy.blo...@proquest.co.uk]
  Sent: 21 September 2010 10:08
  To: 'Tapestry users'
  Subject: RE: [T5.2] JavaScript combination
 
  That would be the ideal situation where if a stack was defined
  containing CompJS, then if something references CompJS the stack is
  brought in. A simpler thing to do would be to simply remove the
  individual call to CompJS if the stack containing is imported, but
 this
  is less useful. Either would be far superior to the current
 behaviour.
 
  I've raised TAP5-1279 for this issue. Is this likely to get fixed in
  the next 3 weeks? If not then I'll need to plan accordingly.
 
 
   -Original Message-
   From: Howard Lewis Ship [mailto:hls...@gmail.com]
   Sent: 20 September 2010 18:48
   To: Tapestry users
   Subject: Re: [T5.2] JavaScript combination
  
   Those are great comments; I had thought about imported JS
 libraries
   dragging in a stack and I can't remember why I abandoned it.
  Perhaps
   I was trying to be properly agile (don't implement it until
 there's a
   need).
  
   You case is interesting; a piece of code that blindly imports a JS
   that is already part of a stack.  And yes, I think you may be
 right,
   that that should trigger an import of the stack itself.
  
   On Mon, Sep 20, 2010 at 6:26 AM, Blower, Andy
   andy.blo...@proquest.co.uk wrote:
I've created my first stack, and I'm slightly puzzled about the
  value
   of this - or maybe I've simply done something wrong.
   
The stack mechanism doesn't seem to be removing duplicate
  javascript
   references as I was expecting it to do. Tapestry JS has always
 worked
   on a component requesting the JS assets it needs and then Tapestry
   ensured that each required JS asset was added to the page only
 once,
   even if several components asked for the same JS asset. The stack
   system doesn't seem to follow this...
   
For example, say I have a component Comp that specifies it
 needs
   the CompJS asset, and is used on pages Page1 and Page2. If
  Page1
   doesn't have much more to it and only needs CompJS then that's
 what
   should be included by Tapestry, since Comp @Import's CompJS. All
 well
   and good.
   
Now, if Page2 has a lot of other components with their own JS
 files
   which are then combined into a T5 stack and requested by the
 page's
   @Import then I would not expect CompJS to be referenced on the
 page
   since it's already included in the stack file. It seems to be in
  T5.2.0
   with my testing.
   
Unless I'm mistaken about how this is working, then I fail to
 see
  how
   this stack mechanism provides much benefit over simply putting all
 my
   projects' JS into a single file and referencing that in each page.
  The
   only advantage is to split it up into easily editable chunks, I
 still
   have to manage the aggregation. I think it's going to be very easy
 to
   get duplicate JS in the rendered html page with this system.
   
Is this working as intended or any I missing something here?
   
Thanks,
   
Andy
   
-Original Message-
From: Blower, Andy [mailto:andy.blo...@proquest.co.uk]
Sent: 20 September 2010 11:28
To: 'Tapestry users'
Subject: RE: [T5.2] JavaScript combination
   
   
   
 -Original Message-
 From: Howard Lewis Ship [mailto:hls...@gmail.com]
 Sent: 17 September 2010 22:31
 To: Tapestry users
 Subject: Re: [T5.2] JavaScript combination

 On Fri, Sep 17, 2010 at 9:20 AM, Blower, Andy
 andy.blo...@proquest.co.uk wrote:
  A few questions:
 
  Is there any documentation of the new JavaScript
 combination
 functionality added to fix TAP5-769 in 5.2, specifically
 about
stacks?
 I can't see any, but before I dive into code/javadoc I
 thought
  I'd
ask.

 Well, there's JavaDoc.

I will use that then.
   
 
  Why aren't the prototype  scriptaculous libraries combined
  into
   a
 stack by default

RE: [T5.2] JavaScript combination

2010-10-11 Thread Blower, Andy
I've been trying the new stack implementation in T5.2.1 and it's much better. I 
am having a problem with the order they're put into the page. It seems (I'm 
guessing/trying to spot a pattern here) to be dependent on the first import of 
a stack element which means the stacks can easily be requested in an order that 
means that extensions appear before the definitions of what they're trying to 
extend. This is a real problem, especially when using modules.

Is there a way to define the order JS stacks are outputted? 


 -Original Message-
 From: Blower, Andy [mailto:andy.blo...@proquest.co.uk]
 Sent: 21 September 2010 10:08
 To: 'Tapestry users'
 Subject: RE: [T5.2] JavaScript combination
 
 That would be the ideal situation where if a stack was defined
 containing CompJS, then if something references CompJS the stack is
 brought in. A simpler thing to do would be to simply remove the
 individual call to CompJS if the stack containing is imported, but this
 is less useful. Either would be far superior to the current behaviour.
 
 I've raised TAP5-1279 for this issue. Is this likely to get fixed in
 the next 3 weeks? If not then I'll need to plan accordingly.
 
 
  -Original Message-
  From: Howard Lewis Ship [mailto:hls...@gmail.com]
  Sent: 20 September 2010 18:48
  To: Tapestry users
  Subject: Re: [T5.2] JavaScript combination
 
  Those are great comments; I had thought about imported JS libraries
  dragging in a stack and I can't remember why I abandoned it.
 Perhaps
  I was trying to be properly agile (don't implement it until there's a
  need).
 
  You case is interesting; a piece of code that blindly imports a JS
  that is already part of a stack.  And yes, I think you may be right,
  that that should trigger an import of the stack itself.
 
  On Mon, Sep 20, 2010 at 6:26 AM, Blower, Andy
  andy.blo...@proquest.co.uk wrote:
   I've created my first stack, and I'm slightly puzzled about the
 value
  of this - or maybe I've simply done something wrong.
  
   The stack mechanism doesn't seem to be removing duplicate
 javascript
  references as I was expecting it to do. Tapestry JS has always worked
  on a component requesting the JS assets it needs and then Tapestry
  ensured that each required JS asset was added to the page only once,
  even if several components asked for the same JS asset. The stack
  system doesn't seem to follow this...
  
   For example, say I have a component Comp that specifies it needs
  the CompJS asset, and is used on pages Page1 and Page2. If
 Page1
  doesn't have much more to it and only needs CompJS then that's what
  should be included by Tapestry, since Comp @Import's CompJS. All well
  and good.
  
   Now, if Page2 has a lot of other components with their own JS files
  which are then combined into a T5 stack and requested by the page's
  @Import then I would not expect CompJS to be referenced on the page
  since it's already included in the stack file. It seems to be in
 T5.2.0
  with my testing.
  
   Unless I'm mistaken about how this is working, then I fail to see
 how
  this stack mechanism provides much benefit over simply putting all my
  projects' JS into a single file and referencing that in each page.
 The
  only advantage is to split it up into easily editable chunks, I still
  have to manage the aggregation. I think it's going to be very easy to
  get duplicate JS in the rendered html page with this system.
  
   Is this working as intended or any I missing something here?
  
   Thanks,
  
   Andy
  
   -Original Message-
   From: Blower, Andy [mailto:andy.blo...@proquest.co.uk]
   Sent: 20 September 2010 11:28
   To: 'Tapestry users'
   Subject: RE: [T5.2] JavaScript combination
  
  
  
-Original Message-
From: Howard Lewis Ship [mailto:hls...@gmail.com]
Sent: 17 September 2010 22:31
To: Tapestry users
Subject: Re: [T5.2] JavaScript combination
   
On Fri, Sep 17, 2010 at 9:20 AM, Blower, Andy
andy.blo...@proquest.co.uk wrote:
 A few questions:

 Is there any documentation of the new JavaScript combination
functionality added to fix TAP5-769 in 5.2, specifically about
   stacks?
I can't see any, but before I dive into code/javadoc I thought
 I'd
   ask.
   
Well, there's JavaDoc.
   
   I will use that then.
  

 Why aren't the prototype  scriptaculous libraries combined
 into
  a
stack by default?

   
They are in production; by default in development the
 aggregation
logic is turned off, as it makes it much faster/easier to debug
 on
   the
client side. There's a symbol you can override to enable
  aggregation
in development mode.
  
   Right, I saw a couple of scriptaculous libraries separate and
 jumped
  to
   a conclusion. Why isn't Tap5.2 using the latest version of
   scriptaculous?  (1.8.3)
  
 What's the status of minifying css  js?

   
No progress on that; concentrating on documentation and getting
  5.2
out

[T5.2] Live class reloading not working with jetty

2010-10-05 Thread Blower, Andy
Since we upgraded to T5.2, live class reloading has not worked correctly, 
however if we downgrade it works fine. We're using Jetty kicked off using the 
runjettyrun plugin for Eclipse.

When making just a simple tml change, using the running application again has a 
long pause before it does anything, and after a few requests it falls over out 
of permgen space.

All of our developers are experiencing this, and it's a real shame that one of 
the major strengths of Tapestry is not working for us anymore. Is there 
something I need to change to get live class reloading working with T5.2?

Thanks,

Andy


RE: [T5.2] JavaScript combination

2010-09-21 Thread Blower, Andy
That would be the ideal situation where if a stack was defined containing 
CompJS, then if something references CompJS the stack is brought in. A simpler 
thing to do would be to simply remove the individual call to CompJS if the 
stack containing is imported, but this is less useful. Either would be far 
superior to the current behaviour.

I've raised TAP5-1279 for this issue. Is this likely to get fixed in the next 3 
weeks? If not then I'll need to plan accordingly.


 -Original Message-
 From: Howard Lewis Ship [mailto:hls...@gmail.com]
 Sent: 20 September 2010 18:48
 To: Tapestry users
 Subject: Re: [T5.2] JavaScript combination
 
 Those are great comments; I had thought about imported JS libraries
 dragging in a stack and I can't remember why I abandoned it. Perhaps
 I was trying to be properly agile (don't implement it until there's a
 need).
 
 You case is interesting; a piece of code that blindly imports a JS
 that is already part of a stack.  And yes, I think you may be right,
 that that should trigger an import of the stack itself.
 
 On Mon, Sep 20, 2010 at 6:26 AM, Blower, Andy
 andy.blo...@proquest.co.uk wrote:
  I've created my first stack, and I'm slightly puzzled about the value
 of this - or maybe I've simply done something wrong.
 
  The stack mechanism doesn't seem to be removing duplicate javascript
 references as I was expecting it to do. Tapestry JS has always worked
 on a component requesting the JS assets it needs and then Tapestry
 ensured that each required JS asset was added to the page only once,
 even if several components asked for the same JS asset. The stack
 system doesn't seem to follow this...
 
  For example, say I have a component Comp that specifies it needs
 the CompJS asset, and is used on pages Page1 and Page2. If Page1
 doesn't have much more to it and only needs CompJS then that's what
 should be included by Tapestry, since Comp @Import's CompJS. All well
 and good.
 
  Now, if Page2 has a lot of other components with their own JS files
 which are then combined into a T5 stack and requested by the page's
 @Import then I would not expect CompJS to be referenced on the page
 since it's already included in the stack file. It seems to be in T5.2.0
 with my testing.
 
  Unless I'm mistaken about how this is working, then I fail to see how
 this stack mechanism provides much benefit over simply putting all my
 projects' JS into a single file and referencing that in each page. The
 only advantage is to split it up into easily editable chunks, I still
 have to manage the aggregation. I think it's going to be very easy to
 get duplicate JS in the rendered html page with this system.
 
  Is this working as intended or any I missing something here?
 
  Thanks,
 
  Andy
 
  -Original Message-
  From: Blower, Andy [mailto:andy.blo...@proquest.co.uk]
  Sent: 20 September 2010 11:28
  To: 'Tapestry users'
  Subject: RE: [T5.2] JavaScript combination
 
 
 
   -Original Message-
   From: Howard Lewis Ship [mailto:hls...@gmail.com]
   Sent: 17 September 2010 22:31
   To: Tapestry users
   Subject: Re: [T5.2] JavaScript combination
  
   On Fri, Sep 17, 2010 at 9:20 AM, Blower, Andy
   andy.blo...@proquest.co.uk wrote:
A few questions:
   
Is there any documentation of the new JavaScript combination
   functionality added to fix TAP5-769 in 5.2, specifically about
  stacks?
   I can't see any, but before I dive into code/javadoc I thought I'd
  ask.
  
   Well, there's JavaDoc.
  
  I will use that then.
 
   
Why aren't the prototype  scriptaculous libraries combined into
 a
   stack by default?
   
  
   They are in production; by default in development the aggregation
   logic is turned off, as it makes it much faster/easier to debug on
  the
   client side. There's a symbol you can override to enable
 aggregation
   in development mode.
 
  Right, I saw a couple of scriptaculous libraries separate and jumped
 to
  a conclusion. Why isn't Tap5.2 using the latest version of
  scriptaculous?  (1.8.3)
 
What's the status of minifying css  js?
   
  
   No progress on that; concentrating on documentation and getting
 5.2
   out the door right now.
 
  Fair enough
 
 
  
 -
  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
 
 
 
 
 
 --
 Howard M. Lewis Ship
 
 Creator of Apache Tapestry
 
 The source for Tapestry training, mentoring and support. Contact me to
 learn how I can get you up and productive in Tapestry fast!
 
 (971) 678-5210
 http://howardlewisship.com
 
 -
 To unsubscribe, e-mail: users-unsubscr

RE: [T5.2] JavaScript combination

2010-09-20 Thread Blower, Andy


 -Original Message-
 From: Howard Lewis Ship [mailto:hls...@gmail.com]
 Sent: 17 September 2010 22:31
 To: Tapestry users
 Subject: Re: [T5.2] JavaScript combination
 
 On Fri, Sep 17, 2010 at 9:20 AM, Blower, Andy
 andy.blo...@proquest.co.uk wrote:
  A few questions:
 
  Is there any documentation of the new JavaScript combination
 functionality added to fix TAP5-769 in 5.2, specifically about stacks?
 I can't see any, but before I dive into code/javadoc I thought I'd ask.
 
 Well, there's JavaDoc.
 
I will use that then.

 
  Why aren't the prototype  scriptaculous libraries combined into a
 stack by default?
 
 
 They are in production; by default in development the aggregation
 logic is turned off, as it makes it much faster/easier to debug on the
 client side. There's a symbol you can override to enable aggregation
 in development mode.

Right, I saw a couple of scriptaculous libraries separate and jumped to a 
conclusion. Why isn't Tap5.2 using the latest version of scriptaculous?  (1.8.3)

  What's the status of minifying css  js?
 
 
 No progress on that; concentrating on documentation and getting 5.2
 out the door right now.

Fair enough


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



RE: [T5.2] JavaScript combination

2010-09-20 Thread Blower, Andy
I've created my first stack, and I'm slightly puzzled about the value of this - 
or maybe I've simply done something wrong.

The stack mechanism doesn't seem to be removing duplicate javascript references 
as I was expecting it to do. Tapestry JS has always worked on a component 
requesting the JS assets it needs and then Tapestry ensured that each required 
JS asset was added to the page only once, even if several components asked for 
the same JS asset. The stack system doesn't seem to follow this...

For example, say I have a component Comp that specifies it needs the CompJS 
asset, and is used on pages Page1 and Page2. If Page1 doesn't have much 
more to it and only needs CompJS then that's what should be included by 
Tapestry, since Comp @Import's CompJS. All well and good.

Now, if Page2 has a lot of other components with their own JS files which are 
then combined into a T5 stack and requested by the page's @Import then I would 
not expect CompJS to be referenced on the page since it's already included in 
the stack file. It seems to be in T5.2.0 with my testing.

Unless I'm mistaken about how this is working, then I fail to see how this 
stack mechanism provides much benefit over simply putting all my projects' JS 
into a single file and referencing that in each page. The only advantage is to 
split it up into easily editable chunks, I still have to manage the 
aggregation. I think it's going to be very easy to get duplicate JS in the 
rendered html page with this system.

Is this working as intended or any I missing something here?

Thanks,

Andy

 -Original Message-
 From: Blower, Andy [mailto:andy.blo...@proquest.co.uk]
 Sent: 20 September 2010 11:28
 To: 'Tapestry users'
 Subject: RE: [T5.2] JavaScript combination
 
 
 
  -Original Message-
  From: Howard Lewis Ship [mailto:hls...@gmail.com]
  Sent: 17 September 2010 22:31
  To: Tapestry users
  Subject: Re: [T5.2] JavaScript combination
 
  On Fri, Sep 17, 2010 at 9:20 AM, Blower, Andy
  andy.blo...@proquest.co.uk wrote:
   A few questions:
  
   Is there any documentation of the new JavaScript combination
  functionality added to fix TAP5-769 in 5.2, specifically about
 stacks?
  I can't see any, but before I dive into code/javadoc I thought I'd
 ask.
 
  Well, there's JavaDoc.
 
 I will use that then.
 
  
   Why aren't the prototype  scriptaculous libraries combined into a
  stack by default?
  
 
  They are in production; by default in development the aggregation
  logic is turned off, as it makes it much faster/easier to debug on
 the
  client side. There's a symbol you can override to enable aggregation
  in development mode.
 
 Right, I saw a couple of scriptaculous libraries separate and jumped to
 a conclusion. Why isn't Tap5.2 using the latest version of
 scriptaculous?  (1.8.3)
 
   What's the status of minifying css  js?
  
 
  No progress on that; concentrating on documentation and getting 5.2
  out the door right now.
 
 Fair enough
 
 
 -
 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



[T5.2] JavaScript combination

2010-09-17 Thread Blower, Andy
A few questions:

Is there any documentation of the new JavaScript combination functionality 
added to fix TAP5-769 in 5.2, specifically about stacks? I can't see any, but 
before I dive into code/javadoc I thought I'd ask.

Why aren't the prototype  scriptaculous libraries combined into a stack by 
default?

What's the status of minifying css  js?

Thanks,

Andy.


RE: Tapestry tree render without recursion?

2010-09-11 Thread Blower, Andy
The links in that Jira don't work for me. It looks like a 3 year old issue so 
maybe that's not surprising.

 -Original Message-
 From: Josh Canfield [mailto:joshcanfi...@gmail.com]
 Sent: 10 September 2010 17:52
 To: Tapestry users
 Subject: Re: Tapestry tree render without recursion?
 
 Vote for this and maybe we can get something into core.
 https://issues.apache.org/jira/browse/TAP5-71
 
 On Fri, Sep 10, 2010 at 3:08 AM, Elin polit...@gmail.com wrote:
 
  Im making a component for rendering my categories tree but i have
 seen that i
  cant use recursive components (calling themselves not even
 indirectly) so,
  any advice about how to do this (your own ideas or something u have
 read
  around)?
 
 
  Example:
 
 
 
  Coffee
 
  Tea
 
 
 
  Black tea
 
  Green tea
 
 
 
 
  Milk
 
 
 
  Thx in advance
 
  --
  View this message in context:
 http://tapestry.1045711.n5.nabble.com/Tapestry-tree-render-without-
 recursion-tp2834784p2834784.html
  Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
 
 
 --
 --
 http://www.bodylabgym.com - a private, by appointment only, one-on-one
 health and fitness facility.
 --
 http://www.ectransition.com - Quality Electronic Cigarettes at a
 reasonable price!
 --
 TheDailyTube.com. Sign up and get the best new videos on the internet
 delivered fresh to your inbox.
 
 -
 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



[T5.2] Classloader problem with a service

2010-09-10 Thread Blower, Andy
Unfortunately we've got another T5.2 migration issue that I can't figure out. I 
wonder if this is to do with the service class reloading added in 5.2 - is 
there a way of disabling it to check?

I've posted the error trace below, basically a service 
(ScholarUniverseSearchEngine) is trying to create a class 
(ScholarUniverseResultsList) and failing because there seems to be 2 different 
versions of the service in different classloaders. It's really puzzling because 
this service and class is copied from another that does the exact same thing 
and still works okay. I tried running it by deploying a war to a standalone 
tomcat, and it's fine. It just seems to be a problem when running from within 
Eclipse using runjettyrun. We'll try some more combinations out, but if anyone 
can help with this it would be great.


ERROR [11:53:15,737] btpool0-6 
(services.TapestryModule.RequestExceptionHandler:62) - Processing of request 
failed with uncaught exception: loader constraint violation: when resolving 
method 
com.proquest.apps.corelib.search.impl.scholaruniverse.ScholarUniverseResultsList.init(Lcom/proquest/apps/corelib/search/QueryData;Ljava/lang/String;Ljava/lang/String;Lcom/proquest/apps/corelib/search/impl/scholaruniverse/ScholarUniverseSearchEngine;Lcom/proquest/apps/corelib/config/ProductConfig;)V
 the class loader (instance of 
org/apache/tapestry5/ioc/internal/AbstractReloadableObjectCreator$ReloadingClassLoader)
 of the current class, 
com/proquest/apps/corelib/search/impl/scholaruniverse/ScholarUniverseSearchEngine,
 and the class loader (instance of runjettyrun/ProjectClassLoader) for resolved 
class, 
com/proquest/apps/corelib/search/impl/scholaruniverse/ScholarUniverseResultsList,
 have different Class objects for the type 
com/proquest/apps/corelib/search/impl/scholaruniverse/ScholarUniverseSearchEngine
 used in the signature
java.lang.LinkageError: loader constraint violation: when resolving method 
com.proquest.apps.corelib.search.impl.scholaruniverse.ScholarUniverseResultsList.init(Lcom/proquest/apps/corelib/search/QueryData;Ljava/lang/String;Ljava/lang/String;Lcom/proquest/apps/corelib/search/impl/scholaruniverse/ScholarUniverseSearchEngine;Lcom/proquest/apps/corelib/config/ProductConfig;)V
 the class loader (instance of 
org/apache/tapestry5/ioc/internal/AbstractReloadableObjectCreator$ReloadingClassLoader)
 of the current class, 
com/proquest/apps/corelib/search/impl/scholaruniverse/ScholarUniverseSearchEngine,
 and the class loader (instance of runjettyrun/ProjectClassLoader) for resolved 
class, 
com/proquest/apps/corelib/search/impl/scholaruniverse/ScholarUniverseResultsList,
 have different Class objects for the type 
com/proquest/apps/corelib/search/impl/scholaruniverse/ScholarUniverseSearchEngine
 used in the signature
at 
com.proquest.apps.corelib.search.impl.scholaruniverse.ScholarUniverseSearchEngine.executeSearch(ScholarUniverseSearchEngine.java:146)
at 
$SearchEngine_12afb45d215.executeSearch($SearchEngine_12afb45d215.java)
at 
Invocation$SearchEngine$executeSearch$12afb462907.invokeDelegateMethod(Invocation$SearchEngine$executeSearch$12afb462907.java)
at 
org.apache.tapestry5.ioc.internal.services.AbstractInvocation.proceed(AbstractInvocation.java:124)
at 
com.proquest.apps.onesearch.stats.ProfileAdvice.advise(ProfileAdvice.java:33)
at 
org.apache.tapestry5.ioc.internal.services.AbstractInvocation.proceed(AbstractInvocation.java:128)
at 
$SearchEngine_12afb45d216.executeSearch($SearchEngine_12afb45d216.java)
at 
$SearchEngine_12afb45cd44.executeSearch($SearchEngine_12afb45cd44.java)
at 
com.proquest.apps.onesearch.components.scholaruniverse.ScholarUniverseBasic.handleSearchFormSubmission(ScholarUniverseBasic.java:132)
at 
com.proquest.apps.onesearch.components.scholaruniverse.ScholarUniverseBasic$MethodAccess_handleSearchFormSubmission_12afb45cd45.invoke(ScholarUniverseBasic$MethodAccess_handleSearchFormSubmission_12afb45cd45.java)
at 
org.apache.tapestry5.internal.transform.BaseEventHandlerMethodInvoker.invokeEventHandlerMethod(BaseEventHandlerMethodInvoker.java:52)
at 
org.apache.tapestry5.internal.transform.OnEventWorker$4.invokeEventHandlers(OnEventWorker.java:157)
at 
org.apache.tapestry5.internal.transform.OnEventWorker$4.advise(OnEventWorker.java:136)
at 
org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:86)
at 
com.proquest.apps.onesearch.components.scholaruniverse.ScholarUniverseBasic.dispatchComponentEvent(ScholarUniverseBasic.java)
at 
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:942)
at 

RE: [T5.2] Classloader problem with a service

2010-09-10 Thread Blower, Andy
Thank you Jim - that did the trick.


 -Original Message-
 From: Jim O'Callaghan [mailto:jc1000...@yahoo.co.uk]
 Sent: 10 September 2010 14:45
 To: 'Tapestry users'
 Subject: RE: [T5.2] Classloader problem with a service

 Andy,

 I haven't tried this but apparently:

 public static void bind(ServiceBinder binder) {
   binder.bind(MyInterface.class,
 MyImplementation.class).preventReloading();
 }

 ... should work - referenced here:
 http://tapestry.markmail.org/message/honjlvrqljdjparp?q=service+reload+
 disab
 le

 Regards,
 Jim.
 -Original Message-
 From: Blower, Andy [mailto:andy.blo...@proquest.co.uk]
 Sent: 10 September 2010 13:00
 To: 'Tapestry users'
 Subject: [T5.2] Classloader problem with a service

 Unfortunately we've got another T5.2 migration issue that I can't
 figure
 out. I wonder if this is to do with the service class reloading added
 in 5.2
 - is there a way of disabling it to check?

 I've posted the error trace below, basically a service
 (ScholarUniverseSearchEngine) is trying to create a class
 (ScholarUniverseResultsList) and failing because there seems to be 2
 different versions of the service in different classloaders. It's
 really
 puzzling because this service and class is copied from another that
 does the
 exact same thing and still works okay. I tried running it by deploying
 a war
 to a standalone tomcat, and it's fine. It just seems to be a problem
 when
 running from within Eclipse using runjettyrun. We'll try some more
 combinations out, but if anyone can help with this it would be great.


 ERROR [11:53:15,737] btpool0-6
 (services.TapestryModule.RequestExceptionHandler:62) - Processing of
 request
 failed with uncaught exception: loader constraint violation: when
 resolving
 method
 com.proquest.apps.corelib.search.impl.scholaruniverse.ScholarUniverseR
 esult
 sList.init(Lcom/proquest/apps/corelib/search/QueryData;Ljava/lang/Str
 ing;L
 java/lang/String;Lcom/proquest/apps/corelib/search/impl/scholaruniverse
 /Scho
 larUniverseSearchEngine;Lcom/proquest/apps/corelib/config/ProductConfig
 ;)V
 the class loader (instance of
 org/apache/tapestry5/ioc/internal/AbstractReloadableObjectCreator$Reloa
 dingC
 lassLoader) of the current class,
 com/proquest/apps/corelib/search/impl/scholaruniverse/ScholarUniverseSe
 archE
 ngine, and the class loader (instance of
 runjettyrun/ProjectClassLoader) for
 resolved class,
 com/proquest/apps/corelib/search/impl/scholaruniverse/ScholarUniverseRe
 sults
 List, have different Class objects for the type
 com/proquest/apps/corelib/search/impl/scholaruniverse/ScholarUniverseSe
 archE
 ngine used in the signature
 java.lang.LinkageError: loader constraint violation: when resolving
 method
 com.proquest.apps.corelib.search.impl.scholaruniverse.ScholarUniverseR
 esult
 sList.init(Lcom/proquest/apps/corelib/search/QueryData;Ljava/lang/Str
 ing;L
 java/lang/String;Lcom/proquest/apps/corelib/search/impl/scholaruniverse
 /Scho
 larUniverseSearchEngine;Lcom/proquest/apps/corelib/config/ProductConfig
 ;)V
 the class loader (instance of
 org/apache/tapestry5/ioc/internal/AbstractReloadableObjectCreator$Reloa
 dingC
 lassLoader) of the current class,
 com/proquest/apps/corelib/search/impl/scholaruniverse/ScholarUniverseSe
 archE
 ngine, and the class loader (instance of
 runjettyrun/ProjectClassLoader) for
 resolved class,
 com/proquest/apps/corelib/search/impl/scholaruniverse/ScholarUniverseRe
 sults
 List, have different Class objects for the type
 com/proquest/apps/corelib/search/impl/scholaruniverse/ScholarUniverseSe
 archE
 ngine used in the signature
 at
 com.proquest.apps.corelib.search.impl.scholaruniverse.ScholarUniverseSe
 archE
 ngine.executeSearch(ScholarUniverseSearchEngine.java:146)
 at
 $SearchEngine_12afb45d215.executeSearch($SearchEngine_12afb45d215.java)
 at
 Invocation$SearchEngine$executeSearch$12afb462907.invokeDelegateMethod(
 Invoc
 ation$SearchEngine$executeSearch$12afb462907.java)
 at
 org.apache.tapestry5.ioc.internal.services.AbstractInvocation.proceed(A
 bstra
 ctInvocation.java:124)
 at
 com.proquest.apps.onesearch.stats.ProfileAdvice.advise(ProfileAdvice.ja
 va:33
 )
 at
 org.apache.tapestry5.ioc.internal.services.AbstractInvocation.proceed(A
 bstra
 ctInvocation.java:128)
 at
 $SearchEngine_12afb45d216.executeSearch($SearchEngine_12afb45d216.java)
 at
 $SearchEngine_12afb45cd44.executeSearch($SearchEngine_12afb45cd44.java)
 at
 com.proquest.apps.onesearch.components.scholaruniverse.ScholarUniverseB
 asic.
 handleSearchFormSubmission(ScholarUniverseBasic.java:132)
 at
 com.proquest.apps.onesearch.components.scholaruniverse.ScholarUniverseB
 asic$
 MethodAccess_handleSearchFormSubmission_12afb45cd45.invoke(ScholarUnive
 rseBa
 sic$MethodAccess_handleSearchFormSubmission_12afb45cd45.java)
 at
 org.apache.tapestry5

[T5.2] Name property doesn't match id or is missing

2010-09-09 Thread Blower, Andy
We're upgrading from tapestry 5.1 to 5.2 and have spotted some strange things 
with the name property of various components. Tapestry forms no longer include 
the name property at all. Other elements such as the tapestry select component 
used to have matching id and name properties and now they seem to have 
different values. Does anyone know if these change are intentional and the 
reason behind them? Here's an example of the old select box rendered in 5.1 and 
then in 5.2:

select title=Select a day id=select name=select

select title=Select a day id=select name=select_0



RE: [T5.2] No object of type ClientBehaviorSupport is available from the Environment

2010-09-06 Thread Blower, Andy
That seems to have fixed the problem, thanks. Will let you know if it crops up 
again.

 -Original Message-
 From: Howard Lewis Ship [mailto:hls...@gmail.com]
 Sent: 03 September 2010 17:37
 To: Tapestry users
 Subject: Re: [T5.2] No object of type ClientBehaviorSupport is
 available from the Environment

 Whatever is happening is unintentional. Apparently, there are
 insufficient orderings to ensure the correct order.

 I suspect this will fix the problem:


configuration.add(DocumentLinker, documentLinker);
configuration.add(JavaScriptSupport, javaScriptSupport,
 after:DocumentLinker);
configuration.add(RenderSupport, renderSupport,
 after:JavaScriptSupport);
configuration.add(InjectDefaultStyleheet,
 injectDefaultStylesheet, after:JavaScriptSupport);
configuration.add(ClientBehaviorSupport,
 clientBehaviorSupport, after:JavaScriptSupport);
configuration.add(Heartbeat, heartbeat,
 after:ClientBehaviorSupport);
configuration.add(DefaultValidationDecorator,
 defaultValidationDecorator, after:Heartbeat);

 In this way, the finally Heartbeat.end() will execute while the
 ClientBehaviorSupport is in scope.


 On Fri, Sep 3, 2010 at 7:14 AM, Blower, Andy
 andy.blo...@proquest.co.uk wrote:
  I was already on that Jim, good suggestion though - and it works (or
 breaks I suppose) so I've been able to debug this issue a little.
 
  ClientBehavourSupport is pushed into the env and used 110-ish times
 before it's popped by line 2041 of TapestryModule which is the
 clientBehaviorSupport MarkupRendererFilter at the end of rendering the
 page markup. The error is then thrown by a heartbeat
 MarkupRendererFilter which peekRequired() for ClientBehavourSupport and
 fails.
 
  Is this a problem with the ordering of the MarkupRendererFilter's do
 you think?
 
  5.1.0.5:
 
 configuration.add(DocumentLinker, documentLinker,
 before:RenderSupport);
 configuration.add(RenderSupport, renderSupport);
 configuration.add(InjectDefaultStyleheet,
 injectDefaultStylesheet, after:RenderSupport);
 configuration.add(ClientBehaviorSupport,
 clientBehaviorSupport, after:RenderSupport);
 configuration.add(Heartbeat, heartbeat,
 after:RenderSupport);
 configuration.add(DefaultValidationDecorator,
 defaultValidationDecorator, after:Heartbeat);
 
  5.2.0:
 
 configuration.add(DocumentLinker, documentLinker);
 configuration.add(JavaScriptSupport, javaScriptSupport,
 after:DocumentLinker);
 configuration.add(RenderSupport, renderSupport,
 after:JavaScriptSupport);
 configuration.add(InjectDefaultStyleheet,
 injectDefaultStylesheet, after:RenderSupport);
 configuration.add(ClientBehaviorSupport,
 clientBehaviorSupport, after:JavaScriptSupport);
 configuration.add(Heartbeat, heartbeat,
 after:RenderSupport);
 configuration.add(DefaultValidationDecorator,
 defaultValidationDecorator, after:Heartbeat);
 
  Why did this change? What should I change it to so this works?
 
  Thanks,
 
  Andy
 
  -Original Message-
  From: Jim O'Callaghan [mailto:jc1000...@yahoo.co.uk]
  Sent: 02 September 2010 15:58
  To: 'Tapestry users'
  Subject: RE: [T5.2] No object of type ClientBehaviorSupport is
  available from the Environment
 
  Can't reproduce Andy and not a solution I'm afraid, but can you try
 to
  run
  the app through your non-Eclipse environment with debug mode set on
 the
  JVM
  and remote debug it using Eclipse on a socket / shared mem?  Perhaps
  this
  would give you some more info.
 
  Regards,
  Jim.
 
  -Original Message-
  From: Blower, Andy [mailto:andy.blo...@proquest.co.uk]
  Sent: 02 September 2010 15:28
  To: 'Tapestry users'
  Subject: RE: [T5.2] No object of type ClientBehaviorSupport is
  available
  from the Environment
 
  Sorry for no update - was on a short holiday over the (UK) bank
 holiday
  weekend.
 
  Anyway, I thought this had just 'gone-away' yesterday but it hasn't.
 It
  happens unless I run it using Eclipse to debug the app, now that
 really
  is
  strange! That's right, a bug that doesn't appear when debugging.
 Kinda
  cripples my ability to debug this issue.
 
  I'm running it using Jetty 6.1.6 kicked off using run-jetty-run in
  Eclipse.
  Are you (or anyone else on the list for that matter) able to
 reproduce
  this
  problem? It only seems to happen with one of our pages
 
   -Original Message-
   From: Howard Lewis Ship [mailto:hls...@gmail.com]
   Sent: 27 August 2010 21:24
   To: Tapestry users
   Subject: Re: [T5.2] No object of type ClientBehaviorSupport is
   available from the Environment
  
Wow, that does seem odd, since all the other environmentals, set
 up
   before the render, seem to be available.
  
   On Wed, Aug 25, 2010 at 8:29 AM, Blower, Andy
   andy.blo...@proquest.co.uk wrote:
Can anyone make sense of this one:
   
ERROR [16:22:34,848] btpool0-1

RE: [T5.2] No object of type ClientBehaviorSupport is available from the Environment

2010-09-03 Thread Blower, Andy
I was already on that Jim, good suggestion though - and it works (or breaks I 
suppose) so I've been able to debug this issue a little.

ClientBehavourSupport is pushed into the env and used 110-ish times before it's 
popped by line 2041 of TapestryModule which is the clientBehaviorSupport 
MarkupRendererFilter at the end of rendering the page markup. The error is then 
thrown by a heartbeat MarkupRendererFilter which peekRequired() for 
ClientBehavourSupport and fails.

Is this a problem with the ordering of the MarkupRendererFilter's do you think?

5.1.0.5:

configuration.add(DocumentLinker, documentLinker, 
before:RenderSupport);
configuration.add(RenderSupport, renderSupport);
configuration.add(InjectDefaultStyleheet, injectDefaultStylesheet, 
after:RenderSupport);
configuration.add(ClientBehaviorSupport, clientBehaviorSupport, 
after:RenderSupport);
configuration.add(Heartbeat, heartbeat, after:RenderSupport);
configuration.add(DefaultValidationDecorator, 
defaultValidationDecorator, after:Heartbeat);

5.2.0:

configuration.add(DocumentLinker, documentLinker);
configuration.add(JavaScriptSupport, javaScriptSupport, 
after:DocumentLinker);
configuration.add(RenderSupport, renderSupport, 
after:JavaScriptSupport);
configuration.add(InjectDefaultStyleheet, injectDefaultStylesheet, 
after:RenderSupport);
configuration.add(ClientBehaviorSupport, clientBehaviorSupport, 
after:JavaScriptSupport);
configuration.add(Heartbeat, heartbeat, after:RenderSupport);
configuration.add(DefaultValidationDecorator, 
defaultValidationDecorator, after:Heartbeat);

Why did this change? What should I change it to so this works?

Thanks,

Andy

 -Original Message-
 From: Jim O'Callaghan [mailto:jc1000...@yahoo.co.uk]
 Sent: 02 September 2010 15:58
 To: 'Tapestry users'
 Subject: RE: [T5.2] No object of type ClientBehaviorSupport is
 available from the Environment

 Can't reproduce Andy and not a solution I'm afraid, but can you try to
 run
 the app through your non-Eclipse environment with debug mode set on the
 JVM
 and remote debug it using Eclipse on a socket / shared mem?  Perhaps
 this
 would give you some more info.

 Regards,
 Jim.

 -Original Message-
 From: Blower, Andy [mailto:andy.blo...@proquest.co.uk]
 Sent: 02 September 2010 15:28
 To: 'Tapestry users'
 Subject: RE: [T5.2] No object of type ClientBehaviorSupport is
 available
 from the Environment

 Sorry for no update - was on a short holiday over the (UK) bank holiday
 weekend.

 Anyway, I thought this had just 'gone-away' yesterday but it hasn't. It
 happens unless I run it using Eclipse to debug the app, now that really
 is
 strange! That's right, a bug that doesn't appear when debugging. Kinda
 cripples my ability to debug this issue.

 I'm running it using Jetty 6.1.6 kicked off using run-jetty-run in
 Eclipse.
 Are you (or anyone else on the list for that matter) able to reproduce
 this
 problem? It only seems to happen with one of our pages

  -Original Message-
  From: Howard Lewis Ship [mailto:hls...@gmail.com]
  Sent: 27 August 2010 21:24
  To: Tapestry users
  Subject: Re: [T5.2] No object of type ClientBehaviorSupport is
  available from the Environment
 
   Wow, that does seem odd, since all the other environmentals, set up
  before the render, seem to be available.
 
  On Wed, Aug 25, 2010 at 8:29 AM, Blower, Andy
  andy.blo...@proquest.co.uk wrote:
   Can anyone make sense of this one:
  
   ERROR [16:22:34,848] btpool0-1
  (services.TapestryModule.RequestExceptionHandler:62) - Processing of
  request failed with uncaught exception: No object of type
  org.apache.tapestry5.services.ClientBehaviorSupport is available from
  the Environment.  Available types are
  org.apache.tapestry5.RenderSupport,
  org.apache.tapestry5.internal.services.DocumentLinker,
  org.apache.tapestry5.services.javascript.JavaScriptSupport.
   java.lang.RuntimeException: No object of type
  org.apache.tapestry5.services.ClientBehaviorSupport is available from
  the Environment.  Available types are
  org.apache.tapestry5.RenderSupport,
  org.apache.tapestry5.internal.services.DocumentLinker,
  org.apache.tapestry5.services.javascript.JavaScriptSupport.
  at
 
 org.apache.tapestry5.internal.services.EnvironmentImpl.peekRequired(Env
  ironmentImpl.java:79)
  at
  $Environment_12aa9d2d5fd.peekRequired($Environment_12aa9d2d5fd.java)
  at
  $Environment_12aa9d2d3d5.peekRequired($Environment_12aa9d2d3d5.java)
  at
 
 org.apache.tapestry5.internal.transform.EnvironmentalWorker$Environment
  alConduit.get(EnvironmentalWorker.java:57)
  at
 
 org.apache.tapestry5.corelib.components.Form._$get_clientBehaviorSuppor
  t(Form.java)
  at
 
 org.apache.tapestry5.corelib.components.Form._$advised$linkFormToZone(F
  orm.java:422

RE: [T5.2] No object of type ClientBehaviorSupport is available from the Environment

2010-09-02 Thread Blower, Andy
Sorry for no update - was on a short holiday over the (UK) bank holiday weekend.

Anyway, I thought this had just 'gone-away' yesterday but it hasn't. It happens 
unless I run it using Eclipse to debug the app, now that really is strange! 
That's right, a bug that doesn't appear when debugging. Kinda cripples my 
ability to debug this issue.

I'm running it using Jetty 6.1.6 kicked off using run-jetty-run in Eclipse. Are 
you (or anyone else on the list for that matter) able to reproduce this 
problem? It only seems to happen with one of our pages

 -Original Message-
 From: Howard Lewis Ship [mailto:hls...@gmail.com]
 Sent: 27 August 2010 21:24
 To: Tapestry users
 Subject: Re: [T5.2] No object of type ClientBehaviorSupport is
 available from the Environment
 
  Wow, that does seem odd, since all the other environmentals, set up
 before the render, seem to be available.
 
 On Wed, Aug 25, 2010 at 8:29 AM, Blower, Andy
 andy.blo...@proquest.co.uk wrote:
  Can anyone make sense of this one:
 
  ERROR [16:22:34,848] btpool0-1
 (services.TapestryModule.RequestExceptionHandler:62) - Processing of
 request failed with uncaught exception: No object of type
 org.apache.tapestry5.services.ClientBehaviorSupport is available from
 the Environment.  Available types are
 org.apache.tapestry5.RenderSupport,
 org.apache.tapestry5.internal.services.DocumentLinker,
 org.apache.tapestry5.services.javascript.JavaScriptSupport.
  java.lang.RuntimeException: No object of type
 org.apache.tapestry5.services.ClientBehaviorSupport is available from
 the Environment.  Available types are
 org.apache.tapestry5.RenderSupport,
 org.apache.tapestry5.internal.services.DocumentLinker,
 org.apache.tapestry5.services.javascript.JavaScriptSupport.
                 at
 org.apache.tapestry5.internal.services.EnvironmentImpl.peekRequired(Env
 ironmentImpl.java:79)
                 at
 $Environment_12aa9d2d5fd.peekRequired($Environment_12aa9d2d5fd.java)
                 at
 $Environment_12aa9d2d3d5.peekRequired($Environment_12aa9d2d3d5.java)
                 at
 org.apache.tapestry5.internal.transform.EnvironmentalWorker$Environment
 alConduit.get(EnvironmentalWorker.java:57)
                 at
 org.apache.tapestry5.corelib.components.Form._$get_clientBehaviorSuppor
 t(Form.java)
                 at
 org.apache.tapestry5.corelib.components.Form._$advised$linkFormToZone(F
 orm.java:422)
                 at
 org.apache.tapestry5.corelib.components.Form$linkFormToZone$invocation_
 12aa9d2e99d.invokeAdvisedMethod(Form$linkFormToZone$invocation_12aa9d2e
 99d.java)
                 at
 org.apache.tapestry5.internal.services.AbstractComponentMethodInvocatio
 n.proceed(AbstractComponentMethodInvocation.java:77)
                 at
 org.apache.tapestry5.internal.transform.HeartbeatDeferredWorker$1$1.run
 (HeartbeatDeferredWorker.java:39)
                 at
 org.apache.tapestry5.internal.services.HeartbeatImpl.end(HeartbeatImpl.
 java:49)
                 at
 org.apache.tapestry5.services.TapestryModule$28.renderMarkup(TapestryMo
 dule.java:2061)
                 at
 $MarkupRenderer_12aa9d2d600.renderMarkup($MarkupRenderer_12aa9d2d600.ja
 va)
                 at
 org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryMo
 dule.java:2008)
                 at
 $MarkupRenderer_12aa9d2d600.renderMarkup($MarkupRenderer_12aa9d2d600.ja
 va)
                 at
 org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryMo
 dule.java:1990)
                 at
 $MarkupRenderer_12aa9d2d600.renderMarkup($MarkupRenderer_12aa9d2d600.ja
 va)
                 at
 org.apache.tapestry5.services.TapestryModule$23.renderMarkup(TapestryMo
 dule.java:1971)
                 at
 $MarkupRenderer_12aa9d2d600.renderMarkup($MarkupRenderer_12aa9d2d600.ja
 va)
                 at
 $MarkupRenderer_12aa9d2d5fc.renderMarkup($MarkupRenderer_12aa9d2d5fc.ja
 va)
                 at
 org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPag
 eMarkup(PageMarkupRendererImpl.java:64)
                 at
 $PageMarkupRenderer_12aa9d2d5f9.renderPageMarkup($PageMarkupRenderer_12
 aa9d2d5f9.java)
                 at
 org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderP
 ageResponse(PageResponseRendererImpl.java:69)
                 at
 $PageResponseRenderer_12aa9d2d5f8.renderPageResponse($PageResponseRende
 rer_12aa9d2d5f8.java)
                 at
 $PageResponseRenderer_12aa9d2d454.renderPageResponse($PageResponseRende
 rer_12aa9d2d454.java)
                 at
 org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.han
 dle(PageRenderRequestHandlerImpl.java:64)
                 at
 org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.j
 ava:2312)
                 at
 $PageRenderRequestHandler_12aa9d2d456.handle($PageRenderRequestHandler_
 12aa9d2d456.java)
                 at
 $PageRenderRequestHandler_12aa9d2d42b.handle($PageRenderRequestHandler_
 12aa9d2d42b.java

[T5.2] Property is not readable (was RE: Identity of the active page not established)

2010-08-25 Thread Blower, Andy
Thanks Robert, overriding with the latest version of PageResponse fixed it. 

I now have a problem with property conduits not being created where they were 
created fine in 5.1, e.g.

@SessionState(create = false)
@Property
private Profile personalProfile;

Caused by: java.lang.RuntimeException: Property 'personalProfile' of class 
com.proquest.apps.onesearch.components.myresearch.SignInOverlay is not readable 
(it has no read accessor method).

No idea why @Property isn't working the same in 5.2 - any ideas anyone?


 -Original Message-
 From: robert zeigler [mailto:robert.zeig...@gmail.com] On Behalf Of
 Robert Zeigler
 Sent: 23 August 2010 20:33
 To: Tapestry users
 Subject: Re: [T5.2] Identity of the active page not established
 
 There is a jira for this one (TAP5-1201/TAP5-1234... there might be one
 more related?).  It is fixed in trunk.
 
 Robert


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



RE: [T5.2] Javassist 3.12.1.GA checksum error

2010-08-25 Thread Blower, Andy
Is there any chance 5.2.1 will use javassist 3.13?

 -Original Message-
 From: Inge Solvoll [mailto:inge.tapes...@gmail.com]
 Sent: 25 August 2010 09:59
 To: Tapestry users
 Subject: Re: [T5.2] Javassist 3.12.1.GA checksum error
 
 I may have bumped into the same problem. But didn't get the same error,
 maven just told me that it didn't find anything at the https version of
 the
 url below. It's probably related.
 
 On Mon, Aug 23, 2010 at 1:26 PM, Blower, Andy
 andy.blo...@proquest.co.ukwrote:
 
  I'm trying to migrate our application to T5.2, but I'm getting a
 checksum
  error with Javassist 3.12.1.GA
 
  C:\tmpfciv -sha1 javassist-3.12.1.GA.jar
  526633327faa61aee448a519e8a4d53ec3057885
   javassist-3.12.1.ga.jar
 
 
  http://repository.jboss.org/nexus/content/groups/public-
 jboss/javassist/javassist/3.12.1.GA/javassist-3.12.1.GA.jar.sha1
 
  5e1f0b5574efb7b16be9b1b47195a5be0b65a365
 
 
  Anyone else had this problem? I'll try and figure out where to report
 this
  to JBoss, but I would have thought I wasn't the only Tapestry user to
 run
  into this issue. I looked at 3.9.0.GA as used by Tap5.1.0.5 and that
 is
  fine from the same repository.
 
  Thanks,
 
  Andy.
 


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



RE: [T5.2] Property is not readable (was RE: Identity of the active page not established)

2010-08-25 Thread Blower, Andy
It was a coding error, there was a base class with:

protected Profile getPersonalProfile() {
return personalProfile;
}

in it, not sure why this worked with 5.1 though. Anyway I've corrected it now. 
Thanks. :-)

It seems T5.2 is a bit stricter than previous versions and is saving me the 
trouble of randomly finding Tapestry coding issues. That's nice, although it 
means I have 2 years worth of unnoticed problems to work through...

Andy


 -Original Message-
 From: Howard Lewis Ship [mailto:hls...@gmail.com]
 Sent: 25 August 2010 15:21
 To: Tapestry users
 Subject: Re: [T5.2] Property is not readable (was RE: Identity of the
 active page not established)
 
 That's very odd; I've not seen anything like that.  Could we see the
 full stack trace?
 
 On Wed, Aug 25, 2010 at 3:01 AM, Blower, Andy
 andy.blo...@proquest.co.uk wrote:
  Thanks Robert, overriding with the latest version of PageResponse
 fixed it.
 
  I now have a problem with property conduits not being created where
 they were created fine in 5.1, e.g.
 
        �...@sessionstate(create = false)
        �...@property
         private Profile personalProfile;
 
  Caused by: java.lang.RuntimeException: Property 'personalProfile' of
 class com.proquest.apps.onesearch.components.myresearch.SignInOverlay
 is not readable (it has no read accessor method).
 
  No idea why @Property isn't working the same in 5.2 - any ideas
 anyone?
 
 
  -Original Message-
  From: robert zeigler [mailto:robert.zeig...@gmail.com] On Behalf Of
  Robert Zeigler
  Sent: 23 August 2010 20:33
  To: Tapestry users
  Subject: Re: [T5.2] Identity of the active page not established
 
  There is a jira for this one (TAP5-1201/TAP5-1234... there might be
 one
  more related?).  It is fixed in trunk.
 
  Robert
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: users-h...@tapestry.apache.org
 
 
 
 
 
 --
 Howard M. Lewis Ship
 
 Creator of Apache Tapestry
 
 The source for Tapestry training, mentoring and support. Contact me to
 learn how I can get you up and productive in Tapestry fast!
 
 (971) 678-5210
 http://howardlewisship.com
 
 -
 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



[T5.2] No object of type ClientBehaviorSupport is available from the Environment

2010-08-25 Thread Blower, Andy
Can anyone make sense of this one:

ERROR [16:22:34,848] btpool0-1 
(services.TapestryModule.RequestExceptionHandler:62) - Processing of request 
failed with uncaught exception: No object of type 
org.apache.tapestry5.services.ClientBehaviorSupport is available from the 
Environment.  Available types are org.apache.tapestry5.RenderSupport, 
org.apache.tapestry5.internal.services.DocumentLinker, 
org.apache.tapestry5.services.javascript.JavaScriptSupport.
java.lang.RuntimeException: No object of type 
org.apache.tapestry5.services.ClientBehaviorSupport is available from the 
Environment.  Available types are org.apache.tapestry5.RenderSupport, 
org.apache.tapestry5.internal.services.DocumentLinker, 
org.apache.tapestry5.services.javascript.JavaScriptSupport.
at 
org.apache.tapestry5.internal.services.EnvironmentImpl.peekRequired(EnvironmentImpl.java:79)
at 
$Environment_12aa9d2d5fd.peekRequired($Environment_12aa9d2d5fd.java)
at 
$Environment_12aa9d2d3d5.peekRequired($Environment_12aa9d2d3d5.java)
at 
org.apache.tapestry5.internal.transform.EnvironmentalWorker$EnvironmentalConduit.get(EnvironmentalWorker.java:57)
at 
org.apache.tapestry5.corelib.components.Form._$get_clientBehaviorSupport(Form.java)
at 
org.apache.tapestry5.corelib.components.Form._$advised$linkFormToZone(Form.java:422)
at 
org.apache.tapestry5.corelib.components.Form$linkFormToZone$invocation_12aa9d2e99d.invokeAdvisedMethod(Form$linkFormToZone$invocation_12aa9d2e99d.java)
at 
org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:77)
at 
org.apache.tapestry5.internal.transform.HeartbeatDeferredWorker$1$1.run(HeartbeatDeferredWorker.java:39)
at 
org.apache.tapestry5.internal.services.HeartbeatImpl.end(HeartbeatImpl.java:49)
at 
org.apache.tapestry5.services.TapestryModule$28.renderMarkup(TapestryModule.java:2061)
at 
$MarkupRenderer_12aa9d2d600.renderMarkup($MarkupRenderer_12aa9d2d600.java)
at 
org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:2008)
at 
$MarkupRenderer_12aa9d2d600.renderMarkup($MarkupRenderer_12aa9d2d600.java)
at 
org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryModule.java:1990)
at 
$MarkupRenderer_12aa9d2d600.renderMarkup($MarkupRenderer_12aa9d2d600.java)
at 
org.apache.tapestry5.services.TapestryModule$23.renderMarkup(TapestryModule.java:1971)
at 
$MarkupRenderer_12aa9d2d600.renderMarkup($MarkupRenderer_12aa9d2d600.java)
at 
$MarkupRenderer_12aa9d2d5fc.renderMarkup($MarkupRenderer_12aa9d2d5fc.java)
at 
org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:64)
at 
$PageMarkupRenderer_12aa9d2d5f9.renderPageMarkup($PageMarkupRenderer_12aa9d2d5f9.java)
at 
org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:69)
at 
$PageResponseRenderer_12aa9d2d5f8.renderPageResponse($PageResponseRenderer_12aa9d2d5f8.java)
at 
$PageResponseRenderer_12aa9d2d454.renderPageResponse($PageResponseRenderer_12aa9d2d454.java)
at 
org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:64)
at 
org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2312)
at 
$PageRenderRequestHandler_12aa9d2d456.handle($PageRenderRequestHandler_12aa9d2d456.java)
at 
$PageRenderRequestHandler_12aa9d2d42b.handle($PageRenderRequestHandler_12aa9d2d42b.java)
at 
org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48)
at 
org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47)
at 
$ComponentRequestHandler_12aa9d2d64e.handlePageRender($ComponentRequestHandler_12aa9d2d64e.java)
at 
$ComponentRequestHandler_12aa9d2d431.handlePageRender($ComponentRequestHandler_12aa9d2d431.java)
at 
com.proquest.apps.corelib.tapestry.dispatchers.RedirectPageRenderDispatcher.dispatch(RedirectPageRenderDispatcher.java:47)
at 
$Dispatcher_12aa9d2d433.dispatch($Dispatcher_12aa9d2d433.java)
at 
$Dispatcher_12aa9d2d3fe.dispatch($Dispatcher_12aa9d2d3fe.java)
at 
org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:320)
at 
com.proquest.apps.corelib.AppCoreLibModule$13.service(AppCoreLibModule.java:520)
at 

[T5.2] Javassist 3.12.1.GA checksum error

2010-08-23 Thread Blower, Andy
I'm trying to migrate our application to T5.2, but I'm getting a checksum error 
with Javassist 3.12.1.GA

C:\tmpfciv -sha1 javassist-3.12.1.GA.jar
526633327faa61aee448a519e8a4d53ec3057885  
javassist-3.12.1.ga.jar

http://repository.jboss.org/nexus/content/groups/public-jboss/javassist/javassist/3.12.1.GA/javassist-3.12.1.GA.jar.sha1

5e1f0b5574efb7b16be9b1b47195a5be0b65a365


Anyone else had this problem? I'll try and figure out where to report this to 
JBoss, but I would have thought I wasn't the only Tapestry user to run into 
this issue. I looked at 3.9.0.GA as used by Tap5.1.0.5 and that is fine from 
the same repository.

Thanks,

Andy.


[T5.2] Identity of the active page not established

2010-08-23 Thread Blower, Andy
I disabled checksum checking and got our app running with T5.2.

I've already fixed a few migration issues, but still not got a page to render 
yet. I'm getting the following error, but I have no idea why:


ERROR [17:11:11,834] btpool0-1 (onesearch.pages.SessionEnded:82) - Render queue 
error in BeginRender[SessionEnded:pagelayoutbasic.browserinfoform]: The 
identity of the active page for this request has not yet been established.
org.apache.tapestry5.ioc.internal.util.TapestryException: The identity of the 
active page for this request has not yet been established. [at 
classpath:com/proquest/apps/onesearch/components/PageLayoutBasic.tml, line 14]
at 
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:194)
at 
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRenderPhase.render(ComponentPageElementImpl.java:246)
at 
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:72)
at 
org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:117)
at 
$PageRenderQueue_12a9fb79bea.render($PageRenderQueue_12a9fb79bea.java)
at 
$PageRenderQueue_12a9fb79be1.render($PageRenderQueue_12a9fb79be1.java)
at 
org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37)
at 
com.proquest.apps.onesearch.services.OneSearchModuleServices$1.renderMarkup(OneSearchModuleServices.java:248)
at 
$MarkupRenderer_12a9fb79bec.renderMarkup($MarkupRenderer_12a9fb79bec.java)
at 
org.apache.tapestry5.services.TapestryModule$29.renderMarkup(TapestryModule.java:2073)
at 
$MarkupRenderer_12a9fb79bec.renderMarkup($MarkupRenderer_12a9fb79bec.java)
at 
org.apache.tapestry5.services.TapestryModule$28.renderMarkup(TapestryModule.java:2057)
at 
$MarkupRenderer_12a9fb79bec.renderMarkup($MarkupRenderer_12a9fb79bec.java)
at 
org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryModule.java:2039)
at 
$MarkupRenderer_12a9fb79bec.renderMarkup($MarkupRenderer_12a9fb79bec.java)
at 
org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryModule.java:2024)
at 
$MarkupRenderer_12a9fb79bec.renderMarkup($MarkupRenderer_12a9fb79bec.java)
at 
org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:2008)
at 
$MarkupRenderer_12a9fb79bec.renderMarkup($MarkupRenderer_12a9fb79bec.java)
at 
org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryModule.java:1990)
at 
$MarkupRenderer_12a9fb79bec.renderMarkup($MarkupRenderer_12a9fb79bec.java)
at 
org.apache.tapestry5.services.TapestryModule$23.renderMarkup(TapestryModule.java:1971)
at 
$MarkupRenderer_12a9fb79bec.renderMarkup($MarkupRenderer_12a9fb79bec.java)
at 
$MarkupRenderer_12a9fb79be8.renderMarkup($MarkupRenderer_12a9fb79be8.java)
at 
org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:64)
at 
$PageMarkupRenderer_12a9fb79be5.renderPageMarkup($PageMarkupRenderer_12a9fb79be5.java)
at 
org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:60)
at 
$PageResponseRenderer_12a9fb79acf.renderPageResponse($PageResponseRenderer_12a9fb79acf.java)
at 
org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:64)
at 
org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2312)
at 
$PageRenderRequestHandler_12a9fb79ad1.handle($PageRenderRequestHandler_12a9fb79ad1.java)
at 
$PageRenderRequestHandler_12a9fb79aa9.handle($PageRenderRequestHandler_12a9fb79aa9.java)
at 
com.proquest.apps.corelib.tapestry.dispatchers.SessionEndedDispatcher.dispatch(SessionEndedDispatcher.java:123)
at 
$Dispatcher_12a9fb79aae.dispatch($Dispatcher_12a9fb79aae.java)
at 
$Dispatcher_12a9fb79a79.dispatch($Dispatcher_12a9fb79a79.java)
at 
org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:320)
at 
com.proquest.apps.corelib.AppCoreLibModule$13.service(AppCoreLibModule.java:520)
at 
$RequestFilter_12a9fb79a78.service($RequestFilter_12a9fb79a78.java)
at 
$RequestHandler_12a9fb79a7a.service($RequestHandler_12a9fb79a7a.java)
at 
com.proquest.apps.onesearch.services.OneSearchLocalizationFilter.service(OneSearchLocalizationFilter.java:45)

Where do I get Tapestry 5.2 from?

2010-07-15 Thread Blower, Andy
The download link on the website takes me to a page with only 5.0  5.1 on it.

The rsync repository 
(http://people.apache.org/~hlship/tapestry-ibiblio-rsynch-repository) also 
doesn't have 5.2 anywhere.

I though being an alpha there may be 5.2.0 somewhere, not just snapshots. Am I 
looking in the right places?

So I look in the nightly repository we used to use, 
http://tapestry.formos.com/maven-snapshot-repository, and nothing there either. 
What am I missing? I've been using Tapestry for over two years, through 5.0.11 
to release and then 5.1.0.5, so I thought giving 5.2 a whirl wouldn't be that 
hard. I'm sure that the Project Information page used to have a link to where 
the snapshots are, but I can't see it.

Sorry for the stupid question, but can anyone help me?

Thanks,

Andy


RE: Where do I get Tapestry 5.2 from?

2010-07-15 Thread Blower, Andy
Thanks Juan, I hate using the snapshots because our Ivy dependency management 
doesn't get any dependencies until there's a real maven release, but it's all 
there. I knew it had probably moved from Formos, just didn't know where.

 -Original Message-
 From: Juan E. Maya [mailto:maya.j...@gmail.com]
 Sent: 15 July 2010 15:45
 To: Tapestry users
 Subject: Re: Where do I get Tapestry 5.2 from?
 
 Hi,
 
 the snapshots are available in the maven repository:
 http://repository.apache.org/snapshots
 
 You can get everything there.
 
 On Thu, Jul 15, 2010 at 4:25 PM, Christian Edward Gruber
 christianedwardgru...@gmail.com wrote:
  An alpha has not yet been released.  I believe Howard has said that
 an alpha
  or beta is close, but not quite there.
 
  Christian.
 
  On Jul 15, 2010, at 10:19 AM, Blower, Andy wrote:
 
  The download link on the website takes me to a page with only 5.0 
 5.1 on
  it.
 
  The rsync repository
  (http://people.apache.org/~hlship/tapestry-ibiblio-rsynch-
 repository) also
  doesn't have 5.2 anywhere.
 
  I though being an alpha there may be 5.2.0 somewhere, not just
 snapshots.
  Am I looking in the right places?
 
  So I look in the nightly repository we used to use,
  http://tapestry.formos.com/maven-snapshot-repository, and nothing
 there
  either. What am I missing? I've been using Tapestry for over two
 years,
  through 5.0.11 to release and then 5.1.0.5, so I thought giving 5.2
 a whirl
  wouldn't be that hard. I'm sure that the Project Information page
 used to
  have a link to where the snapshots are, but I can't see it.
 
  Sorry for the stupid question, but can anyone help me?
 
  Thanks,
 
  Andy
 
 
  -
  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 Central] Everyone out of the Pool! Tapestry goes singleton!

2010-07-15 Thread Blower, Andy
Me too, like in the next week! :)

 -Original Message-
 From: Christian Edward Gruber [mailto:christianedwardgru...@gmail.com]
 Sent: 15 July 2010 16:59
 To: Tapestry users
 Subject: Re: [Tapestry Central] Everyone out of the Pool! Tapestry goes
 singleton!
 
 5.2 hasn't even pushed an alpha release.  It's by no means
 inappropriate to include it in 5.2, though I'd love to see 5.2 locked
 down some enough to push an alpha very soon.
 
 Christian.
 
 On Jul 15, 2010, at 11:48 AM, Pierce Wetter wrote:
 
 
 
   This seems like a pretty dramatic change. Should it go into a 5.3,
  with 5.2 frozen except for fixes and targeted for release?
 
  Pierce
  -
  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 using 1.3Gb of heap space after capacity testing

2010-06-30 Thread Blower, Andy
 -Original Message-
 From: Howard Lewis Ship [mailto:hls...@gmail.com]
 Sent: 29 June 2010 18:20
 To: Tapestry users
 Subject: Re: Tapestry using 1.3Gb of heap space after capacity testing
 
 It may be time to return to a more radical idea, one that is more
 technically feasible now (in release 5.2) than it was in the past.

Why more feasible in 5.2? We're using 5.1.0.5, and are now too close to release 
to upgrade. I was hoping to move to 5.2 when I thought it would be released in 
H1 2010, but we'll need to stick with 5.1 now I think. We launch in August.
 
 Get rid of page pooling.
 
 I'm not saying to re-create each page for each request; I don't think
 that would scale.
 
 However, it may be possible to change Tapestry so that you need only
 ONE instance of a given page (per locale). All transient (per-request)
 state for the page could be accessed indirectly, stored in a
 per-thread object (or inside the Request, as attributes).
 
 I can envision some small amount of extra overhead per request (due to
 extra levels of indirection).
 
 However, you could then process any number of threads against the
 same, single page object with no extra memory consumption: for
 example, no more duplicated Binding objects, and no more extra Maps to
 hold them all.
 
 Some parts of the Tapestry's internal implementation
 (InternalComponentResourcesImpl and ComponentPageElementImpl) would
 need some changing, i.e., a bit more synchronization around some
 critical sections.
 
 It's an exciting idea ... when will I have time to investigate it?

It certainly is an exciting idea, out of curiosity How long do you think it 
would take you to implement this - it sounds like a pretty big overhaul to me.

Anything else that I could look into? Am I on the right track?


 -Original Message-
 From: Christophe Cordenier [mailto:christophe.corden...@gmail.com]
 Sent: 29 June 2010 19:35
 To: Tapestry users
 Subject: Re: Tapestry using 1.3Gb of heap space after capacity testing
 
 Holy grail ! but is it really feasible...
 
 @Andy Sorry i didn't follow all the thread but if i understand well, you
 have page instance of 7.5Mb for one single instance ? This is only due to
 page and component structure ?

That's correct I believe - it used to be 14Mb. Our largest page is 10Mb and we 
have 13 pages with over 4Mb retained size from their PageImpl's.

I'm not sure how this compares with the average, but I suspect they are a bit 
on the large size.

Andy


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



RE: Tapestry using 1.3Gb of heap space after capacity testing

2010-06-29 Thread Blower, Andy
I doubt anyone remembers this thread except me, but we're still having problems 
that I could do with help on.

So, two months later, we have managed to improve things significantly, but 
still have very large pages and we're having a lot of trouble with the page 
pool size. What we see when we push the app too hard is that the heap fills 
until the gc thread is permanently running, and the app is essentially dead and 
unresponsive. I've been testing with 2g  4g heaps up to now, with 100ms 
soft-wait  200 hard limit because we need a lot of instances of some pages, 
and were running out with a 100 limit. I know I need to understand and do more 
with these values, but it's worrying because our tests are only requesting 
English pages at present and we'll have 17 languages for launch! So I'm rather 
concerned to say the least...

I have a theory about what is happening that I'd like to run by the list and 
see what others think. I'm having some trouble figuring out what's happening at 
load.

What I think is that when the heap gets full-ish at high load, the gc kicks in 
more and more often, slowing request processing down a little. (there's a fair 
amount of soft referenced stuff it can boot) This means that pages are returned 
to the page pool a bit later causing more page instances to be created which 
fills the heap and enters an vicious cycle with the gc trying to free memory 
and the T5 page pool trying to create more page instances. The reason I suspect 
this is because heap dumps show about 40 PageImpl's that have not completed 
loading, and many more that have but are much smaller in size than others for 
the same page. (e.g. a Results PageImpl retaining 28k when a normal one retains 
7.5Mb - very big I know, but I've cut it down from 14Mb) 

Our site has 223 pages which consume 213Mb if 1 instance of each is 
instantiated. Multiply this by 200 (hard limit) and then by 17 languages and 
worst case we'll need a heap size of 725Gb which is a little ridiculous! I will 
do more work on reducing the size of the pages but I've already done the easy 
stuff.

Here's a list of the heap dominators using Eclipse MAT, 
http://lh6.ggpht.com/_YwJn8TJTqJU/TCoNT11ouZI/ACI/G8eTGsth4zM/HeapDominators.png

Anyone think I'm on the right track, or barking up the wrong tree completely?

Thanks,

Andy

 -Original Message-
 From: Blower, Andy [mailto:andy.blo...@proquest.co.uk]
 Sent: 20 April 2010 17:42
 To: 'Tapestry users'
 Subject: RE: Tapestry using 1.3Gb of heap space after capacity testing
 
 Thanks for the link. As I said before, I don't think that we've fallen
 prey to that exactly. Doing some local testing and looking at one of
 our largest pages which displays search results, it has 76 component
 objects, each of those will have components nested within (pretty
 heavily in some cases) but nothing which has a bunch of components
 where only one is used and the others are redundant. (what I think is
 this uber-component thing)
 
 It looks like explicit repeated use of a component, rather than using a
 single component in a loop, creates a lot more component objects in the
 heap. I've never seen anything warning against this, and we do usually
 use loops but it's not always the best solution.
 
 Again, looking at our results page, a single instance seems to get
 11,283 ComponentPageElementImpl instances created for it. I'm finding
 it hard to find a good view of the tree to figure out what component(s)
 are the main culprits for this huge number of instances.
 
 Thanks for any help or guidance you can give me.
 
 Andy
 
  -Original Message-
  From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com]
  Sent: 20 April 2010 15:56
  To: Tapestry users
  Subject: Re: Tapestry using 1.3Gb of heap space after capacity
 testing
 
  On Tue, 20 Apr 2010 11:41:25 -0300, Blower, Andy
  andy.blo...@proquest.co.uk wrote:
 
   Uber-component anti-pattern, not to my knowledge, but we have a lot
  of
   pages and components now. And a lot of logic in them. The project's
   large enough I can't be sure. Do you have a handy link to Howard's
   description so I can get my team to check?
 
  It's here:
  http://old.nabble.com/-T5.0.18--Out-of-Memory-Error---Potential-Leak-
  (doesn't-reduce-after-forced-GC)-to25403474s302.html#a25497441
  That thread is interesting, by the way. The problem is more about how
  components and pages are written than the number of them.
  What Tapestry version are you using?
 
   Page pool config is default, I don't know enough to fiddle yet.
 Also,
   the test is on a single stand alone server with no clustering, we
 are
   using Tomcat clustering for production.
 
  You should take a look a them, as they can affect the memory
  consumption
  directly.
 
   I did fire the GC manually before getting concerned BTW. A lot of
  heap
   seems to be taken up with 100-300k descriptions on the
   InternalClassTransformationImpl class. An example of one is
 attached
   below - seems

Tapestry using 1.3Gb of heap space after capacity testing

2010-04-20 Thread Blower, Andy
We've been doing some capacity testing recently, and I'm concerned about the 
amount of heap memory that doesn't get freed when all the sessions expire. I'm 
seeing 1.3Gb after being left with no use overnight. I dumped the heap and took 
a look at what was using this much memory with the YourKit profiler. It looks 
to me like it's the Tapestry Page cache and javaassist stuff.

Here's a screenshot of the largest classes:

http://lh3.ggpht.com/_YwJn8TJTqJU/S82xSv1DPfI/ABk/exlCHmPfy5E/T5.1-1300Mb-Heap.jpg


Has anyone else seen this and is this what should be expected with Tapestry?  
It seems excessive to me, and leaves very little heap for our application to 
use, we currently have a 2Gb heap limit, and although I know this can be raised 
I'm still concerned.

Thanks,

Andy.


P.S. If there's anything else I should look at in the heap dump let me know, or 
if anyone wants the dump I can make it available. (300Mb zipped)



Is there a way of knowing if Tapestry is page rendering or event handling (was: Page render event URLs with large optional context parameter)

2010-02-22 Thread Blower, Andy
Hi, and thanks for your reply to my previous enquiry Kalle. I have too many 
render links being generated to want to do that, but it did help me step back 
and come at the problem from a different angle.

So what I'm thinking of now is having onPassivate only add the extra (optional) 
bit of the activation context if it's *not* rendering this particular page. So 
other pages will generate links to it with the extra AC param, by calling this 
pages' onPassivate. And the page itself when an event handler returns null will 
add the extra AC param in onPassivate because the page isn't rendering. When it 
is none of the links get the extra AC param. Only a problem if the page renders 
page links to itself, they will not be bookmarkable because the extra AC param 
is missing. This is not a problem because it doesn't link to render itself - 
always calls event handlers first.

Note that the extra AC param can be generated from the session, so it doesn't 
need passing in the URL - it's only there in case the URL is bookmarked.

So, how can I detect if Tapestry is rendering (and which page) from within the 
pages' onPassivate method? Is there a way, or do I need to add my own 
mechanism? (pretty simply by setting a Boolean flag in setup render..)

Thanks,

Andy

 -Original Message-
 From: Kalle Korhonen [mailto:kalle.o.korho...@gmail.com]
 Sent: 16 February 2010 18:22
 To: Tapestry users
 Subject: Re: Page render  event URLs with large optional context
 parameter
 
 If you have a limited number of pagelinks referring to the same page,
 maybe you could just contruct them by hand and just return null in
 onPassivate. I.e. store the initial context to @Property
 initialContext and then render the page links with t:pagelink
 page=mypage context=initialContext/ - would that work?
 
 Kalle
 
 
 On Tue, Feb 16, 2010 at 9:54 AM, Blower, Andy
 andy.blo...@proquest.co.uk wrote:
  I may have enquired about this a while back, but I put it on the back
 burner and am only just returning to it now.
 
  Basically I have a page with an activation context which is not
 bookmarkable (relies on session info) without an extra parameter in the
 activation context which contains all the info that allows the page to
 be regenerated without the original session. This works fine, but the
 issue is that the string is very long and it gets added to every event
 link on the page even though it's completely useless except once the
 session has the info in it - if the session times out and then one of
 the event links is clicked there's a dispatcher to detect  redirect to
 a session ended page with a login page following. So, it's only really
 useful in page render URL's that appear in the browser location box and
 can be bookmarked.
 
  Why worry about it, well, it increases the page size by 15-20%.
 That's a lot and I want to come up with a way of only having this
 context param in page render URL's. The page's activation handles it
 being present or not perfectly, I'm just not sure how to make the
 context that passivate returns conditional on the type of link being
 generated. My only idea so far is to use call stack introspection to
 see where the method was called from, but I'd rather not - seems quite
 horrible.
 
  Anyone have any (more elegant and Tapestry-ish) ideas?
 
  Thanks,
 
  Andy Blower.
 
 
 -
 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: Is there a way of knowing if Tapestry is page rendering or event handling (was: Page render event URLs with large optional context parameter)

2010-02-22 Thread Blower, Andy
Thanks for the reply Thiago. I'm pretty familiar with the methods in CELE (as I 
call it) but I'm not seeing what you're getting at. Is there something that 
Tapestry puts in the environment? If I'm adding my own mechanism I'll be going 
with a simple Boolean flag in the page class that's set to true by setup render 
rather than adding/intercepting CELE methods.


 -Original Message-
 From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com]
 Sent: 22 February 2010 13:42
 To: Tapestry users
 Subject: Re: Is there a way of knowing if Tapestry is page rendering or
 event handling (was: Page render  event URLs with large optional
 context parameter)
 
 On Mon, 22 Feb 2010 10:20:59 -0300, Blower, Andy
 andy.blo...@proquest.co.uk wrote:
 
  So, how can I detect if Tapestry is rendering (and which page) from
  within the pages' onPassivate method?
 
 Take a look at the decode* methods in ComponentEventLinkEncoder.
 
 --
 Thiago H. de Paula Figueiredo
 Independent Java, Apache Tapestry 5 and Hibernate consultant,
 developer,
 and instructor
 Owner, software architect and developer, Ars Machina Tecnologia da
 Informação Ltda.
 http://www.arsmachina.com.br
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 



Page render event URLs with large optional context parameter

2010-02-16 Thread Blower, Andy
I may have enquired about this a while back, but I put it on the back burner 
and am only just returning to it now.

Basically I have a page with an activation context which is not bookmarkable 
(relies on session info) without an extra parameter in the activation context 
which contains all the info that allows the page to be regenerated without the 
original session. This works fine, but the issue is that the string is very 
long and it gets added to every event link on the page even though it's 
completely useless except once the session has the info in it - if the session 
times out and then one of the event links is clicked there's a dispatcher to 
detect  redirect to a session ended page with a login page following. So, it's 
only really useful in page render URL's that appear in the browser location box 
and can be bookmarked.

Why worry about it, well, it increases the page size by 15-20%. That's a lot 
and I want to come up with a way of only having this context param in page 
render URL's. The page's activation handles it being present or not perfectly, 
I'm just not sure how to make the context that passivate returns conditional on 
the type of link being generated. My only idea so far is to use call stack 
introspection to see where the method was called from, but I'd rather not - 
seems quite horrible.

Anyone have any (more elegant and Tapestry-ish) ideas?

Thanks,

Andy Blower.


RE: Example of overriding the default ValidationDecorator

2009-12-24 Thread Blower, Andy
 Unfortunately it seems that it does not help against these error-
 bubbles.

To override the client side you'll need to read tapestry.js and follow some of 
what it does. Personally I feel that the error bubbles should not be part of 
the T5 core, but an optional example validation module.

I created an inline validation decorator which puts the validation messages 
inside the field labels (for accessibility reasons) and overrode parts of 
tapestry.js in a js file added in our page layout so it comes on every page. 
Removing and changing the client side validation functions. Compare with the 
std tapestry.js versions and hopefully it will help you.

The js looks like this:

Tapestry.FormEventManager.addMethods(
{
initialize : function(form)
{
this.form = $(form);

this.form.onsubmit = 
this.handleSubmit.bindAsEventListener(this);
},

handleSubmit : function(domevent)
{
var t = $T(this.form);

t.validationError = false;

this.form.fire(Tapestry.FORM_PREPARE_FOR_SUBMIT_EVENT, 
this.form);

// This flag can be set to prevent the form from submitting 
normally.
// This is used for some Ajax cases where the form submission 
must
// run via Ajax.Request.

if (this.preventSubmission)
{
// Prevent the normal submission.

Event.stop(domevent);

// Instead ...

this.form.fire(Tapestry.FORM_PROCESS_SUBMIT_EVENT);

return false;
}

// Validation is OK, not doing Ajax, continue as planned.

return true;
}
});

Tapestry.FieldEventManager.addMethods(
{
initialize : function(field)
{
this.field = $(field);

var id = this.field.id;
this.label = $(id + '-label');
this.icon = $(id + '-icon');

this.translator = Prototype.K;

document.observe(Tapestry.FOCUS_CHANGE_EVENT, function(event)
{
// If changing focus *within the same form* then 
perform validation.
// Note that Tapestry.currentFocusField does not change
// until after the FOCUS_CHANGE_EVENT notification.
if (Tapestry.currentFocusField == this.field  
this.field.form == event.memo.form) {
this.validateInput();
}
}.bindAsEventListener(this));
},

// Removes validation decorations if present.
removeDecorations : function()
{
this.field.removeClassName(t-error);

if (this.label) {
this.icon.hide();
this.label.insert(this.icon);
var errorMsgId = this.field.id + ':error';
if (!this.errorMessage) {
this.errorMessage = $(errorMsgId);
}
if (this.errorMessage) {
Element.remove(this.errorMessage);
this.errorMessage = null;
}
}
},

/**
 * Show a validation error message, which will add decorations to the
 * field and it label.
 * @param message validation message to display
 */
showValidationMessage : function(message)
{
$T(this.field).validationError = true;
$T(this.field.form).validationError = true;
this.field.addClassName(t-error);

if (this.label) {
var errorMsgId = this.field.id + ':error';
if (!this.errorMessage) {
this.errorMessage = $(errorMsgId);
}
if (!this.errorMessage) {
this.errorMessage = new Element('span', {'id': 
errorMsgId, 'class': 't-error'});
this.label.insert({ bottom: this.errorMessage});
}
this.errorMessage.update(message);
this.errorMessage.insert({top: this.icon});
this.icon.show();
}
}
});


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



RE: T 5.1 vs 5.0 JSON encoding - breaks IE8

2009-11-18 Thread Blower, Andy
+1 
(+40 if I count all T5 developers here ;-)

Although I suggested a 5.1.1.x release in my previous post, quoted from below, 
I don't care what it's called as long as there's a non 5.2 bug-fix release. 
(preferably more than one release..)

I think you should write the book, but only if there's going to be a T5.1.1.x 
set of releases with bugfixes - this is long overdue in my opinion. (we have 
too many 'temporary' tapestry fixes - it's annoying  embarrassing) I don't 
think there's any pressing need for T5.2 yet (IMHO) but there are a lot of bugs 
in JIRA and some of them are quite serious. You have a few good committers and 
a community who often submit patches when they enter bugs. What's missing is 
getting some momentum and getting the results out there in official releases!


 -Original Message-
 From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com]
 Sent: 18 November 2009 10:50
 To: Tapestry users
 Subject: Re: T 5.1 vs 5.0 JSON encoding - breaks IE8
 
 Em Wed, 18 Nov 2009 08:20:46 -0200, Ulrich Stärk u...@spielviel.de
 escreveu:
 
  Since we recently also fixed a major bug concerning application
  security, I'd say we should do a 5.1.0.6 release.
 
 +1
 


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



RE: Getting I18n messages from another page

2009-11-13 Thread Blower, Andy
You could give both pages a base class (assuming that the app catalog is not an 
appropriate solution) then the base class has the properties and they can be 
referenced by both pages. (note that the pages shouldn't have prop files)

 -Original Message-
 From: Stephan Windmüller [mailto:stephan.windmuel...@cs.tu-dortmund.de]
 Sent: 13 November 2009 12:26
 To: users@tapestry.apache.org
 Subject: Getting I18n messages from another page
 
 Hello!
 
 One quick question: Is it possible to retrieve the I18n messages from
 another page? I tried this:
 
 ---
 
 class SomePage {
   private Messages messages;
 
   public String getTitle() {
   return messages.get(title);
   }
 }
 
 class AnotherPage {
   @InjectPage
   private SomePage somePage;
 
   public void printTitle() {
   System.out.println(somePage.getTitle);
   }
 }
 
 
 ---
 
 But I always get the title of anotherPage.
 
 TIA
  Stephan
 
 -
 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: [ANNOUNCEMENT] New Tapestry 5 book

2009-11-12 Thread Blower, Andy
+3 (at least)

 -Original Message-
 From: Peter Stavrinides [mailto:p.stavrini...@albourne.com]
 Sent: 12 November 2009 09:15
 To: Tapestry users
 Subject: Re: [ANNOUNCEMENT] New Tapestry 5 book
 
 +1
 
 
 - Original Message -
 From: Ivano Luberti lube...@archicoop.it
 To: Tapestry users users@tapestry.apache.org
 Sent: Thursday, 12 November, 2009 10:21:35 GMT +02:00 Athens, Beirut,
 Bucharest, Istanbul
 Subject: Re: [ANNOUNCEMENT] New Tapestry 5 book
 
 +1
 If you need something signed with blood, drop me a copy of the document
 :-D
 
 
 Igor Drobiazko ha scritto:
  Good news. My publisher made the first step towards the translation.
 They
  contacted several publishers outside Germany to find one that is
 interested
  in translation. If some of them is interested then we will have the
 english
  version of the book.
 
  If you want to help me to make the translation possible make some
 noise
  here. The more comments here the more likely we will have a
 translation.
  I'll keep you informed about the progress.
 
  On Wed, Sep 16, 2009 at 7:28 PM, Igor Drobiazko
 igor.drobia...@gmail.comwrote:
 
 
  Hello folks,
 
  I am pleased to announce a new Tapestry 5 book. The book is written
 in
  German and is available as eBook on publisher's website:
 
 
  http://www.addison-
 wesley.de/main/main.asp?page=home/bookdetailsProductID=174975
 
 
  The hardcover version of the book will be available starting from
 Sep 28
  2009.
  I'll make another announcement when the hardcover version is
 released.
 
  Among other things the book covers :
 * Getting Started with Tapestry 5
 * Concepts of the framework
 * Localization/internationalization
 * Creating Forms
 * Generation of user interfaces for JavaBeans
 * Writing own components and mixins
 * Ajax
 * Writing tests for Tapestry applications
 * Hibernate and Spring integration
 * Dependency Injection and Tapestry IoC
 * AOP and bytecode manipuation
 
  Special thanks go to Howard and Ulrich Stärk. Howard gave me some
 hints on
  how to write a better book and wrote a foreword.
  Ulrich was responsible for the technical review of the book and
 helped me
  to improve the quality.
 
  Enjoy
 
  --
  Best regards,
 
  Igor Drobiazko
 
 
 
 
 
 
 
 --
 ==
 dott. Ivano Mario Luberti
 Archimede Informatica societa' cooperativa a r. l.
 Sede Operativa
 Via Gereschi 36 - 56126- Pisa
 tel.: +39-050- 580959
 tel/fax: +39-050-9711344
 web: www.archicoop.it
 ==
 
 
 -
 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 Central] Next Steps for Tapestry

2009-11-09 Thread Blower, Andy
I think you should write the book, but only if there's going to be a T5.1.1.x 
set of releases with bugfixes - this is long overdue in my opinion. (we have 
too many 'temporary' tapestry fixes - it's annoying  embarrassing) I don't 
think there's any pressing need for T5.2 yet (IMHO) but there are a lot of bugs 
in JIRA and some of them are quite serious. You have a few good committers and 
a community who often submit patches when they enter bugs. What's missing is 
getting some momentum and getting the results out there in official releases!

Doing this would allow you to carry on your consulting, write the book (very 
important, although just having an English language version of Igor's might be 
enough, especially if you rounded out any areas you felt needed expanding - 
maybe a joint effort?) and spend a little time here  there on any bugfixes you 
feel need your personal attention. (if there are any)

Whether or not you're involved in the releases is up to you, but at the moment 
nothing's happening which is not good.

Cheers,

Andy Blower.

 -Original Message-
 From: Howard [mailto:hls...@gmail.com]
 Sent: 07 November 2009 18:11
 To: users@tapestry.apache.org
 Subject: [Tapestry Central] Next Steps for Tapestry
 
 I've been consciously letting Tapestry 5.1 sit and stabilize for a
 while ... a time that's stretched a few months longer than I initially
 intended.
 This is due to a number of factors: my return to independent
 consulting, my desire to write a definitive Tapestry 5 book, and
 preparations for many trips and speaking engagements.
 All of these factors have worked on each other: I've been improving and
 extending my Tapestry Workshop training materials which can be quite
 time consuming. I've also (over the last several months) been on the
 road several times, talking about Tapestry or doing Tapestry training.
 I do want to write a book on Tapestry but if I start writing 5.2 code,
 I know I'll be sucked right in ... lots of code (that darn Spring Web
 Flow integration for sure this time) and bug fixes.
 In addition, I've had an embarassment of riches: two main clients, one
 regular part time, and the other requesting (but not always getting)
 all my remaining time. I also have additional clients and training
 engagements waiting in the wings. I simply have a lot of draws on my
 time.
 As usual, working on real-world projects lets me experience the rough
 edges of Tapestry and fills me with ideas on how to address those in
 the next release ... often by splitting up Tapestry services into
 smaller, more easily overridden chunks and carefully moving internal
 services out into the public APIs.
 Finally, I've been very pleased by the fact that as I've stepped back
 temporarily from my normal stream of commits, the other Tapestry
 developers have stepped in and filled the gap. There's been quite a bit
 of activity especially from Igor that I've barely had a chance to keep
 up on.
 So the question is: do I wait and see if time opens up in Q1 to
 actually start on a T5 book ... or do I jump into 5.2 coding and leave
 books to others? It's much, much easier to write code than to write a
 book ... a book is a large amount of concentrated effort. It's very
 hard to accomplish anything on a book using an hour here or an evening
 there ... whereas Tapestry's code base lends itself to that kind of
 effort quite nicely.
 
 --
 Posted By Howard to Tapestry Central at 11/07/2009 10:11:00 AM


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



RE: i18n overhead

2009-11-09 Thread Blower, Andy
We also have a lot of properties files, but so far only one translation. We 
will have 20+ translations in due course, so I would be concerned if there were 
performance problems/implications. We're already using 5.1, so I'd be 
interested if this version has issues will many files.

 -Original Message-
 From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com]
 Sent: 08 November 2009 13:30
 To: Tapestry users
 Subject: Re: i18n overhead
 
 Em Sun, 08 Nov 2009 11:20:48 -0200, Melidramo a...@kochira.com
 escreveu:
 
  Why so many property files? Just curious. :)
  This is a big project...
 
 :)
 
  What exact version? 5.1.05? 5.0.18?
  5.0.18
 
 There are some changes between 5.0.18 to 5.1.0.5 that can affect
 performance.
 
  Is your question an incentive to migrate to 5.1?
 
 Regardless of performance issues, I think it's a good thing to do.
 
 --
 Thiago H. de Paula Figueiredo
 Independent Java, Apache Tapestry 5 and Hibernate consultant,
 developer,
 and instructor
 Owner, software architect and developer, Ars Machina Tecnologia da
 Informação Ltda.
 http://www.arsmachina.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



RE: [Tapestry Central] Tapestry 5.1 and IE 8 -- Customizing Tapestry

2009-11-09 Thread Blower, Andy
 Picture an existing application that's been deployed using Tapestry
 5.1.0.5; the prototype.js is exposed to the client as
 /assets/scriptaculous/5.1.0.5/prototype.js.
 
 Now the application is rebuild with tapx-prototype and redeployed.
 Without the remapping, the URL would be unchanged and some clients
 would continue to use the old prototype.js.
 
 With the new contribution, the URL will now be
 /assets/tapx-prototype/1.6.1/prototype.js which will force the browser
 to reload.

Right, I understand now - thanks. So we don't need this since we've not 
released yet and it'll only change again if we upgrade T5 versions.
 
 That being said, I'm finding the current version number system too
 complicated. Rather than hide assets behind a mish-mash of application
 version numbers, library version numbers and Tapestry's version
 number, I'm thinking of simplifying it to be just the application
 version number. So all asset URLs would be /asset/XYZ/...  where XYZ
 was the application version number. That means that on an update to
 the application, clients would have to download a fresh copy of
 prototype.js, tapestry.js, etc. (the core Tapestry stack) but it would
 be harder to screw up some of these other path  version number
 details.

I like it the way it is personally, seems elegant and efficient.


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



Tapestry 5 and EZproxy

2009-10-16 Thread Blower, Andy
We need to support users and institutions who use EZproxy 
(http://www.oclc.org/ezproxy/default.htm) which should be pretty easy.

I've been trying it, and things work okay until AJAX is used and then T5 throws 
this exception:

(services.TapestryModule.RequestExceptionHandler:62) - Processing of request 
failed with uncaught exception: A component event handler method returned the 
value {result:success,numMsg:1 new,method:add}. Return type 
org.apache.tapestry5.json.JSONObject can not be handled.  Configured return 
types are java.lang.Class, java.lang.String, java.net.URL, 
org.apache.tapestry5.Link, org.apache.tapestry5.StreamResponse, 
org.apache.tapestry5.runtime.Component.

And the Ajax JS gets a 500 internal server error.


I'm going to be investigating this next week, but I thought I'd enquire whether 
anyone on the list has tried T5 or even just Prototype based websites with 
EZproxy? If you have I'd really like to hear from you, especially if you know 
what's going wrong for us.

Thanks,

Andy.


RE: Tapestry 5 and EZproxy

2009-10-16 Thread Blower, Andy
Thiago, 

Thank you for such a quick and insightful response - I've just checked and 
EZproxy does appear to be removing this header.

I'll email EZproxy support and see what they say. If they have to update 
EZproxy to cope with this then we could be in trouble. Customers may not be 
happy being forced to upgrade their EZproxy installations so they can use our 
product.

Is there any way round this you can think of?


Thanks,

Andy.

 -Original Message-
 From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com]
 Sent: 16 October 2009 17:15
 To: Tapestry users
 Subject: Re: Tapestry 5 and EZproxy
 
 Em Fri, 16 Oct 2009 13:05:23 -0300, Blower, Andy
 andy.blo...@proquest.co.uk escreveu:
  (services.TapestryModule.RequestExceptionHandler:62) - Processing of
  request failed with uncaught exception: A component event handler
 method
  returned the value {result:success,numMsg:1
 new,method:add}.
  Return type org.apache.tapestry5.json.JSONObject can not be handled.
  Configured return types are java.lang.Class, java.lang.String,
  java.net.URL, org.apache.tapestry5.Link,
  org.apache.tapestry5.StreamResponse,
  org.apache.tapestry5.runtime.Component.
 
 Tapestry checks if an HTTP header named 'X-Requested-With' has the
 value
 'XMLHttpRequest'. If not, it is not considered an AJAX request.
 One possibility is that the proxy is removing this HTTP header.
 
 --
 Thiago H. de Paula Figueiredo
 Independent Java consultant, developer, and instructor
 http://www.arsmachina.com.br/thiago
 
 -
 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 upgrading to prototype.js version 1.6.1 for IE8 compliance

2009-10-02 Thread Blower, Andy
I occasionally did this while a bugfix was coming in T5 development, but only 
between releases. As you say it's not an ideal method.

So, could we have a response about when a Tapestry release will come out 
containing Prototype 1.6.1 - surely it's not going to wait for first T5.2 
release because that looks a long way off with Howard focussing on 
documentation.

As Matt said, it's rather important for IE8 compatibility which is only going 
to get more important as time passes.

 -Original Message-
 From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com]
 Sent: 02 October 2009 16:14
 To: Tapestry users
 Subject: Re: Tapestry upgrading to prototype.js version 1.6.1 for IE8
 compliance
 
 Em Fri, 02 Oct 2009 12:09:55 -0300, Michael Gerzabek
 michael.gerza...@gmx.net escreveu:
 
  But a very good one: I do all customizations that way!
  I ever thought that's the proposed way to do things with T5
 
 This relies in the order at which the files are put in the classpath,
 so
 its very fragile. Avoid that.
 
 --
 Thiago H. de Paula Figueiredo
 Independent Java consultant, developer, and instructor
 http://www.arsmachina.com.br/thiago
 
 -
 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: Problem with OptimizedSessionPersistedObject not working in Tomcat Jetty

2009-09-07 Thread Blower, Andy
I'm surprised that no one else is bothered by this, are we the only ones 
developing a Tapestry app for a clustered environment or something?

Anyway, given zero votes I figured it's not likely to get fixed any time soon 
so we've implemented a solution which we're now using and I've attached the 
patch to the JIRA issue.

 -Original Message-
 From: Blower, Andy [mailto:andy.blo...@proquest.co.uk]
 Sent: 03 September 2009 15:11
 To: 'Tapestry users'
 Subject: Problem with OptimizedSessionPersistedObject not working in
 Tomcat  Jetty
 
 I don't know if anyone else has spotted this, and it may well be the
 case for other servlet containers as well, but we noticed that objects
 were being propagated across our cluster even when a page that only
 read the session object was just being refreshed.
 
 This is a very serious issue, not quite a blocker because everything
 functions okay, but I really think this should be fixed and released as
 5.1.0.6 as soon as possible. Please take a look at the bug and vote for
 it if you agree: https://issues.apache.org/jira/browse/TAP5-834
 
 I've included a couple of suggestions of solutions, please comment if
 you thing there are any drawbacks or better ones.
 
 Thanks,
 
 Andy.


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



Problem with OptimizedSessionPersistedObject not working in Tomcat Jetty

2009-09-03 Thread Blower, Andy
I don't know if anyone else has spotted this, and it may well be the case for 
other servlet containers as well, but we noticed that objects were being 
propagated across our cluster even when a page that only read the session 
object was just being refreshed.

This is a very serious issue, not quite a blocker because everything functions 
okay, but I really think this should be fixed and released as 5.1.0.6 as soon 
as possible. Please take a look at the bug and vote for it if you agree: 
https://issues.apache.org/jira/browse/TAP5-834

I've included a couple of suggestions of solutions, please comment if you thing 
there are any drawbacks or better ones.

Thanks,

Andy.


regexp validator bug (TAP5-520

2009-08-18 Thread Blower, Andy
I just tried to use regexp=^\d{3,4}$ with a regex validator and it threw a 
parse error, so I had to change it to regexp=^(\d{3}|\d{4})$

Looking at JIRA, this was fixed by Igor under TAP5-520 in 5.1.0.1, but I'm 
using 5.1.0.5 so it may not be as fixed as was originally thought. Should this 
issue be reopened again?


Problem with custom ValidationDecorator for Ajax form submissions

2009-08-14 Thread Blower, Andy
We've developed our own custom ValidationDecorator which works nicely. To 
activate it for a form we're pushing it onto the environment in the setupRender 
for each component/page with a form that needs validation, like this:

@BeginRender
void setup(MarkupWriter writer)
{
environment.push(ValidationDecorator.class, new 
InlineValidationDecorator(environment, writer, spacerImage, false));
}

(inspired by http://markmail.org/message/pq5u53h4njwldygz)

A corresponding JavaScript file is also included into the page which overrides 
the client side behaviour from tapestry.js the way we want it.

This all works fine until we do Ajax form submission where our 
InlineValidationDecorator is not being pushed onto the environment for the 
partial page render. This is being activated by returning a block from the 
submit event handler.

So, any ideas how to do this? I'm not the first person to hit this stumbling 
block, Inge posted about this here: http://markmail.org/message/izdmsolr626wog4k

This is pretty serious, we really need to solve this issue for our upcoming 
milestone release.

Thanks,

Andy.


T5 bug with first line of message catalogs

2009-08-12 Thread Blower, Andy
I just ran into a T5 bug where the first line in a message catalog never 
returns a translated version. I'm sure I dimly recall encountering this before 
and I'd like to check on the status, can anyone remember / find a bug for this 
issue. I tried searching and couldn't find one, so maybe I encountered it but 
never raised it?


RE: T5 bug with first line of message catalogs

2009-08-12 Thread Blower, Andy
Found it. TAP5-409, T5 doesn't recognise BOM at the start of UTF-8 files. It 
would be nice to fix this rather than just document it or leave it. Anyone else 
have any opinion on this?

 -Original Message-
 From: Blower, Andy [mailto:andy.blo...@proquest.co.uk]
 Sent: 12 August 2009 11:34
 To: 'Tapestry users'
 Subject: T5 bug with first line of message catalogs
 
 I just ran into a T5 bug where the first line in a message catalog
 never returns a translated version. I'm sure I dimly recall
 encountering this before and I'd like to check on the status, can
 anyone remember / find a bug for this issue. I tried searching and
 couldn't find one, so maybe I encountered it but never raised it?


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



Documentation of T5 URLs post-redirect-get

2009-07-23 Thread Blower, Andy
I was just trying to explain the way T5 pages in a package xyz can be called 
XyzResults and the URL will be xyz/results to one of my team, and I couldn't 
find the documentation for this on the Tapestry site. I was also struggling to 
find where the post-redirect-get paradigm is documented.

Can anyone point me to the right places please?


RE: Documentation of T5 URLs post-redirect-get

2009-07-23 Thread Blower, Andy
  I was just trying to explain the way T5 pages in a package xyz can be
  called XyzResults and the URL will be xyz/results to one of my team,
 and
  I couldn't find the documentation for this on the Tapestry site.
 
 Take a look at
 http://tapestry.apache.org/tapestry5.1/guide/component-classes.html,
 section Subfolders/Subpackages.

Thanks Thiago, I was looking for page documentation. This could be a little 
more easy to find I feel. I knew the answer, but we were trying to put a link 
to T5 documentation in a wiki page explaining something.

  I was also struggling to find where the post-redirect-get paradigm is
  documented.
 
 Post-redirect-get is most known as redirect after post, so searching
 for
 it in Google will yield better results.
 Take a look at http://en.wikipedia.org/wiki/Post/Redirect/Get and then
 http://www.theserverside.com/tt/articles/article.tss?l=RedirectAfterPos
 t.

I meant Tapestry use of it, and how it affects render/event processing. I'm 
sure the old documentation had a section on this.


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



RE: Is AjaxFormLoop example working for you?

2009-07-17 Thread Blower, Andy
Neither work for me on FF3.0.11, XP, Proxy from the UK.

 -Original Message-
 From: Geoff Callender [mailto:geoff.callender.jumpst...@gmail.com]
 Sent: 17 July 2009 01:08
 To: Tapestry users
 Subject: Is AjaxFormLoop example working for you?
 
 Everyone,
 
 Please try this quick experiment. I am trying to figure out why it
 works for some people and not for others.
 
 The experiment is: go to the following two pages and click on Add a
 row...
 
   http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/ta
 bles/ajaxformloop1
   http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/ta
 bles/ajaxformlooptailored1
 
 Did it work? Please reply here with whether it worked or not, and
 include whether you are running through a proxy, whether you OS is
 Windows, and what country you are in.
 
 Hopefully there's a pattern.
 
 Thanks,
 
 Geoff
 
 P.S. The people who reported a problem say that the blackbird console
 shows this kind of thing:
 
 # Communication with the server failed: The rendered content did not
 include any elements that allow for the positioning of the hidden form
 field's element.
 # Ajax failure: Status 500 for /jumpstart/examples/tables/
 ajaxformlooptailored1
 .ajaxformloop
 .rowinjector:inject;jsessionid=3BB5CE5E0D166AC91A4561295B8F5151?
 t:formcomponentid=examples/tables/
 AjaxFormLoopTailored1:personseditt:formid=personsedit: The rendered
 content did not include any elements that allow for the positioning of
 the hidden form field's element.



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



RE: [ANN] JumpStart 4.3 released - for T5.1.0.5

2009-07-16 Thread Blower, Andy
Not sure TBH as I'm at work.

 -Original Message-
 From: Geoff Callender [mailto:geoff.callender.jumpst...@gmail.com]
 Sent: 16 July 2009 15:38
 To: Tapestry users
 Subject: Re: [ANN] JumpStart 4.3 released - for T5.1.0.5
 
 Hi Andy,
 
 That's the second report I've received of that but I can't replicate
 the problem. Are you going through a proxy?
 
 Regards,
 
 Geoff
 
 
 On 17/07/2009, at 12:29 AM, Blower, Andy wrote:
 
  Thanks for the update Geoff, I love jumpstart.
 
  Just tried the ajaxformlooptailored page and clicked add a row and
  got the blackbird error console showing:
 
  # Communication with the server failed: The rendered content did not
  include any elements that allow for the positioning of the hidden
  form field's element.
  # Ajax failure: Status 500 for /jumpstart/examples/tables/
  ajaxformlooptailored1
  .ajaxformloop
  .rowinjector:inject;jsessionid=3BB5CE5E0D166AC91A4561295B8F5151?
  t:formcomponentid=examples/tables/
  AjaxFormLoopTailored1:personseditt:formid=personsedit: The rendered
  content did not include any elements that allow for the positioning
  of the hidden form field's element.
 
  Just thought I'd let you know.
 
  Andy
 
  -Original Message-
  From: Geoff Callender [mailto:geoff.callender.jumpst...@gmail.com]
  Sent: 16 July 2009 06:59
  To: Tapestry users
  Subject: [ANN] JumpStart 4.3 released - for T5.1.0.5
 
  Hi all,
 
  JumpStart 4.3 is now available.   It's built on the latest stable
  release of Tapestry: 5.1.0.5.
 
  All the instructions on the site have been reworked, especially
 those
  for installation and using other servers: Tomcat, Glassfish, and
  JBoss. If you use them and find that a step is missing or something
  could be made clearer then please let me know so I can do something
  about it!
 
  Use it live:
 
  http://jumpstart.doublenegative.com.au:8080/jumpstart/
 
  or download it:
 
  http://jumpstart.doublenegative.com.au
 
  I hope you find it useful.
 
  Cheers,
 
  Geoff
 
 
 
  -
  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



Tapestry script combination flaws

2009-07-09 Thread Blower, Andy
I've created a JIRA issue for what I think are flaws in T5's script 
combination. I'm very interested in what other think about the issue, so please 
take a look and make any comments you have.

Thanks,

Andy.


RE: Tapestry script combination flaws

2009-07-09 Thread Blower, Andy
Yes, oops. It would be helpful wouldn't it: 
https://issues.apache.org/jira/browse/TAP5-769

Thanks Peter.

 -Original Message-
 From: Peter Stavrinides [mailto:p.stavrini...@albourne.com]
 Sent: 09 July 2009 12:47
 To: Tapestry users
 Subject: Re: Tapestry script combination flaws
 
 And the link?
 
 - Original Message -
 From: Andy Blower andy.blo...@proquest.co.uk
 To: Tapestry users users@tapestry.apache.org
 Sent: Thursday, 9 July, 2009 14:44:16 GMT +02:00 Athens, Beirut,
 Bucharest, Istanbul
 Subject: Tapestry script combination flaws
 
 I've created a JIRA issue for what I think are flaws in T5's script
 combination. I'm very interested in what other think about the issue,
 so please take a look and make any comments you have.
 
 Thanks,
 
 Andy.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 



RE: Need help with tricky T5 URL / onPassivate problem

2009-07-06 Thread Blower, Andy
That is an option that we considered, although the requirement is that they'll 
always work so we'd be storing a lot of information that will never get used. I 
take it that there's no way of doing what I want in onPassivate at the moment 
then? Looking at Tapestry code I couldn't see anything, but it's good to have 
confirmation.

 -Original Message-
 From: Howard Lewis Ship [mailto:hls...@gmail.com]
 Sent: 05 July 2009 17:33
 To: Tapestry users
 Subject: Re: Need help with tricky T5 URL / onPassivate problem
 
 How many query objects will there be?  You could store them in the
 database
 and just encode a primary key into the URL.  Add a little bit to ensure
 people can't use other's queries, and that they get janitored if not
 used
 over some space of time, and you're in business.
 
 On Sun, Jul 5, 2009 at 5:52 AM, Blower, Andy
 andy.blo...@proquest.co.ukwrote:
 
  I've been investigating and optimising performance of a search
 results page
  in our T5 app. The page needs to have a bookmarkable URL which will
 work
  without requiring any session information, so it can be used long
 after the
  session has expired. This necessitates putting the user's query in
 the URL
  which is then encoded and ends up as a very long string that becomes
 part of
  all results page URLs. If the session is present then it's ignored,
 and it's
  entirely optional - the page works fine with the query part of the
 URL
  removed, as long as the session is present and the query  results
 don't
  need re-generating.
 
  The downside to this is that every URL for this page has this large
 query
  object encoded into it, which is not a problem for render URLs since
 that
  will end up in the browsers location bar and potentially get
 bookmarked by
  the users, so we want this optional large query object to be present.
 On the
  other hand, event URLs also have this large query object as part of
 them,
  even though it is completely unnecessary (if the user clicks on a
 link when
  the session has timed out they will get a session ended page) and is
 never
  used. This has been manageable while there were not many event links
 on the
  page, but over time they have increased and now event links on the
 results
  page are weighing in at over a megabyte!
 
  What I want to do is only return the optional large query object when
  passivating for render URLs and not for event link URLs, but I can't
 figure
  out a way of doing this without hacking at T5 internals or making a
 special
  case for generation of links to this page. (I'd rather not do either)
 
  So, am I missing something, is there a way of doing this in
 onPassivate()
  that anyone can think of?
 
  Does anyone else think that this is a feature worth having in
 Tapestry, so
  that external URLs can have extra bits that internal (event) URLs
 don't
  need?
 
  Thanks,
 
  Andy.
 
 
 
 
 --
 Howard M. Lewis Ship
 
 Creator of Apache Tapestry
 Director of Open Source Technology at Formos


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



Need help with tricky T5 URL / onPassivate problem

2009-07-05 Thread Blower, Andy
I've been investigating and optimising performance of a search results page in 
our T5 app. The page needs to have a bookmarkable URL which will work without 
requiring any session information, so it can be used long after the session has 
expired. This necessitates putting the user's query in the URL which is then 
encoded and ends up as a very long string that becomes part of all results page 
URLs. If the session is present then it's ignored, and it's entirely optional - 
the page works fine with the query part of the URL removed, as long as the 
session is present and the query  results don't need re-generating.

The downside to this is that every URL for this page has this large query 
object encoded into it, which is not a problem for render URLs since that will 
end up in the browsers location bar and potentially get bookmarked by the 
users, so we want this optional large query object to be present. On the other 
hand, event URLs also have this large query object as part of them, even though 
it is completely unnecessary (if the user clicks on a link when the session has 
timed out they will get a session ended page) and is never used. This has been 
manageable while there were not many event links on the page, but over time 
they have increased and now event links on the results page are weighing in at 
over a megabyte!

What I want to do is only return the optional large query object when 
passivating for render URLs and not for event link URLs, but I can't figure out 
a way of doing this without hacking at T5 internals or making a special case 
for generation of links to this page. (I'd rather not do either)

So, am I missing something, is there a way of doing this in onPassivate() that 
anyone can think of?

Does anyone else think that this is a feature worth having in Tapestry, so that 
external URLs can have extra bits that internal (event) URLs don't need?

Thanks,

Andy.


RE: COMBINE_SCRIPTS no effect

2009-07-01 Thread Blower, Andy
We've also been having some problems with script combination, one of which is 
caused by T5 switching off combination when an external script is requested. I 
don't know if this is causing your problems, but that's why some pages of our 
app were not having the scripts combined.

I don't see why T5 can't combine all of the local scripts and just exclude the 
external ones and have them included separately, and I'll be raising a JIRA 
issue to this effect unless I can find an existing one.

Andy.

 -Original Message-
 From: Moritz Gmelin [mailto:moritz.gme...@gmx.de]
 Sent: 30 June 2009 20:36
 To: Tapestry users
 Subject: Re: COMBINE_SCRIPTS no effect
 
 Well, then it seems that there is something wrong.
 
 As I said on some pages of the application I can see a header like
 this (correct)
 
 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 http://www.w3.org/TR/html4/loose.dtd
 html xmlns=http://www.w3.org/1999/xhtml;headtitleAvetana
 Patientenakte/titlemeta content=text/html; charset=UTF-8 http-
 equiv=Content-Type/metalink type=text/css rel=stylesheet
 href=/avetanafile/assets/tapestry/5.1.0.5/default.css/linklink
 type=text/css rel=stylesheet href=/avetanafile/assets/blackbird/
 5.1.0.5/blackbird.css/linklink type=text/css rel=stylesheet
 href=/avetanafile/assets/classpath/ded21e67620ae96/assets/css/
 patientenakte.css/linklink type=text/css rel=stylesheet
 href=/avetanafile/assets/classpath/ded21e67620ae96/assets/css/
 startpage.css/linklink href=/avetanafile/assets/classpath/
 ded21e67620ae96/assets/default/default.ico rel=shortcut icon/
 linklink href=/avetanafile/assets/classpath/ded21e67620ae96/apple-
 touch-icon.png rel=apple-touch-icon/linkmeta content=Apache
 Tapestry Framework (version 5.1.0.5) name=generator/metascript
 src=/avetanafile/assets/virtual/
 H4sIAIXPQQrCMBCF4XGhC88hIoJJXfQ8Mk2nUq0k5E0X9UxerXcoERJwU7c
 $002fHw$002feZ6btm2izJ6IdnS0DorBwsQ
 $
 002fKbhz8CFubq6lMbUP06nUKYh4gs25
 $
 002favKndS9dJ06
 $002f8pClchBonArKIaljVs3A7tn0sS2slOSqv2uXlwB8F9za9GwBLeal3hMBAAA
 $003d.js type=text/javascript/script/head
 
 For other the header is like this (seperate js includes for every
 script)
 
 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 http://www.w3.org/TR/html4/loose.dtd
 html xmlns=http://www.w3.org/1999/xhtml;headtitleDoe, John/
 titlemeta content=text/html; charset=UTF-8 http-equiv=Content-
 Type/metalink type=text/css rel=stylesheet href=/avetanafile/
 assets/tapestry/5.1.0.5/default.css/linklink type=text/css
 rel=stylesheet href=/avetanafile/assets/blackbird/5.1.0.5/
 blackbird.css/linklink type=text/css rel=stylesheet href=/
 avetanafile/assets/classpath/ded21e67620ae96/assets/css/
 patientenakte.css/linklink type=text/css rel=stylesheet
 href=/avetanafile/assets/classpath/ded21e67620ae96/avetana.css/link
 
 link href=/avetanafile/assets/classpath/ded21e67620ae96/avetana.ico
 rel=shortcut icon/linkmeta content=Apache Tapestry Framework
 (version 5.1.0.5) name=generator/metascript src=/avetanafile/
 assets/scriptaculous/5.1.0.5/prototype.js type=text/javascript/
 scriptscript src=/avetanafile/assets/scriptaculous/5.1.0.5/
 scriptaculous.js type=text/javascript/scriptscript src=/
 avetanafile/assets/scriptaculous/5.1.0.5/effects.js type=text/
 javascript/scriptscript src=/avetanafile/assets/tapestry/5.1.0.5/
 tapestry.js type=text/javascript/scriptscript src=/avetanafile/
 assets/blackbird/5.1.0.5/blackbird.js type=text/javascript/
 scriptscript src=/avetanafile/assets/tapestry/5.1.0.5/tapestry-
 messages_de.js type=text/javascript/scriptscript src=/
 avetanafile/assets/classpath/ded21e67620ae96/assets/js/
 InPlacePrompt.js type=text/javascript/scriptscript src=/
 avetanafile/assets/app/ded21e67620ae96/components/navigation/js/
 popupwindow.js type=text/javascript/scriptscript src=/
 avetanafile/assets/classpath/ded21e67620ae96/assets/js/gridselect.js
 type=text/javascript/scriptscript src=/avetanafile/dwr/
 interface/DWRUpdater.js type=text/javascript/scriptscript src=/
 avetanafile/assets/classpath/ded21e67620ae96/org/directwebremoting/
 util.js type=text/javascript/scriptscript src=/avetanafile/
 assets/classpath/ded21e67620ae96/org/directwebremoting/engine.js
 type=text/javascript/scriptscript src=/avetanafile/assets/
 classpath/ded21e67620ae96/org/directwebremoting/webwork/
 DWRActionUtil.js type=text/javascript/scriptscript src=/
 avetanafile/assets/classpath/ded21e67620ae96/assets/js/
 DWRUpdaterHelper.js type=text/javascript/script/head
 
 
 Am 30.06.2009 um 16:33 schrieb Howard Lewis Ship:
 
  @IncludeJavaScriptLibrary uses RenderSupport under the covers; I
  meant when
  your Layout.tml includes script src= elements. Those are not
  recognized
  by Tapestry and are not aggregated.
 
  On Mon, Jun 29, 2009 at 11:43 PM, Moritz Gmelin
  moritz.gme...@gmx.dewrote:
 
  Does it mean that the stuff that is injected into components via
 
  @IncludeJavaScriptLibrary
 
  is not combined?
 
  Does this make sense?
  Also in the pages where no 

RE: [Tapestry Central] Why chose Tapestry?

2009-06-18 Thread Blower, Andy
Well we develop T5 in Eclipse as a Dynamic Web Project using ANT and IVY for 
builds and dependencies. (+SVN for version control) There was a fair amount of 
work to set it up along with the CI server etc, but it works pretty well for us 
and everything was new to us. Anyway it is definitely possible.

We considered Maven briefly, but a combination of nightmare stories (2 on 
Howard's blog itself), completely confusing documentation, Howard's intent to 
move T5 away from Maven (what happened to that plan over the last year or so?) 
and impending deadline for project start meant that we dumped Maven for a 
simpler system.

Was that the correct decision? I don't know - Ivy took a while to figure out 
but generally does what it's told and only that and the rest is done using Ant 
scripts. It may have been a bit more work, but at least we understand how it 
works inside out. We do have to get dependencies from public Maven repositories 
(which can be problematic) - we only do this once and put it into a 
company-wide shared Ivy repository.

Seems like Maven is a bit like Marmite... ;-)

 -Original Message-
 From: Ivano Luberti [mailto:lube...@archicoop.it]
 Sent: 18 June 2009 13:47
 To: Tapestry users
 Subject: Re: [Tapestry Central] Why chose Tapestry?
 
 I'm a T4 user that is evaluating if to move to T5.
 If I well understand Norman message, it is not possible to develop with
 T5 using Eclipse3.4 with WTP like with T4?
 
 I work in a small company: we use Eclipse 3.4 with WTP. We use SVN for
 versioning and ANT to generate deployments.
 
 To introduce Maven would be really time consuming and hence exepnsive.
 
 
 
 Norman Franke ha scritto:
  I've been using T4/4.1 for several years and have been quite pleased
  with it. I've been using it with Hibernate, and while not perfect,
  it's worked pretty well. We've found it much faster to embed a web
  browser in our main app and do editing, queries and the like via
  Tapestry than writing native code.
 
  I have a new project to replace our aging billing system. I figured
  this would be a great way to learn T5. So, I'm migrating me, not an
  app. :-)
 
  I was pondering posting this, but this thread sort of pushed me over
  the top. Note that I don't disagree with anything Howard said.
  However, this almost became Why I almost dumped Tapestry entirely.
 
  I'm writing this in order to solicit feedback and maybe help others.
  I've been using Tomcat (now 6.0.20) and Eclipse (now 3.4.2) for quite
  time time, and I'm very productive developing use them (and T4.1) I
  think this is a pretty common development environment.
 
  To get started in T5 for a fresh new app, my first thought was to
  follow the tutorial at
 http://tapestry.apache.org/tapestry5.1/tutorial1/.
 
  Chapter 2 just plain didn't work for me. I think part of it is due to
  Maven generally being extremely fragile and working less than half of
  the time. However, even after working around that, you can't just
  import the project into Eclipse. At least not under Eclipse 3.4.2.
 
  No problem, I thought. Maven is annoying anyway. I'll just create a
  Dynamic Web project (like I do for T4.1) and download the T5.1 binary
  distribution. That's even worse. It comes with no README listing
  dependencies or anything useful, and includes tons of libraries that
  don't appear to be even needed. Tapestry failed to start up during
  initialization. Why have a binary distro that doesn't work?
 
  Back to Maven. After some googling, I found this article:
 
 http://tapestry.formos.com/wiki/display/T5IDEINT/Eclipse+(including+Mav
 en) Shouldn't
  this be included in the tutorial? Sadly, the tutorial is extremely
  basic, but at least it works. (And is the only way I've found to
  actually create a new project in Eclipse to date.)
 
  Next, I tried Tapestry Jumpstart. After hours of configuration and
  random errors (using Tomcat), it worked. However, it's so fragile and
  klugy that I just can't see using it in production. I don't care
 about
  OpenEJB. I want just plain T5.1 and Hibernate. Plus running in a
  remote tomcat sessions eliminates many of the developer productivity
  benefits of T5 in the first place. One thing I liked about T4 was
 that
  I could deploy a WAR to a stock Tomcat install, and it would just
  work. That won't happen with Jumpstart. Plus. it if takes 3 hours to
  just get a working developer environment, why even bother?
 
  Next up, AppFuse. It's only T4, but there is a Tapestry 5 add-on.
  Sadly, AppFuse's T4 support is now broken due to a dependancy on
  tapestry-flash that appears to be missing and following the
  instructions on the AppFuse Tapestry 5 page doesn't work anymore
  either, resulting in tons of missing resources.
 
  So, since T5 doesn't appear to provide much in the way of
  authentication / security (a very basic requirement for almost all
  webapps), I started down the tapestry5-acegi approach. Of course,
 that
  doesn't work with T5.1. I managed to get 

RE: Switch from Prototype to jQuery?

2009-06-12 Thread Blower, Andy
That sounds fine, I would be more bothered if it was to take up a massive 
amount of Howards' time meaning that he had less time to push Tapestry forward 
in other areas.

Look forward to seeing what you come up with and I hope you enjoy the challenge!

 -Original Message-
 From: Onno Scheffers [mailto:o...@piraya.nl]
 Sent: 12 June 2009 10:15
 To: Tapestry users
 Subject: Re: Switch from Prototype to jQuery?
 
 On Thu, Jun 11, 2009 at 11:37 PM, Blower, Andy
 andy.blo...@proquest.co.ukwrote:
 
  I'd just like to echo everything Robert said in this message.
 
 
 Hi Andy,
 
 don't worry. I've read Roberts message and his concerns are valid. I'm
 aware
 this whole thing won't be easy but it's not impossible.
 Besides, if we keep ignoring the issue entirely, nothing happens. I can
 at
 least try and see what I can come up with. Whether it works or not or
 whether it ever ends up in the Tapestry production release doesn't
 really
 matter to me. It's an interesting project to dive into in my spare time
 :o)
 
 
 regards,
 
 Onno


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



RE: best book for T5

2009-06-12 Thread Blower, Andy
I can't believe that there wouldn't be an even bigger market for a well written 
T5 book in English, so I hope to see it soon!

Love that cover, awesome.

 -Original Message-
 From: Igor Drobiazko [mailto:igor.drobia...@gmail.com]
 Sent: 12 June 2009 07:41
 To: Tapestry users
 Subject: Re: best book for T5
 
 Well, the only one book about t5 is
 http://www.amazon.com/Tapestry-Applications-step-step-developer-
 friendly/dp/1847193072/ref=sr_1_1?ie=UTF8s=booksqid=1244788318sr=8-1
 
 But this one is out dated-and covers a very early beta version of
 Tapestry
 5.
 
 Right now I'm writing a new one which covers 5.1.0.5 but the book is
 written
 in German:
 http://www.amazon.de/Tapestry-Die-Entwicklung-Webanwendungen-
 Leichtigkeit/dp/3827328446/ref=sr_1_3?ie=UTF8s=booksqid=1244788645sr
 =8-3
 
 Who knows, maybe my publisher will translate it in English if there
 will be
 a market.
 
 
 On Fri, Jun 12, 2009 at 5:20 AM, haipeng du haipen...@gmail.com
 wrote:
 
  What is the best book for T5. Tutorial from t5 website is too simple.
  Thanks.
 
  --
  Haipeng Du
  Salt Lake City
 
 
 
 
 --
 Best regards,
 
 Igor Drobiazko


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



RE: best book for T5

2009-06-12 Thread Blower, Andy
I meant Igor's book translated to English Thiago... there must be a bigger 
market for an English version IMO, so his publishers would be crazy not to do 
one surely, and I hope to see it soon. :-D

Not that I wouldn't welcome another of course.

 -Original Message-
 From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com]
 Sent: 12 June 2009 21:00
 To: Tapestry users
 Subject: Re: best book for T5
 
 Em Fri, 12 Jun 2009 16:52:46 -0300, Blower, Andy
 andy.blo...@proquest.co.uk escreveu:
 
  I can't believe that there wouldn't be an even bigger market for a
 well
  written T5 book in English, so I hope to see it soon!
 
 I would love to be a co-author in a Tapestry 5 book, but I don't have
 the
 resources nor I want to do this alone.
 
  Love that cover, awesome.
 
 One of the most beautiful ones I've seen in a technical book. :)
 
 --
 Thiago H. de Paula Figueiredo
 Independent Java consultant, developer, and instructor
 http://www.arsmachina.com.br/thiago
 
 -
 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



T5 enhancement: Redirecting from ComponentEventLinkEncoder.decodePageRenderRequest()

2009-06-12 Thread Blower, Andy
I recently moved authentication for our project in method advice for the 
ComponentEventLinkEncoder method decodePageRenderRequest() because some other 
method advice to the same method has some modified URL processing and it saves 
duplicating it in an authentication dispatcher. In some situations this method 
advice needs to redirect to a single sign on server rather than render a page, 
so I have had to override the standard T5 PageRenderDispatcher to allow this.

Does anyone else think this is more generally useful and might be a good 
enhancement to the standard T5 PageRenderDispatcher? Or is this a very specific 
edge case? I'm tempted to raise a JIRA issue, but thought I'd test the water 
first.


The code uses an extension of EmptyEventContext called RedirectEventContext to 
indicate a redirect should take place (bit of hack to avoid API change) and 
looks like this:

public boolean dispatch(Request request, Response response) throws IOException
{
PageRenderRequestParameters parameters = 
linkEncoder.decodePageRenderRequest(request);

if (parameters == null)  return false;

if (parameters.getActivationContext() instanceof 
RedirectEventContext)   // New block
{

response.sendRedirect(parameters.getLogicalPageName());
return true;
}

componentRequestHandler.handlePageRender(parameters);

return true;
}


RE: Switch from Prototype to jQuery?

2009-06-11 Thread Blower, Andy
I'd just like to echo everything Robert said in this message.
 
 -Original Message-
 From: robert zeigler [mailto:robert.zeig...@gmail.com] On Behalf Of
 Robert Zeigler
 Sent: 10 June 2009 18:54
 To: Tapestry users
 Subject: Re: Switch from Prototype to jQuery?
 
 I believe it's mentioned in the comments of the previously-referenced
 jira, but, the main reason this issue is trickier than it seems is
 that there are many applications in existence already that are relying
 on:
 1) The fact that tapestry bundles prototype
 2) The fact that tapestry relies on prototype.
 
 A trivial example: T5 defines a set of effects (based on the prototype/
 scriptaculous effects) for animating the introduction of content.
 These are reasonable, but there are cases where they aren't quite
 right (such as a slide transition that is too fast or too slow).
 Currently, the only way to work around that is to monkey-patch
 tapestry's effect object.  But you're now relying on explicit
 knowledge that tapestry is using prototype.  Any and every such
 instance would be broken if we were to rewrite tapestry javascript
 handling to use:
a) a different framework
b) no framework
c) an abstracted API with framework-specific implementations.
 
 Prototype may have been the wrong choice (something which is more
 opinion than fact), but switching js approaches in the middle of the
 game is definitely an idea that needs to be approached with copious
 amounts of caution and consideration.
 
 Robert
 
 On Jun 10, 2009, at 6/1010:49 AM , Onno Scheffers wrote:
 
 
  Maybe it doesn't have to be plain js since there's a lot to be
  gained from
  these libraries. Perhaps all Tapestry's .js files could be moved to
 a
  tapestry-prototype module, each of those files could then be
  reimplemented
  in a tapestry-jquery module.
  A problem remains with script snippets written directly from
  renderSupport.addScript()
  It sounds pretty cumbersome to maintain multiple modules though.
 
 
 
  The main reason for the plain-Javascript solution is indeed that you
  will
  need to support the Javascript files for each and every framework
  you're
  going to support in the future. This will make writing new
  components quite
  a lot of work as well because you will need to write/update the code
  for all
  supported libraries.
  By sticking to plain Javascript, you don't have that problem.
 
  regards,
 
  Onno
 
 
 -
 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: t5: layout

2009-05-13 Thread Blower, Andy
Not according to http://tapestry.apache.org/tapestry5.1/guide/parameters.html, 
Context Bindings. This works for us I think.

 -Original Message-
 From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com]
 Sent: 13 May 2009 14:36
 To: Tapestry users
 Subject: Re: t5: layout
 
 On Wed, May 13, 2009 at 10:05 AM, Angelo Chen
 angelochen...@yahoo.com.hk wrote:
 
  Hi,
 
 Hi!
 
  in 5.1.0.5, I tried this:
  context:layout/images/img20.gif
 
 Shouldn't it be something like img
 src=${asset:context:layout/images/img20.gif}/?
 
 --
 Thiago
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 



RE: t5: layout

2009-05-13 Thread Blower, Andy
I kind of assumed the ${} bit, guess we should wait for Angelo to chime in 
again now...

 -Original Message-
 From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com]
 Sent: 13 May 2009 16:10
 To: Tapestry users
 Subject: Re: t5: layout
 
 On Wed, May 13, 2009 at 12:01 PM, Blower, Andy
 andy.blo...@proquest.co.uk wrote:
  Not according to
 http://tapestry.apache.org/tapestry5.1/guide/parameters.html, Context
 Bindings. This works for us I think.
 
 You're right: you can now use context without using asset. I hadn't
 tested it before I answered that question. Nice feature. :)
 But Angelo's still doing something wrong. Maybe is the lack of ${}
 around context:xxx.jpg or not using the img tag, as the context
 binding throws an exception when the asset is not found.
 
 --
 Thiago
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 



Composite form components

2009-05-12 Thread Blower, Andy
When creating sub-form components I find that a common case is composing 
several form fields into a single object which is bound as a parameter back to 
the parent.

For example a date component used on several forms that has drop downs for day 
 month, and a text box for year. The parameter bound to the parent page is 
simply a date (a Date object or a String form - doesn't matter) which is 
composed from the three separate form elements. The only way I know of to 
support this is to used the setter for the last form element's property to set 
the bound parameter with the composed object. (this is the technique used in 
the T5 book)

This works okay, but I've never been very happy with it and recently it meant 
that I had to copy a component class to extend it because of using this 
technique. This is because the properties are private (T5 requires this) and 
the setter for one has a side effect that causes problems. This got me to 
thinking (again) if there was an alternative technique for achieving this, and 
if there wasn't then how could it potentially be done.

So, does anyone currently have a better way than the one I've described?

I was thinking that this could potentially be achieved by another component 
event as part of the form submission. Each component within the form (not just 
the parent of the form) would need an event firing after the properties have 
all been set from the submission, and before validation, where they could 
update bound parameters with composed objects from the form properties. Is this 
at all possible to achieve?

Thanks,

Andy.


RE: Apache Tapestry on Google Maps

2009-05-11 Thread Blower, Andy
Looks like you must live on a boat of some sort Howard... the map places you in 
the middle of the Hecate Strait. ;-)

 -Original Message-
 From: Howard Lewis Ship [mailto:hls...@comcast.net]
 Sent: 09 May 2009 01:11
 To: users@tapestry.apache.org
 Subject: Apache Tapestry on Google Maps
 
 've shared a map with you called Apache Tapestry Users:
 You can view and edit this map at
 http://maps.google.com/maps/ms?source=s_qhl=engeocode=ie=UTF8oe=UTF
 8msa=0msid=106662057515738259524.0004696f8216ba268b74a
 
 Note: To edit this map, you'll need to sign into Google with this
 email address. To use a different email address, just reply to this
 message and ask me to invite your other one.  If you don't have a
 Google account, you can create one at
 http://www.google.com/accounts/newaccount?reqemail=hls...@comcast.net.
 
 Simply log into Google Maps and click the Edit button; you can then
 add a marker for your (approximate) location and your name. Add a few
 details if you like.
 
 It'll be fun to see just exactly who is using Tapestry and where!
 
 --
 Howard Lewis Ship
 Creator: Apache Tapestry and Apache HiveMind



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



RE: T5: What is NOT beautiful about Tapestry?

2009-04-30 Thread Blower, Andy
I think you hit the nail on the head Carl. The documentation is okay generally 
(some bits poor, some very good) but there is not enough to tie it all together 
and guide new developers so they know what they can do with T5. I'm not 
convinced that the main documentation should attempt this on its own, or 
whether it should strive to be a great reference with some more higher level 
introductory/discovery bits along with a good published book to handle 
introducing everything and tying it together. Having the only published book 
for T5 being so out of date is a huge problem for the framework in my opinion.

I don't think a wiki is the answer to this, I really like knowing that the 
documentation that I'm looking at is for a specific version of Tapestry and is 
updated when the code is - I would not want to lose that.

Andy.

 -Original Message-
 From: Carl Crowder [mailto:carl.crow...@taptu.com]
 Sent: 29 April 2009 22:04
 To: Tapestry users
 Subject: Re: T5: What is NOT beautiful about Tapestry?
 
 Discovery of it's parts. Franky the documentation is lacking and even
 with reading the mailing list, reading the howtos wiki, buying the
 Tapestry 5 book and working with it for over a year I still come across
 things I never knew existed that would have solved a problem I've had.
 I
 often spend ages writing something myself after searching for a
 solution.
 
 What's beautiful about Tapestry? That almost every problem has a simple
 solution built in. What's not beautiful about Tapestry? That I
 generally
 find these solutions by accident, and way after I've written my own!
 
 Lots of things are obvious and easy to understand once you know what
 they are but it's learning what they are that is the problem. I've been
 waxing lyrical about Tapestry where I work and while the developers who
 tried it love it, their main gripe is always that it's difficult to
 understand what it can do.
 
 The cookbook is the right idea but it's only got 5 entries right now.
 It
 needs to be way more comprehensive
 
 Inge Solvoll wrote:
  Hi!
 
  I have been reading the beautiful thread and added my opinion about
 what's
  great about Tapestry. It's nice to sum up why we all are so excited
 about
  this, it obviously makes both us and the creator(s) feel good about
  ourselves. But for a little while, I challenge us all to stop tapping
 each
  others' backs and go into depth about what's not to like about our
 beloved
  framework.
 
  The most obvious questions that could be asked probably have some
 very
  obvious answers. But T5, as I see it, is all about addressing stuff
 that
  other frameworks have given up on and create excellent
 implementations
  rather than just looking the other way. Difficult and uncomfortable
  questions should be addressed the same way.
 
  So:
 
  What are the main reasons that T5 isn't one of the big ones, when
 we all
  seem to agree that it is so much better than most other frameworks
 out
  there? Why is T5 NOT beautiful?
 
  Hope I'm not insulting anyone, I'm a big fan too, I just think this
 actually
  could lead to significant insight :)
 
  Regards
 
  Inge
 
 
 -
 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: Tapestry5 future compatiblity?

2009-04-30 Thread Blower, Andy
 I am still deciding whether to choose Tapestry5 for my upcoming
 project. I
 was reading a lot how each version of Tapestry isn't backward
 compatible
 with older version and how migrating the code to new Tapestry is a
 nightmare. I like Tapestry declaractive model but my priority in
 choosing a
 framework is the ease of migrating to the newer version.

I recently migrated our application from 5.0 to 5.1 and it was mostly seamless. 
The issues were mostly bugs, which considering I was migrating to a pre-release 
version of 5.1 that's to be expected. It was worth it for the new stuff to us, 
and it also helped get 5.1 GA ready. (very close now I think) This app has had 
9 developers working for a year so there's a lot there to migrate. 
 
 So is there any information on regards to whether Tapestry 6 being
 rehauled
 again ? Is this the right time to step into Tapestry or should i wait
 till
 near GA release?

Tapestry 6 is not planned by Howard at all and I don't ever see the need for 
it. I would get the latest beta of T5.1 and jump right in. It's in a pretty 
solid state now.

Cheers,

Andy.


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



RE: T5.1 Property Expressions

2009-04-27 Thread Blower, Andy
Congratulations, you have raised the JIRA Issue of the Beast as a duplicate 
of Tap5-663 which I entered last week. ;-)

Well that's an easy way round the 666 superstition, just mark as a dup and 
close...

 -Original Message-
 From: Howard Lewis Ship [mailto:hls...@gmail.com]
 Sent: 27 April 2009 17:29
 To: Tapestry users
 Subject: Re: T5.1 Property Expressions
 
 Congratulations, you have The JIRA Issue Of The Beast:
 
 https://issues.apache.org/jira/browse/TAP5-666
 
 
 On Thu, Apr 23, 2009 at 10:37 AM, Andy Blower
 andy.blo...@proquest.co.uk wrote:
 
  I just tried out the new T5.1 property expressions for the first time
 and got
  an error. I'm trying to replace this:
 
  ${linkTitle}
 
  public String getLinkTitle() {
         return getTitle(false);
  }
 
  With this:
 
  ${getTitle(false)}
 
 
  Which I should be able to do according to the Grammar as far as I can
 see,
  since but I get this error when I try it:
 
  Caused by:
  org.apache.tapestry5.internal.services.PropertyExpressionException:
 Node
  false (within expression 'getTitle(false)') was type FALSE, but was
 expected
  to be (one of) DECIMAL, DEREF, IDENTIFIER, INTEGER, INVOKE, LIST,
 SAFEDEREF,
  STRING.
         at
 
 org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$Proper
 tyConduitBuilder.unexpectedNodeType(PropertyConduitSourceImpl.java:925)
         at
 
 org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$Proper
 tyConduitBuilder.subexpression(PropertyConduitSourceImpl.java:637)
         at
 
 org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$Proper
 tyConduitBuilder.createMethodInvocation(PropertyConduitSourceImpl.java:
 756)
         at
 
 org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$Proper
 tyConduitBuilder.createMethodInvocation(PropertyConduitSourceImpl.java:
 730)
         at
 
 org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$Proper
 tyConduitBuilder.createGetter(PropertyConduitSourceImpl.java:711)
         at
 
 org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$Proper
 tyConduitBuilder.createGetterAndSetter(PropertyConduitSourceImpl.java:4
 36)
         at
 
 org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$Proper
 tyConduitBuilder.createAccessors(PropertyConduitSourceImpl.java:419)
         at
 
 org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$Proper
 tyConduitBuilder.createInstance(PropertyConduitSourceImpl.java:272)
         at
 
 org.apache.tapestry5.internal.services.PropertyConduitSourceImpl.build(
 PropertyConduitSourceImpl.java:1206)
         at
 
 org.apache.tapestry5.internal.services.PropertyConduitSourceImpl.create
 (PropertyConduitSourceImpl.java:1081)
         at
 
 $PropertyConduitSource_120d3f0182d.create($PropertyConduitSource_120d3f
 0182d.java)
         at
 
 org.apache.tapestry5.internal.bindings.PropBindingFactory.newBinding(Pr
 opBindingFactory.java:49)
         at
 $BindingFactory_120d3f0182e.newBinding($BindingFactory_120d3f0182e.java
 )
         at
 $BindingFactory_120d3f01826.newBinding($BindingFactory_120d3f01826.java
 )
         at
 
 org.apache.tapestry5.internal.services.BindingSourceImpl.newBinding(Bin
 dingSourceImpl.java:81)
         ... 107 more
 
 
  --
  View this message in context: http://www.nabble.com/T5.1-Property-
 Expressions-tp23197478p23197478.html
  Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: users-h...@tapestry.apache.org
 
 
 
 
 
 --
 Howard M. Lewis Ship
 
 Creator of Apache Tapestry
 Director of Open Source Technology at Formos
 
 -
 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: [T5.1.0.2] / [T5.1.0.3] BlackBird Info Logging

2009-04-24 Thread Blower, Andy
  Hiya,
 
  The Tapestry js object has debug, warn and error logging methods to
  BlackBird but no info logging. Is this due to design because the
  logging methods are only supposed to be used by Tapestry internal
  components (and hence not yet required)? Or maybe an wee oversight?
 
  Personally, I'm excited at the idea of having BlackBird bundled with
  T5 and would love to utilise it fully.
 
 Add an issue to JIRA, or monkey-patch tapestry.js directly.
 
 
  On a related note, when I send messages to BlackBird via the js
  Tapestry.debug() method it seems to pop up the BlackBird console
  window regardless of  whether I'm in productionMode or not. Is this
  the desired behaviour? Or again, am I not supposed to use the
 Tapestry
  js logging methods myself?
 
 Any time a message, of any category, is added, Blackbird will popup (by
 design).
 

This surprises me, I also assumed that (since it's a development/debugging 
tool) the console would be disabled in production mode. I'd be very interested 
to hear other people's opinion on this.


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



Fix for TAP5-624, Support for javascript callbacks on zone update

2009-04-24 Thread Blower, Andy
Having just updated our app to use T5.1.0.4, I checked out the changes made for 
TAP5-624 to support javascript callbacks on a zone update. I'm a bit surprised 
at the solution for this which is to fire a client side event. I thought that 
it would have used the JSON object returned for partial page renders which 
already has a script: element, allowing addScript() or something similar to be 
used.

Is there a reason that this isn't possible or isn't a good idea? It seemed an 
obvious thing to me since the facility is already there but just needs exposing 
to users.


RE: Parameter publishing and informal parameters

2009-04-22 Thread Blower, Andy
Thanks Howard, that works perfectly. (and I obviously need an eye test..)

 -Original Message-
 From: Howard Lewis Ship [mailto:hls...@gmail.com]
 Sent: 21 April 2009 17:00
 To: Tapestry users
 Subject: Re: Parameter publishing and informal parameters
 
 The @Component.inheritInformalParameter annotation attribute allows
 all informal parameters of an outer component to be connected to a
 contained component.
 
 On Tue, Apr 21, 2009 at 3:48 AM, Blower, Andy
 andy.blo...@proquest.co.uk wrote:
  I've just been simplifying one of our components using parameter
 publishing, and I just realised that informal parameters are not passed
 to the inner component (loop) to render on the element which is passed
 okay. (although we're not using inherit: or publishParameters for
 element, as it didn't seem to work correctly)
 
  Does anyone know of a way of passing informal parameters, or is this
 an instance where we should have used inheritance instead of
 composition?
 
 
 
 
 --
 Howard M. Lewis Ship
 
 Creator of Apache Tapestry
 Director of Open Source Technology at Formos
 
 -
 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



Parameter publishing and informal parameters

2009-04-21 Thread Blower, Andy
I've just been simplifying one of our components using parameter publishing, 
and I just realised that informal parameters are not passed to the inner 
component (loop) to render on the element which is passed okay. (although we're 
not using inherit: or publishParameters for element, as it didn't seem to work 
correctly)

Does anyone know of a way of passing informal parameters, or is this an 
instance where we should have used inheritance instead of composition?


RE: T5.1.0.2 problem with TestableRequestImpl

2009-04-14 Thread Blower, Andy
I have now filed a JIRA issue (https://issues.apache.org/jira/browse/TAP5-643) 
- it seems that PageTester is using the application module defined in web.xml 
which is causing issues for me because of some dispatchers which will not work 
without external servers or the real request/response (inc. cookies) stuff.

We use PageTester to unit test the rendering of pages  components - trying to 
be dependent on as little else as possible. Please vote if this is affecting 
you too.

 -Original Message-
 From: Blower, Andy [mailto:andy.blo...@proquest.co.uk]
 Sent: 03 April 2009 10:36
 To: 'Tapestry users'
 Subject: RE: T5.1.0.2 problem with TestableRequestImpl
 
 Thanks Massimo, I'll probably file a Jira issue about this then. Weird
 thing is I don't think all my tests that use PageTester are failing. I
 need to investigate it, but so far I've spent a week (@50%) on moving
 from 5.1.18 to 5.1.0.2 and I still don't have things working quite
 right so I don't know how much time I'll be able to dedicate to this.
 
  -Original Message-
  From: Massimo Lusetti [mailto:mluse...@gmail.com]
  Sent: 03 April 2009 10:27
  To: Tapestry users
  Subject: Re: T5.1.0.2 problem with TestableRequestImpl
 
  On Tue, Mar 31, 2009 at 3:28 PM, Blower, Andy
  andy.blo...@proquest.co.uk wrote:
 
   I'm in the process of migrating from T5.0.18 to T5.1 and I'm using
  the T5.1.0.2 release currently being voted on. I've fixed all the
  compilation errors and disabled enough of our custom stuff to get
 pages
  rendering, although most of our javascript seems to be broken (I'll
 be
  looking into this issue next), but I have a lot of unit tests
 failing.
  Basically all of the tests using org.apache.tapestry5.test.PageTester
  to do a test render are failing with the stacktrace appended to the
  bottom of this email. This appears to be caused by the new method
  that's been added to the Request interface but not implemented in
  TestableRequestImpl. (well technically it is, but all it does is
 throw
  a RuntimeException)
  
   So, has anyone else encountered this issue? Why aren't any of the
  Tapestry tests affected? What's the best way to fix this?
 
  I too encountered this problem but i neglected to write about it
 cause
  i was already migrating to using Selenium based tests but i should
  have.
 
  If anyone would look there are example in the chenillekit-access
  module which should fire the problem.
 
  --
  Massimo
  http://meridio.blogspot.com
 
  -
  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: [t5.1.0.2] Migration problem as LinkFactory is no longer present

2009-04-09 Thread Blower, Andy
If you want to do the equivalent in 5.1 then you'll need to extend 
ComponentEventLinkEncoderImpl and override any methods you want to change. 
Alternatively (since the decoding is now in here rather than in the Dispatcher) 
you can use service advice which is what I did. Check out the recent thread I 
started called T5.1 URL Rewriting, you might even find that URL Rewriting 
will do what you need.

If you do go the advice route, then you'll need something like this the code 
below in your module. This add advice to the createPageRenderLink()  
decodePageRenderRequest() methods handled by the 
MethodAdviceCreatePageRenderLink  MethodAdviceDecodePageRenderRequest method 
advice classes I wrote. The biggest thing to note is the * at the beginning of 
the Match annotation - without this it wouldn't work, but I have no idea why. 
If anyone can tell me why I need the * I'd be very interested.

Cheers,

Andy.

@Match(*ComponentEventLinkEncoder)
public static void advisePQSiteHandling(
ComponentClassResolver componentClassResolver, 
ContextPathEncoder contextPathEncoder, 
Response response, 
MethodAdviceReceiver receiver) throws Exception
{
   Method createPageRenderLinkMethod = 
ComponentEventLinkEncoder.class.getMethod(createPageRenderLink, 
PageRenderRequestParameters.class);
   receiver.adviseMethod(createPageRenderLinkMethod, new 
MethodAdviceCreatePageRenderLink(response));

   Method decodePageRenderRequestMethod = 
ComponentEventLinkEncoder.class.getMethod(decodePageRenderRequest, 
Request.class);
   receiver.adviseMethod(decodePageRenderRequestMethod, new 
MethodAdviceDecodePageRenderRequest(componentClassResolver, 
contextPathEncoder));
}


 -Original Message-
 From: Dave Greggory [mailto:davegregg...@yahoo.com]
 Sent: 09 April 2009 19:24
 To: Tapestry users
 Subject: [t5.1.0.2] Migration problem as LinkFactory is no longer
 present
 
 
 We needed to contribute a custom version of LinkFactory to meet a
 business need. I realize that it was internal and was subject to
 change, but now that there is no LinkFactory present in 5.1 I would
 like some help figuring out how to implement the same functionality.
 
 We need to be able to specify custom URLs for Tapestry pages (multiple
 URLs can go to the same Page and sometimes the same URL can go to
 different tapestry Pages). Couldn't really achieve it using activation
 context as the complete url needed to be customizable. So we
 implemented a Dispatcher to handle it, but later on found out that we
 have override the LinkFactory.createPageRenderLink(..) functionality to
 get forms working properly (action url for forms were not rendering as
 the custom url without the LinkFactory).
 
 The change we made to LinkFactory is given below. How do we do the same
 in 5.1?
 
   public Link createPageRenderLink(Page page, boolean override,
 Object... pageActivationContext)
   {
   String logicalPageName = page.getLogicalName();
 
   // When override is true, we use the activation context even if
 empty.
   Object[] context = (override || pageActivationContext.length !=
 0)
  ? pageActivationContext
  :
 contextCollector.collectPageActivationContext(page);
   InvocationTarget target = new PageRenderTarget(logicalPageName);
 
   // --- our change (begin) ---
 ---
   String pageUrl = (String)
 request.getAttribute(OurConstants.PAGE_URL.id());
   if (!StringUtils.isBlank(pageUrl))
   {
 while (pageUrl.startsWith(/))
 {
   pageUrl = pageUrl.substring(1);
 }
 target = new OpaqueConstantTarget(pageUrl);
   }
   // --- our change (end) -
 -
 
   ComponentInvocation invocation = new
 ComponentInvocationImpl(contextPathEncoder, target, null, context,
 false);
   String baseURL = requestSecurityManager.getBaseURL(page);
   Link link = new LinkImpl(response, optimizer, baseURL,
 request.getContextPath(), invocation);
   componentInvocationMap.store(link, invocation);
 
   for (LinkFactoryListener listener : listeners)
   listener.createdPageRenderLink(link);
 
   return link;
   }
 
 
 
 
 -
 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



More migration issues, 5.0.18 - 5.1.0.2

2009-04-08 Thread Blower, Andy
Another day, another couple of stumbling blocks for our applications migration 
to T5.1 - I can't believe this has taken a solid week of effort so far. I'm 
starting to wonder if we jumped the gun on moving to T5.1 so soon? I do seem to 
be having more problems than most people on the list, so maybe it's just me / 
our app or something.

Anyway, the first issue is with our checkbox components that do an Ajax call 
when checked or unchecked. They work fine if Gzip compression is switched off, 
but if it's enabled the Ajax.Request hits the onException block with this error 
message TypeError: response is null. The server event handler is being called 
correctly and returning the correct JSONObject, but the responseText is empty 
and responseXML, responseJSON, and headerJSON are all null even though the 
status code is 200. My guess that the JSONObject is being compressed and it 
shouldn't be. Should I raise a JIRA for this, or am I mistaken here?

I also have a page that works fine with T5.0.18 but breaks in T5.1.0.2 and I 
have no idea why - curiously, if I have gzip compression I don't see the 
stacktrace in the browser, but I get Content Encoding Error, The page you 
are trying to view cannot be shown because it uses an invalid or unsupported 
form of compression. From Firefox.

Here is the stack trace, in case anyone can make any sense of it:

An unexpected application exception has occurred.

 *   java.lang.NullPointerException
*   
org.apache.tapestry5.dom.AbstractMarkupModel.encodeQuoted(AbstractMarkupModel.java:94)
*   org.apache.tapestry5.dom.Attribute.render(Attribute.java:69)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:313)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Document.toMarkup(Document.java:163)
*   org.apache.tapestry5.dom.Node.toMarkup(Node.java:80)
*   
org.apache.tapestry5.internal.services.MarkupWriterImpl.toMarkup(MarkupWriterImpl.java:57)
*   
org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:67)
*   
$PageResponseRenderer_12085541484.renderPageResponse($PageResponseRenderer_12085541484.java)
*   
org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:63)
*   
org.apache.tapestry5.services.TapestryModule$33.handle(TapestryModule.java:1952)
*   
$PageRenderRequestHandler_12085541485.handle($PageRenderRequestHandler_12085541485.java)
*   
$PageRenderRequestHandler_12085541478.handle($PageRenderRequestHandler_12085541478.java)
*   
org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48)
*   
$ComponentRequestHandler_1208554147e.handlePageRender($ComponentRequestHandler_1208554147e.java)
*   
org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45)
*   $Dispatcher_12085541480.dispatch($Dispatcher_12085541480.java)
*   $Dispatcher_12085541472.dispatch($Dispatcher_12085541472.java)
*   

RE: More migration issues, 5.0.18 - 5.1.0.2

2009-04-08 Thread Blower, Andy
Thanks Ulrich, I didn't see that bug when I searched even though it's plainly 
visible to me now. I appreciate the quick response!

I'll add a comment (and a vote) as well as implementing the workaround. Looks 
like Howard can't reproduce it on OSX, but I definitely get this issue in IE6, 
FF3  Chrome2 on windows XP.

 -Original Message-
 From: Ulrich Stärk [mailto:u...@spielviel.de]
 Sent: 08 April 2009 12:30
 To: Tapestry users
 Subject: Re: More migration issues, 5.0.18 - 5.1.0.2
 
 Someone else already stumbled upon this but it's not yet confirmed
 what's causing it. I believe Howard posted a workaround in the issue
 comments. https://issues.apache.org/jira/browse/TAP5-469
 
 Cheers,
 
 Uli
 


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



RE: More migration issues, 5.0.18 - 5.1.0.2

2009-04-08 Thread Blower, Andy
Thanks for this Ville it really helped me investigate this, still took 3 hours 
to track it down. I've raised TAP5-635 for this because it turned out to be 
related, but different - and also IMHO a valid use case. The stacktrace not 
appearing with compression is another issue that needs resolving, but it's 
minor.

 -Original Message-
 From: Ville Virtanen [mailto:ville.virta...@cerion.fi]
 Sent: 08 April 2009 12:33
 To: users@tapestry.apache.org
 Subject: Re: More migration issues, 5.0.18 - 5.1.0.2
 
 
 Hi,
 
 exatly the same problems we were having. I opened Jira issue because of
 this:
 
 https://issues.apache.org/jira/browse/TAP5-623
 
 For us the main reason was because we had
 
 label for=someid /
 
 and then
 
 t:if test=readmode
${value}
t:parameter name=else
   t:textfield t:id=someid value=value /
/t:parameter
 /t:if
 
 Now with T5.0.18 this worked fine, but now dies in 5.1.0.2 if it is
 readmode: (label gets null for parameter) - givin only some T5 internal
 stacktrace or the unsupported form of compression..
 
  Hope this helps,
 
  - Ville
 
 
 
 Andy Blower wrote:
 
  Another day, another couple of stumbling blocks for our applications
  migration to T5.1 - I can't believe this has taken a solid week of
 effort
  so far. I'm starting to wonder if we jumped the gun on moving to T5.1
 so
  soon? I do seem to be having more problems than most people on the
 list,
  so maybe it's just me / our app or something.
 
  Anyway, the first issue is with our checkbox components that do an
 Ajax
  call when checked or unchecked. They work fine if Gzip compression is
  switched off, but if it's enabled the Ajax.Request hits the
 onException
  block with this error message TypeError: response is null. The
 server
  event handler is being called correctly and returning the correct
  JSONObject, but the responseText is empty and responseXML,
 responseJSON,
  and headerJSON are all null even though the status code is 200. My
 guess
  that the JSONObject is being compressed and it shouldn't be. Should I
  raise a JIRA for this, or am I mistaken here?
 
  I also have a page that works fine with T5.0.18 but breaks in
 T5.1.0.2 and
  I have no idea why - curiously, if I have gzip compression I don't
 see the
  stacktrace in the browser, but I get Content Encoding Error, The
 page
  you are trying to view cannot be shown because it uses an invalid or
  unsupported form of compression. From Firefox.
 
  Here is the stack trace, in case anyone can make any sense of it:
 
  An unexpected application exception has occurred.
 
   *   java.lang.NullPointerException
  *
 
 org.apache.tapestry5.dom.AbstractMarkupModel.encodeQuoted(AbstractMarku
 pModel.java:94)
  *   org.apache.tapestry5.dom.Attribute.render(Attribute.java:69)
  *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:313)
  *
  org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
  *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
  *
  org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
  *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
  *
  org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
  *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
  *
  org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
  *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
  *
  org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
  *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
  *
  org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
  *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
  *
  org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
  *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
  *
  org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
  *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
  *
  org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
  *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
  *
  org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
  *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
  *
  org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
  *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
  *
  org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
  *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
  *
  org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
  *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
  *   org.apache.tapestry5.dom.Document.toMarkup(Document.java:163)
  *   org.apache.tapestry5.dom.Node.toMarkup(Node.java:80)
  *
 
 

RE: More migration issues, 5.0.18 - 5.1.0.2

2009-04-08 Thread Blower, Andy
 On Wed, Apr 8, 2009 at 4:21 AM, Blower, Andy
 andy.blo...@proquest.co.uk wrote:
  Another day, another couple of stumbling blocks for our applications
 migration to T5.1 - I can't believe this has taken a solid week of
 effort so far. I'm starting to wonder if we jumped the gun on moving to
 T5.1 so soon? I do seem to be having more problems than most people on
 the list, so maybe it's just me / our app or something.
 
 I'm sorry and surprised you are having so much trouble.

I'm rather surprised too, the 5.0.x migrations (post .10) were always pretty 
easy. I think I must have gotten complacent about Tapestry alpha status because 
T5.0.11+ never really felt like alpha software to me. ;-)  (oh, and some of the 
new features in 5.1 are very appealing which is probably why migrating now was 
so tempting!)
 
  Anyway, the first issue is with our checkbox components that do an
 Ajax call when checked or unchecked. They work fine if Gzip compression
 is switched off, but if it's enabled the Ajax.Request hits the
 onException block with this error message TypeError: response is
 null. The server event handler is being called correctly and returning
 the correct JSONObject, but the responseText is empty and responseXML,
 responseJSON, and headerJSON are all null even though the status code
 is 200. My guess that the JSONObject is being compressed and it
 shouldn't be. Should I raise a JIRA for this, or am I mistaken here?
 
 There's an existing JIRA issue, with a workaround.
 
 https://issues.apache.org/jira/browse/TAP5-469
 
 This only seems to affect some people ... I suspect it may only occur
 when an Apache server is between the browser and the servlet
 container. Can you confirm?

Currently I've only been testing in Jetty on my PC with no apache server in 
sight. The workaround is probably okay until you want to release 5.1 so there's 
some time for gathering more data. I know it sounds unlikely but could it be 
OSX/XP even with the same browsers? I can ask someone to test this on OSX 
tomorrow if that would help.

 
  I also have a page that works fine with T5.0.18 but breaks in
 T5.1.0.2 and I have no idea why - curiously, if I have gzip compression
 I don't see the stacktrace in the browser, but I get Content Encoding
 Error, The page you are trying to view cannot be shown because it
 uses an invalid or unsupported form of compression. From Firefox.
 
  Here is the stack trace, in case anyone can make any sense of it:
 
  An unexpected application exception has occurred.
 
 Someone else has seen this as well.
 
 
 void render(MarkupModel model, StringBuilder builder, MapString,
 String namespaceURIToPrefix)
 {
 builder.append( );
 builder.append(element.toPrefixedName(namespaceURIToPrefix,
 namespace, name));
 builder.append(=);
 builder.append(model.getAttributeQuote());
 model.encodeQuoted(value, builder);  // line 69
 builder.append(model.getAttributeQuote());
 }
 
 I think this I can chase down; something is wrong, the value should
 never be null (it can be the empty string).

Did you see TAP5-635? It demonstrates a pretty bad consequence of this problem 
and it took time to investigate so I hope it proves useful.

I think 636 might be a duplicate.

Thanks,

Andy.


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



RE: T5.1 URL Rewriting

2009-04-07 Thread Blower, Andy
I just want to post an update to this. When I started to do this work I 
realised that I was not going to duplicate much processing from 
ComponentEventLinkEncoderImpl if I used method advice - so that's what I've 
done. This is much nicer way of doing things and came at a much lower 
efficiency hit than I first thought it would.

The URL rewriting code was helpful as an example of creating a new LinkImpl - I 
would not have noticed so quickly that the optimizer was not necessary for the 
new Link because it will already have done its job.

 -Original Message-
 From: Blower, Andy [mailto:andy.blo...@proquest.co.uk]
 Sent: 31 March 2009 17:30
 To: 'Tapestry users'
 Subject: RE: T5.1 URL Rewriting
 
 If you want to stay away from extending the internals then a decorator
 / advisor of the ComponentEventLinkEncoder service would be the best
 route, as Thiago suggested. You will still have a reference to LinkImpl
 which is an internal implementation since you'll need to create a new
 link. I don't want to duplicate all the processing in
 ComponentEventLinkEncoderImpl so I will extend and change it, but it's
 much better than my 5.0 version because it's all in one place and the
 service interface is public this time.
 
  -Original Message-
  From: xfile80303 [mailto:l...@grokers.net]
  Sent: 31 March 2009 17:19
  To: users@tapestry.apache.org
  Subject: RE: T5.1 URL Rewriting
 
 
 
 
  Hey Levi,
 
  That's almost identical to what I need for my application. Sorry I
  missed your post back in Feb, I had a two week holiday mid feb so I
  wasn't following. You did this the same way as me by creating your
 own
  PageRenderDispatcher and LinkFactory. My scenario is possibly a
 little
  more complex because if there's a T5 page at /SITE/page then it uses
  that, if not and SITE is recognised as a configured site then it's
  moved to the end of the URL. (becoming the last context param)
 
  I'm now migrating to T5.1.0.2 and looking at how I should implement
  this now. That's why I was looking at URL rewriting to see if it was
  appropriate for this task in 5.1 - I wasn't looking at the nightly
 docs
  though. Now I am and I can see what Thiago means but I don't think
 URL
  rewriting is the right place to do this. I'm leaning towards a custom
  implementation of ComponentEventLinkEncoder (possibly extending the
  internal T5.1 impl) since the URL analysis which is going on in here
 is
  what I need to figure out what (if anything) needs doing to the URL.
 
  Are there any other ways of doing this, and is this the best?
 Opinions
  welcome.
 
  Thanks,
  Andy.
 
 
  Hi Andy,
 
  It certainly looks like we have similar ideas to re-solve with
  5.1.0.n1.  ;)
 
  I'm in the midst of trying to understand the best approach to this
  myself, and would like to stay away from extending Tapestry internals
  or other hacks like I did previously so upgrading in the future
 does
  not break my app, etc. However, it may be that even the most recent
  code is not capable of being used in a way that can accomplish our
  goals without resorting to touching the internals.
 
  I'll post back what my solution turns out to be.
 
  Best of luck,
 
  Levi
  --
  View this message in context: http://n2.nabble.com/T5.1-URL-
 Rewriting-
  tp2557652p2563958.html
  Sent from the Tapestry Users mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: users-h...@tapestry.apache.org
 
 
 
 
 -
 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



Index page URL generation

2009-04-07 Thread Blower, Andy
I'm still working through the migration from 5.0.18 to 5.1.0.2 and the latest 
issue I've found is that in 5.0.18 a page link to an index page would be 
optimized to / whereas with 5.1 this is not happening. So my site's homepage 
is http://whatever/ and this works, but any link generated to the home page is 
index in the HTML and gives a URL of http://whatever/index which is not what 
I want.

Has anyone else experienced this when upgrading to 5.1? I've searched the list 
and couldn't find anything, but I can't be the only one surely?

Thanks,

Andy.


  1   2   >