Re: Page pool hard limit and page instance usage

2008-09-22 Thread 9902468

Hi again,

I'm hitting my head to wall here with ServletContextSymbolProvider. It is
configured like this:

public static void
contributeSymbolSource(OrderedConfigurationSymbolProvider configuration,
@InjectService(ServletContextSymbolProvider) SymbolProvider
servletContextSymbolProvider)
{
configuration.add(ServletContextSymbolProvider ,
servletContextSymbolProvider, after:SystemProperties,
before:ApplicationDefaults);
}

public static ServletContextSymbolProvider
buildServletContextSymbolProvider(ApplicationGlobals globals){
return new
ServletContextSymbolProvider(globals.getServletContext());
}

And it always ends to this error:
java.lang.RuntimeException: Unable to instantiate class
org.apache.tapestry5.services.TapestryModule as a module builder: Exception
constructing service 'Alias': Error invoking service builder method
org.apache.tapestry5.services.TapestryModule.buildAlias(Logger, String,
AliasManager, Collection) (at TapestryModule.java:217) (for service
'Alias'): Exception constructing service 'SymbolSource': Error invoking
constructor
org.apache.tapestry5.ioc.internal.services.SymbolSourceImpl(List) (at
SymbolSourceImpl.java:198) via
org.apache.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder) (at
TapestryIOCModule.java:38) (for service 'SymbolSource'): Error invoking
service contribution method
com.example.tapestry5.services.ExampleModule.contributeSymbolSource(OrderedConfiguration,
SymbolProvider): Error building service proxy for service
'ServletContextSymbolProvider' (at
com.example.tapestry5.services.ExampleModule.buildServletContextSymbolProvider(ApplicationGlobals)
(at ExampleModule.java:215)): Error invoking service builder method
com.example.tapestry5.services.ExampleModule.buildServletContextSymbolProvider(ApplicationGlobals)
(at ExampleModule.java:215) (for service 'ServletContextSymbolProvider'):
Exception constructing service 'Alias': Construction of service 'Alias' has
failed due to recursion: the service depends on itself in some way. Please
check org.apache.tapestry5.services.TapestryModule.buildAlias(Logger,
String, AliasManager, Collection) (at TapestryModule.java:217) for
references to another service that is itself dependent on service 'Alias'.

I can't determine where the recursion is. Is the ApplicationGlobals
initiating the construction of Alias service? If this is true then
ApplicationGlobsals cannot be used while I'm constructing my alias
overrides?

Is there anyone out there who has this working?

 - 99


Ulrich Stärk wrote:
 
 You don't have to write your own ServletContextSymbolProvider, it already
 comes shipped with 
 Tapestry. See here 
 http://tapestry.apache.org/tapestry5/apidocs/index.html?org/apache/tapestry5/ioc/services/SymbolProvider.html
 You just have to configure it.
 
 Uli
 
 9902468 schrieb:
 Yep, just read through your discussion:
 
 http://www.nabble.com/forum/ViewPost.jtp?post=19547763framed=yskin=302
 
 and that would be the intelligent way of doing it :)
 
 I'll code symbol provider when I have time. Hopefully these providers can
 be
 included in T5 distribution, as these are highly reusable and add only
 little to none weight to the distribution.
 
  - 99
 
 
 Ulrich Stärk wrote:
 Why not instantiate a ServletContextSymbolProvider (the ServletContext
 is
 available from the 
 ApplicationGlobals service) and contribute it to the SymbolProvider
 before
 ApplicationDefaults and 
 FactoryDefaults. That way you can directly override
 tapestry.page-pool.hard-limit and automatically 
 have all other init parameters as symbols, too.

 Uli

 9902468 schrieb:
 I always keep nabble open when I'm at work :)

 These parameters can be transferred to web.xml, so that recompile is
 not
 needed when changing these parameters:

 public static void
 contributeApplicationDefaults(MappedConfigurationString,
 String configuration, ApplicationGlobals globals) {

 configuration.add(tapestry.page-pool.hard-limit,
 globals.getServletContext().getInitParameter(page_hard_limit));

 }

 and in web.xml

 web-app
 display-nameSome Tapestry 5 Application/display-name
 context-param
 !-- The only significant configuration for Tapestry 5, this
 informs
 Tapestry of where to look for pages, components and mixins. --
 param-nametapestry.app-package/param-name
 param-valuefi.hanken.resbuilder.tapestry5/param-value
 /context-param
 context-param
 param-namepage_hard_limit/param-name
 param-value60/param-value
 /context-param

 This can be used through out every single service and page and
 component.
 To
 access this in a page or component use:

 @Property @Inject @Value(${page_hard_limit})
 private String pageHardLimit;

 Injection can be used in service constructor also (I think) or by using
 buildSomeService method instead of the usual binder.bind

 Of course T5 makes it easy to read these from a file or database or
 from
 what not, but I have noticed that many admins 

Re: [ANNOUNCE] Tapestry 5.0.15

2008-09-22 Thread Donyee
Great!

2008/9/22 Howard Lewis Ship [EMAIL PROTECTED]

 Tapestry 5.0.15 is now available for download or via Maven.

 We've squeezed a whole lot of last minute improvements and fixes into
 (what was supposed to be) the released candidate.  Alas, we missed a
 couple so the release candidate will be 5.0.16, due out in early
 October.

 We recommend users upgrade to this release in preparation for the
 release candidate.

 Release notes: http://tapestry.apache.org/tapestry5/release-notes.html

 Upgrade notes: http://tapestry.apache.org/tapestry5/upgrade.html

 Download: http://tapestry.apache.org/download.html

 Enjoy!

 --
 Howard M. Lewis Ship

 Creator Apache Tapestry and Apache HiveMind

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Yet Another Java EE Developer!


Re: IoC Question with Alias

2008-09-22 Thread Kristian Marinkovic
hi michael,

happened to me several times too :)

first you could try to define your services as proxy:

from:
binder.bind(HttpdRequestSecurityManager.class).withId(HttpdRequestSecurityManager);


to:
binder.bind(RequestSecurityManager.class, 
HttpdRequestSecurityManager.class).withId(HttpdRequestSecurityManager);

if this is not enough try to break the dependency cycle by 
injecting the ObjectLocator and creating the proxy manually

eg:
configuration.add( AliasContribution.create(
   RequestSecurityManager.class,
   locator.proxy(
RequestSecurityManager.class, 
HttpdRequestSecurityManager.class)) );

see also following post 
http://tapestry-user.markmail.org/search/?q=kristian+marinkovic#query:kristian%20marinkovic%20order%3Adate-backward+page:1+mid:pmmti5eoegosg2n5+state:results

g,
kris




Michael Gerzabek [EMAIL PROTECTED] 
19.09.2008 19:32
Bitte antworten an
Tapestry users users@tapestry.apache.org


An
users@tapestry.apache.org
Kopie

Thema
IoC Question with Alias







Hi,

I have a problem with the contributions to the alias service. The 
AppModule is ...

public static void bind( ServiceBinder binder ) {

binder.bind( SiteDispatcher.class ).withId( SiteDispatcher );
binder.bind( SiteServiceImpl.class ).withId( SiteService );
binder.bind( HttpdRequestSecurityManager.class ).withId(
HttpdRequestSecurityManager );
binder.bind( SiteBaseURLSource.class ).withId( SiteBaseURLSource );
}

@SuppressWarnings( unchecked )
public void contributeAlias(
ConfigurationAliasContribution configuration,
@InjectService( HttpdRequestSecurityManager )
RequestSecurityManager manager,
@InjectService( SiteBaseURLSource )
BaseURLSource baseUrlSource ) {

configuration.add( AliasContribution.create(
BaseURLSource.class,
baseUrlSource ) );

configuration.add( AliasContribution.create(
RequestSecurityManager.class,
manager ) );
}

The constructors of the services are ...

public SiteServiceImpl(
RequestGlobals globals,
ApplicationGlobals application,
Session session,
Logger logger,
CollectionString contributions,
SymbolSource symbols ) {

...
}

public HttpdRequestSecurityManager(
Request request,
Response response,
MetaDataLocator locator,
RequestPageCache requestPageCache,
@InjectService(SiteBaseURLSource)
BaseURLSource baseURLSource,
SiteService site ) {

...
}

public SiteBaseURLSource( SiteService site ) {

...
}

I get the [ERROR] Alias Construction of service Alias failed: Error 
invoking service builder method 
org.apache.tapestry5.services.TapestryModule.build(Logger, String, 
AliasManager, Collection) (at TapestryModule.java:205) (for service 
'Alias'): Error invoking service contribution method 
com.flexibelinstitut.tapestry5.site.SiteModule.contributeAlias(Configuration, 

RequestSecurityManager, BaseURLSource): Error building service proxy for 
service 'HttpdRequestSecurityManager' (at 
com.flexibelinstitut.tapestry5.site.services.internal.HttpdRequestSecurityManager(Request,
 

Response, MetaDataLocator, RequestPageCache, BaseURLSource, SiteService) 
(at HttpdRequestSecurityManager.java:26)): Error invoking constructor 
com.flexibelinstitut.tapestry5.site.services.internal.HttpdRequestSecurityManager(Request,
 

Response, MetaDataLocator, RequestPageCache, BaseURLSource, SiteService) 
(at HttpdRequestSecurityManager.java:26) (for service 
'HttpdRequestSecurityManager'): Exception constructing service 'Alias': 
Construction of service 'Alias' has failed due to recursion: the service 
depends on itself in some way. Please check 
org.apache.tapestry5.services.TapestryModule.build(Logger, String, 
AliasManager, Collection) (at TapestryModule.java:205) for references to 
another service that is itself dependent on service 'Alias'.

And I don't even have a clue where to look. I tried a lot of different 
version with @Inject, with @InjectService(..) on the constructors the 
contributeAlias(..) method. But none of them seems to work.

Any ideas?

/M



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [ANN] t5components 0.5.15 is now available for Tapestry 5.0.15

2008-09-22 Thread Sven Homburg
the last release of t5c is not working with tapestry 5.0.13

2008/9/22 Fei_Wang [EMAIL PROTECTED]


 hi! how do  i put the thumbNail(5.0.13) in my application?
 Hi there,

 t5components 0.5.15 is now available for Tapestry 5.0.15
 with some fixes

 project page http://tapestry5-components.googlecode.com


 --
 with regards
 Sven Homburg
 http://www.chenillekit.org
 http://tapestry5-components.googlecode.com


 -
 best regards
 Sven


 --
 View this message in context:
 http://www.nabble.com/-ANN--t5components-0.5.15-is-now-available-for-Tapestry-5.0.15-tp19598681p19602184.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
with regards
Sven Homburg
http://www.chenillekit.org
http://tapestry5-components.googlecode.com


Re: [ANN] t5components 0.5.15 is now available for Tapestry 5.0.15

2008-09-22 Thread Sven Homburg
the last release of t5c is not working with tapestry 5.0.13

2008/9/22 Fei_Wang [EMAIL PROTECTED]


 hi! how do  i put the thumbNail(5.0.13) in my application?
 Hi there,

 t5components 0.5.15 is now available for Tapestry 5.0.15
 with some fixes

 project page http://tapestry5-components.googlecode.com


 --
 with regards
 Sven Homburg
 http://www.chenillekit.org
 http://tapestry5-components.googlecode.com


 -
 best regards
 Sven


 --
 View this message in context:
 http://www.nabble.com/-ANN--t5components-0.5.15-is-now-available-for-Tapestry-5.0.15-tp19598681p19602184.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
with regards
Sven Homburg
http://www.chenillekit.org
http://tapestry5-components.googlecode.com


Call Javascript After Request Processing

2008-09-22 Thread Alexey Frishman
Hi all,

I there any possibility to invoke some Javascript code just after processing
an AJAX request?
Can I attach my own event listeners in Javascript to the component with the
ability to be called after AJAX request processing?


Re: Call Javascript After Request Processing

2008-09-22 Thread Alexey Frishman
Forgot to tell, I use T5

On Mon, Sep 22, 2008 at 4:36 PM, Alexey Frishman
[EMAIL PROTECTED]wrote:

 Hi all,

 I there any possibility to invoke some Javascript code just after
 processing an AJAX request?
 Can I attach my own event listeners in Javascript to the component with the
 ability to be called after AJAX request processing?



NPE when trying to contribute ServletContextSymbolProvider to SymbolSource (WAS: Re: Page pool hard limit and page instance usage)

2008-09-22 Thread Ulrich Stärk
The problem seems to be, that the ServletContext provided by
ApplicationGlobals is null when Tapestry tries to contribute the
ServletContextSymbolProvider to the SymbolSource service. I don't know why
this is the case. Maybe someone else can shed some light on this.

Uli

Am Mo, 22.09.2008, 08:08, schrieb 9902468:

 Hi again,

 I'm hitting my head to wall here with ServletContextSymbolProvider. It is
 configured like this:

 public static void
 contributeSymbolSource(OrderedConfigurationSymbolProvider configuration,
 @InjectService(ServletContextSymbolProvider) SymbolProvider
 servletContextSymbolProvider)
 {
 configuration.add(ServletContextSymbolProvider ,
 servletContextSymbolProvider, after:SystemProperties,
 before:ApplicationDefaults);
 }

 public static ServletContextSymbolProvider
 buildServletContextSymbolProvider(ApplicationGlobals globals){
 return new
 ServletContextSymbolProvider(globals.getServletContext());
 }

 And it always ends to this error:
 java.lang.RuntimeException: Unable to instantiate class
 org.apache.tapestry5.services.TapestryModule as a module builder:
 Exception
 constructing service 'Alias': Error invoking service builder method
 org.apache.tapestry5.services.TapestryModule.buildAlias(Logger, String,
 AliasManager, Collection) (at TapestryModule.java:217) (for service
 'Alias'): Exception constructing service 'SymbolSource': Error invoking
 constructor
 org.apache.tapestry5.ioc.internal.services.SymbolSourceImpl(List) (at
 SymbolSourceImpl.java:198) via
 org.apache.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder)
 (at
 TapestryIOCModule.java:38) (for service 'SymbolSource'): Error invoking
 service contribution method
 com.example.tapestry5.services.ExampleModule.contributeSymbolSource(OrderedConfiguration,
 SymbolProvider): Error building service proxy for service
 'ServletContextSymbolProvider' (at
 com.example.tapestry5.services.ExampleModule.buildServletContextSymbolProvider(ApplicationGlobals)
 (at ExampleModule.java:215)): Error invoking service builder method
 com.example.tapestry5.services.ExampleModule.buildServletContextSymbolProvider(ApplicationGlobals)
 (at ExampleModule.java:215) (for service 'ServletContextSymbolProvider'):
 Exception constructing service 'Alias': Construction of service 'Alias'
 has
 failed due to recursion: the service depends on itself in some way. Please
 check org.apache.tapestry5.services.TapestryModule.buildAlias(Logger,
 String, AliasManager, Collection) (at TapestryModule.java:217) for
 references to another service that is itself dependent on service 'Alias'.

 I can't determine where the recursion is. Is the ApplicationGlobals
 initiating the construction of Alias service? If this is true then
 ApplicationGlobsals cannot be used while I'm constructing my alias
 overrides?

 Is there anyone out there who has this working?

  - 99


 Ulrich Stärk wrote:

 You don't have to write your own ServletContextSymbolProvider, it
 already
 comes shipped with
 Tapestry. See here
 http://tapestry.apache.org/tapestry5/apidocs/index.html?org/apache/tapestry5/ioc/services/SymbolProvider.html
 You just have to configure it.

 Uli

 9902468 schrieb:
 Yep, just read through your discussion:

 http://www.nabble.com/forum/ViewPost.jtp?post=19547763framed=yskin=302

 and that would be the intelligent way of doing it :)

 I'll code symbol provider when I have time. Hopefully these providers
 can
 be
 included in T5 distribution, as these are highly reusable and add only
 little to none weight to the distribution.

  - 99


 Ulrich Stärk wrote:
 Why not instantiate a ServletContextSymbolProvider (the ServletContext
 is
 available from the
 ApplicationGlobals service) and contribute it to the SymbolProvider
 before
 ApplicationDefaults and
 FactoryDefaults. That way you can directly override
 tapestry.page-pool.hard-limit and automatically
 have all other init parameters as symbols, too.

 Uli

 9902468 schrieb:
 I always keep nabble open when I'm at work :)

 These parameters can be transferred to web.xml, so that recompile is
 not
 needed when changing these parameters:

 public static void
 contributeApplicationDefaults(MappedConfigurationString,
 String configuration, ApplicationGlobals globals) {

 configuration.add(tapestry.page-pool.hard-limit,
 globals.getServletContext().getInitParameter(page_hard_limit));

 }

 and in web.xml

 web-app
 display-nameSome Tapestry 5 Application/display-name
 context-param
 !-- The only significant configuration for Tapestry 5, this
 informs
 Tapestry of where to look for pages, components and mixins. --
 param-nametapestry.app-package/param-name
 param-valuefi.hanken.resbuilder.tapestry5/param-value
 /context-param
 context-param
 param-namepage_hard_limit/param-name
 param-value60/param-value
 /context-param

 This can be used through out every single service and page and
 component.
 To
 access this in a 

Re: NPE when trying to contribute ServletContextSymbolProvider to SymbolSource (WAS: Re: Page pool hard limit and page instance usage)

2008-09-22 Thread Peter Stavrinides
Just a wild guess, but it sounds like an 'order of things' type problem, 
Tapestry being a filter and not essentially a servlet, the context might not be 
available at that point. 

- Original Message -
From: Ulrich Stärk [EMAIL PROTECTED]
To: Tapestry users users@tapestry.apache.org
Sent: Monday, 22 September, 2008 4:51:23 PM GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: NPE when trying to contribute ServletContextSymbolProvider to  
SymbolSource (WAS: Re: Page pool hard limit and page instance usage)

The problem seems to be, that the ServletContext provided by
ApplicationGlobals is null when Tapestry tries to contribute the
ServletContextSymbolProvider to the SymbolSource service. I don't know why
this is the case. Maybe someone else can shed some light on this.

Uli

Am Mo, 22.09.2008, 08:08, schrieb 9902468:

 Hi again,

 I'm hitting my head to wall here with ServletContextSymbolProvider. It is
 configured like this:

 public static void
 contributeSymbolSource(OrderedConfigurationSymbolProvider configuration,
 @InjectService(ServletContextSymbolProvider) SymbolProvider
 servletContextSymbolProvider)
 {
 configuration.add(ServletContextSymbolProvider ,
 servletContextSymbolProvider, after:SystemProperties,
 before:ApplicationDefaults);
 }

 public static ServletContextSymbolProvider
 buildServletContextSymbolProvider(ApplicationGlobals globals){
 return new
 ServletContextSymbolProvider(globals.getServletContext());
 }

 And it always ends to this error:
 java.lang.RuntimeException: Unable to instantiate class
 org.apache.tapestry5.services.TapestryModule as a module builder:
 Exception
 constructing service 'Alias': Error invoking service builder method
 org.apache.tapestry5.services.TapestryModule.buildAlias(Logger, String,
 AliasManager, Collection) (at TapestryModule.java:217) (for service
 'Alias'): Exception constructing service 'SymbolSource': Error invoking
 constructor
 org.apache.tapestry5.ioc.internal.services.SymbolSourceImpl(List) (at
 SymbolSourceImpl.java:198) via
 org.apache.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder)
 (at
 TapestryIOCModule.java:38) (for service 'SymbolSource'): Error invoking
 service contribution method
 com.example.tapestry5.services.ExampleModule.contributeSymbolSource(OrderedConfiguration,
 SymbolProvider): Error building service proxy for service
 'ServletContextSymbolProvider' (at
 com.example.tapestry5.services.ExampleModule.buildServletContextSymbolProvider(ApplicationGlobals)
 (at ExampleModule.java:215)): Error invoking service builder method
 com.example.tapestry5.services.ExampleModule.buildServletContextSymbolProvider(ApplicationGlobals)
 (at ExampleModule.java:215) (for service 'ServletContextSymbolProvider'):
 Exception constructing service 'Alias': Construction of service 'Alias'
 has
 failed due to recursion: the service depends on itself in some way. Please
 check org.apache.tapestry5.services.TapestryModule.buildAlias(Logger,
 String, AliasManager, Collection) (at TapestryModule.java:217) for
 references to another service that is itself dependent on service 'Alias'.

 I can't determine where the recursion is. Is the ApplicationGlobals
 initiating the construction of Alias service? If this is true then
 ApplicationGlobsals cannot be used while I'm constructing my alias
 overrides?

 Is there anyone out there who has this working?

  - 99


 Ulrich Stärk wrote:

 You don't have to write your own ServletContextSymbolProvider, it
 already
 comes shipped with
 Tapestry. See here
 http://tapestry.apache.org/tapestry5/apidocs/index.html?org/apache/tapestry5/ioc/services/SymbolProvider.html
 You just have to configure it.

 Uli

 9902468 schrieb:
 Yep, just read through your discussion:

 http://www.nabble.com/forum/ViewPost.jtp?post=19547763framed=yskin=302

 and that would be the intelligent way of doing it :)

 I'll code symbol provider when I have time. Hopefully these providers
 can
 be
 included in T5 distribution, as these are highly reusable and add only
 little to none weight to the distribution.

  - 99


 Ulrich Stärk wrote:
 Why not instantiate a ServletContextSymbolProvider (the ServletContext
 is
 available from the
 ApplicationGlobals service) and contribute it to the SymbolProvider
 before
 ApplicationDefaults and
 FactoryDefaults. That way you can directly override
 tapestry.page-pool.hard-limit and automatically
 have all other init parameters as symbols, too.

 Uli

 9902468 schrieb:
 I always keep nabble open when I'm at work :)

 These parameters can be transferred to web.xml, so that recompile is
 not
 needed when changing these parameters:

 public static void
 contributeApplicationDefaults(MappedConfigurationString,
 String configuration, ApplicationGlobals globals) {

 configuration.add(tapestry.page-pool.hard-limit,
 globals.getServletContext().getInitParameter(page_hard_limit));

 }

 and in web.xml

 web-app
 display-nameSome Tapestry 5 

T5: Ajax Examples/Tutorials

2008-09-22 Thread James Sherwood
Hello,

I was wondering if anyone knew of any good ajax Examples/Tutorials with T5?

Things such as text fields that do not require form submits to change data.

Thanks in advance,
--James

Select components

2008-09-22 Thread Zlatko Kuvendziski

hi!

I would like to ask if anyone knows how to make two select components in 
T5, where the second one is dependent on the first. And it has to be 
ajax based, without full submit.


For example, there are two select components, from the first one, you 
select a project, and from the second one, you select a sub-project 
based on the project already selected...


thanx!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Upgrade pains 5.0.15

2008-09-22 Thread Peter Stavrinides
I am upgrading from 5.0.14 to 5.0.15, and have come across this error several 
times: 

Caused by: org.apache.tapestry5.internal.services.TransformationException: 
Field _tabList of class pages.hf.Fund is already claimed by 
@org.apache.tapestry5.annotations.Persist and can not be claimed by 
@org.apache.tapestry5.annotations.Environmental

Probably some foul coding on my part, but I am having trouble understanding 
exactly what I have botched up, obviously the field is in conflict, Persist and 
Environmental don't play nice together anymore, why though? and what is the 
correct approach?

Thanks for your help!
Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: NPE when trying to contribute ServletContextSymbolProvider to SymbolSource (WAS: Re: Page pool hard limit and page instance usage)

2008-09-22 Thread Ulrich Stärk
A Filter is passed a FilterConfig object where you can call
getServletContext() and get the ServletContext. So the availability
shouldn't be a problem. I rather believe that it doesn't get set in
ApplicationGlobals until a certain point which is after building the
SymbolSource...

Uli

Am Mo, 22.09.2008, 16:01, schrieb Peter Stavrinides:
 Just a wild guess, but it sounds like an 'order of things' type problem,
 Tapestry being a filter and not essentially a servlet, the context might
 not be available at that point.

 - Original Message -
 From: Ulrich Stärk [EMAIL PROTECTED]
 To: Tapestry users users@tapestry.apache.org
 Sent: Monday, 22 September, 2008 4:51:23 PM GMT +02:00 Athens, Beirut,
 Bucharest, Istanbul
 Subject: NPE when trying to contribute ServletContextSymbolProvider to
 SymbolSource (WAS: Re: Page pool hard limit and page instance usage)

 The problem seems to be, that the ServletContext provided by
 ApplicationGlobals is null when Tapestry tries to contribute the
 ServletContextSymbolProvider to the SymbolSource service. I don't know why
 this is the case. Maybe someone else can shed some light on this.

 Uli

 Am Mo, 22.09.2008, 08:08, schrieb 9902468:

 Hi again,

 I'm hitting my head to wall here with ServletContextSymbolProvider. It
 is
 configured like this:

 public static void
 contributeSymbolSource(OrderedConfigurationSymbolProvider
 configuration,
 @InjectService(ServletContextSymbolProvider) SymbolProvider
 servletContextSymbolProvider)
 {
 configuration.add(ServletContextSymbolProvider ,
 servletContextSymbolProvider, after:SystemProperties,
 before:ApplicationDefaults);
 }

 public static ServletContextSymbolProvider
 buildServletContextSymbolProvider(ApplicationGlobals globals){
 return new
 ServletContextSymbolProvider(globals.getServletContext());
 }

 And it always ends to this error:
 java.lang.RuntimeException: Unable to instantiate class
 org.apache.tapestry5.services.TapestryModule as a module builder:
 Exception
 constructing service 'Alias': Error invoking service builder method
 org.apache.tapestry5.services.TapestryModule.buildAlias(Logger, String,
 AliasManager, Collection) (at TapestryModule.java:217) (for service
 'Alias'): Exception constructing service 'SymbolSource': Error invoking
 constructor
 o


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Select components

2008-09-22 Thread Ulrich Stärk
This will work as soon as https://issues.apache.org/jira/browse/TAP5-138
is implemented. You can create a JIRA account and watch and/or vote for
this issue. Until then I think a full submit is the only way to get this
behaviour.

Uli

Am Mo, 22.09.2008, 16:08, schrieb Zlatko Kuvendziski:
 hi!

 I would like to ask if anyone knows how to make two select components in
 T5, where the second one is dependent on the first. And it has to be
 ajax based, without full submit.

 For example, there are two select components, from the first one, you
 select a project, and from the second one, you select a sub-project
 based on the project already selected...

 thanx!

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Select components

2008-09-22 Thread Geoff Callender

You might like to vote for this:

Add Zone parameter to Select component
https://issues.apache.org/jira/browse/TAP5-138

Cheers,

Geoff

On 23/09/2008, at 12:08 AM, Zlatko Kuvendziski wrote:


hi!

I would like to ask if anyone knows how to make two select  
components in T5, where the second one is dependent on the first.  
And it has to be ajax based, without full submit.


For example, there are two select components, from the first one,  
you select a project, and from the second one, you select a sub- 
project based on the project already selected...


thanx!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





Re: Select components

2008-09-22 Thread Zlatko Kuvendziski

is there a possible workaround with the 5.0.15 release?




Ulrich Stärk wrote:

This will work as soon as https://issues.apache.org/jira/browse/TAP5-138
is implemented. You can create a JIRA account and watch and/or vote for
this issue. Until then I think a full submit is the only way to get this
behaviour.

Uli

Am Mo, 22.09.2008, 16:08, schrieb Zlatko Kuvendziski:

hi!

I would like to ask if anyone knows how to make two select components in
T5, where the second one is dependent on the first. And it has to be
ajax based, without full submit.

For example, there are two select components, from the first one, you
select a project, and from the second one, you select a sub-project
based on the project already selected...

thanx!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: Ajax Examples/Tutorials

2008-09-22 Thread Daniel Jue
These are listed on the Tapestry web page and in the Tapestry 5 wiki.

Here is a 3rd party library demo:
http://87.193.218.134:8080/t5c-demo/


On Mon, Sep 22, 2008 at 10:16 AM, James Sherwood [EMAIL PROTECTED]
 wrote:

 Hello,

 I was wondering if anyone knew of any good ajax Examples/Tutorials with T5?

 Things such as text fields that do not require form submits to change data.

 Thanks in advance,
 --James


Re: Upgrade pains 5.0.15

2008-09-22 Thread Filip S. Adamsen

Hi,

I'm surprised @Environmental + @Persist worked in the first place. 
Environmentals are not regular services, they're pushed onto a stack at 
the right time during rendering, often with specific configuration, so 
it doesn't make sense to persist them.


-Filip

On 2008-09-22 16:34, Peter Stavrinides wrote:
I am upgrading from 5.0.14 to 5.0.15, and have come across this error several times: 


Caused by: org.apache.tapestry5.internal.services.TransformationException: 
Field _tabList of class pages.hf.Fund is already claimed by 
@org.apache.tapestry5.annotations.Persist and can not be claimed by 
@org.apache.tapestry5.annotations.Environmental

Probably some foul coding on my part, but I am having trouble understanding 
exactly what I have botched up, obviously the field is in conflict, Persist and 
Environmental don't play nice together anymore, why though? and what is the 
correct approach?

Thanks for your help!
Peter


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DateField + FCK possible bug?

2008-09-22 Thread ProAdmin Dariusz Dwornikowski
HI,

I do not know hwther it is a bug or not.

Happens on T5.0.14 and .15.


In safari 3.1.2 :

When I have FCK and DateField on the same page, little calendar is not
clickable.

In FF 3:

Calendar is clickable, but: In case I have predefined value in page
code, ex: private Date dateOfFoo = new Date(), the calendar after
clicking is empty and the header says NaN Undefined.
If I do not predefine, the calendar is ok.




-- 
Pozdrawiam,
Dariusz Dwornikowski

ProAdmin
ul. Królowej Jadwigi 44/2
61-872 Poznań
tel:  061 623-20-92
kom: 0601 59-64-74
fax: 061 623-20-93
www.proadmin.com.pl
[EMAIL PROTECTED]


Re: Integration with GWT

2008-09-22 Thread Daniel Jue
I am also interested in a basic but complete tutorial on using GWT in T5.
Anyone want to share some sample setup/source code or give some pointers?

On Sun, Sep 21, 2008 at 1:13 PM, Alexey Frishman
[EMAIL PROTECTED]wrote:

 Hi,

 I use T5 in my project as main web framework. The project itself is a sort
 of simple web GIS, based on Google Maps. There is great widget library for
 GWT to serve Google Maps with all their AJAX stuff, so I decided to use it
 also.

 Please, give me some information whether it's possible to integrate full
 lifecycle of GWT component with T5 as main framework? What I actually need
 is to be able to share some objects between Tapestry and GWT, but without
 page reload. So my GWT component should make its RPCs as usual, but these
 calls should be made after pressing button in Tapestry component and
 information should be got from that component too (@ApplicationState may
 be,
 but how to integrate it with GWT?)



JOB

2008-09-22 Thread devilabit

Hi All,

Sorry for this off-topic post.

I have just moved to Montreal, Canada and Im wondering if anyone knows any
companies that use Tapestry and have a development office in Montreal.  I am
quite keen to keep working with Tapestry.

Any help would be greatly appreciated.
-- 
View this message in context: http://www.nabble.com/JOB-tp19613380p19613380.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5Components Inside AjaxResult - delay in loading javascript files

2008-09-22 Thread Anteneh Alemayehu

I got it!

It was not a delay. Tapestry.DEBUG_ENABLED was set true. 

I used the renderSupport to turn it off.

public void afterRender()
{
renderSupport.addScript(Tapestry.DEBUG_ENABLED = false;);
}

Now it is working fine!

Thank you,

Anteneh






Anteneh Alemayehu wrote:
 
 Hi All,
 
 When I use any of the T5Components inside the Ajax Result there is a
 remarkable delay in loading and checking previously loaded .js files. 
 
 The T5Component, InPlaceCheckbox, is inside someBlock which is the result
 of an Ajax Call. 
 
 Find the java and tml code below.
 
 Is there any one who can help me to avoid the delay?
 
 Thank you,
 
 Anteneh
 
 -- Java code -Start --
 
 private boolean checked;
 
   @Inject
   private Block someBlock;
 
   @Component(parameters = { value=checked,
 onCompleteCallback=onCompleteFunction })
   private InPlaceCheckbox myInPlaceCheckbox;
 
   public boolean isChecked()
   {
   return checked;
   }
 
   public void setChecked(boolean checked)
   {
   this.checked = checked;
   }
 
   @OnEvent(component = myInPlaceCheckbox, value =
 InPlaceCheckbox.EVENT_NAME)
   public boolean inPlaceCheckbox(boolean checked)
   {
   return checked;
   }
 
   Block onActionFromTheLink()
   {
   return someBlock;
   }
 
   public InPlaceCheckbox getMyInPlaceCheckbox()
   {
   return myInPlaceCheckbox;
   }
 
 
 -- Java code -End--
 
 
 -- tml code -Start --
 script type=text/javascript
   function onCompleteFunction(response)
   {
   if (response.evalJSON().value == true) {
   $('checkboxResult').update(strongchecked/strong);
   } else {
   $('checkboxResult').update(strongun-checked/strong);
   }
   }
   /script
   To display the Inplace checkbox t:actionLink t:id=theLink
 t:zone=updateZoneClick here/t:actionLink
   t:zone t:id=updateZone
   Initial content
   /t:zone
   t:block t:id=someBlock
   Checkbox:  input type=checkbox
   
 t:id=myInPlaceCheckbox
   
 t:type=t5components/InPlaceCheckbox/ 
   hr /
   br /
   Checkbox state : div id=checkboxResultstate will 
 display here/div
   /t:block
 
 -- tml code -End--
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/T5Components-Inside-AjaxResult---delay-in-loading-javascript-files-tp19575134p19615736.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[T5] GridDataSource: why call getAvailableRows before prepare?

2008-09-22 Thread Franz Amador

I'm starting to use Grid to display the paged, sortable results of a
Hibernate query, so I'm implementing GridDataSource.  I was dismayed to see
that getAvailableRows gets called before prepare.  This means that I have to
run my query twice: once to count the total rows (when getAvailableRows gets
called), and again to do the sorting and get the correct page (when prepare
gets called).

If, instead, prepare got called first, then I could do the sorting and page
extraction and get the total number of results all in one query (just add
count(*) to the columns being returned).  You might ask, how can the
system know the page size to ask for when calling prepare if it hasn't
called getAvailableRows first?  No problem: just ask for the first full page
and have prepare return the number of rows it actually found.  (Or add a
getter for that information.)

For fast queries, running them twice isn't that great a sin, but for slow
queries, such as in a user-specified search page, running them twice when
you don't really have to seems extravagant to me.
-- 
View this message in context: 
http://www.nabble.com/-T5--GridDataSource%3A-why-call-getAvailableRows-before-prepare--tp19616074p19616074.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problem with getPage of ComponentSource(5.0.15-SNAPSHOT)

2008-09-22 Thread faramos

Dear

Occupying the method Component getPage (String pagename) of the service 
ComponentSource with pageName = , throws 

[ERROR] TapestryModule.RequestExceptionHandler Processing of request failed
with uncaught exception: Parameter pageName was null or contained only
whitespace.
java.lang.IllegalArgumentException: Parameter pageName was null or contained
only whitespace.
at 
org.apache.tapestry5.ioc.internal.util.Defense.notBlank(Defense.java:59)
at
org.apache.tapestry5.internal.services.ComponentSourceImpl.getPage(ComponentSourceImpl.java:77)
..

With Tapestry 5.0.14 this method(getPage) was returning Index...
-- 
View this message in context: 
http://www.nabble.com/Problem-with-getPage-of-ComponentSource%285.0.15-SNAPSHOT%29-tp19621347p19621347.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tapestry components are statically bound

2008-09-22 Thread rdhallman

We are building a large Tapestry application with hundreds of tapestry
components.  One size and performance concern we've encountered along the
way is the fact that tapestry components are statically bound  (i.e. all
components on a page are always instantiated and bound, even though @If
will omit the component from rendering).

(NOTE: if relevant, we are using Tapestry 4.02, so perhaps this behavior is
different on the 4.1 line?)

For example,

  
  div jwcid=@widgets/ListingHeader item=ognl:curItem/
  
  
  div jwcid=@widgets/InquireHeader item=ognl:curItem/
  
  
 
  

In the above example, all three components (ListingDetail,
InquireDetail, and PurchaseDetail) get instantiated and parameters
bound, despite only one being necessary.  Considering each component may
have a hierarchy of components itself, this could quickly pull in lots of
extra stuff unnecessarily.

First question, is this really a problem or completely necessary due to page
pooling (i.e. perhaps tapestry must instantiate all components or else pages
can't be pooled and used again with different conditions)  ??

Second, is there a way (either in core Tapestry or through extensions) to
instantiate and bind only the components that @If logic includes?  If not,
any thoughts on how to build such a dynamically bound component in tapestry?

Third, we could reduce this problem and simplify the above example if we
could write this one-liner instead of the string of @If statements:

 

Clearly, Tapestry doesn't support ognl expressions in jwcid expressions, but
why not?  Again with the pooling, would making some components late bound
like this render their pages un-poolable?  Or could this pooling problem be
worked around (i.e. lazy-load the component upon first access) ??

Thanks,
Dean

-- 
View this message in context: 
http://www.nabble.com/Tapestry-components-are-statically-bound-tp19621496p19621496.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: NPE when trying to contribute ServletContextSymbolProvider to SymbolSource (WAS: Re: Page pool hard limit and page instance usage)

2008-09-22 Thread 9902468

Should I add Jira about this?

After all, it is pretty pointless to have this symbol provider if it can't
work. (Perhaps there is some way to overcome this problem?)

 - 99


Ulrich Stärk wrote:
 
 A Filter is passed a FilterConfig object where you can call
 getServletContext() and get the ServletContext. So the availability
 shouldn't be a problem. I rather believe that it doesn't get set in
 ApplicationGlobals until a certain point which is after building the
 SymbolSource...
 
 Uli
 
 Am Mo, 22.09.2008, 16:01, schrieb Peter Stavrinides:
 Just a wild guess, but it sounds like an 'order of things' type problem,
 Tapestry being a filter and not essentially a servlet, the context might
 not be available at that point.

 - Original Message -
 From: Ulrich Stärk [EMAIL PROTECTED]
 To: Tapestry users users@tapestry.apache.org
 Sent: Monday, 22 September, 2008 4:51:23 PM GMT +02:00 Athens, Beirut,
 Bucharest, Istanbul
 Subject: NPE when trying to contribute ServletContextSymbolProvider to
 SymbolSource (WAS: Re: Page pool hard limit and page instance usage)

 The problem seems to be, that the ServletContext provided by
 ApplicationGlobals is null when Tapestry tries to contribute the
 ServletContextSymbolProvider to the SymbolSource service. I don't know
 why
 this is the case. Maybe someone else can shed some light on this.

 Uli

 Am Mo, 22.09.2008, 08:08, schrieb 9902468:

 Hi again,

 I'm hitting my head to wall here with ServletContextSymbolProvider. It
 is
 configured like this:

 public static void
 contributeSymbolSource(OrderedConfigurationSymbolProvider
 configuration,
 @InjectService(ServletContextSymbolProvider) SymbolProvider
 servletContextSymbolProvider)
 {
 configuration.add(ServletContextSymbolProvider ,
 servletContextSymbolProvider, after:SystemProperties,
 before:ApplicationDefaults);
 }

 public static ServletContextSymbolProvider
 buildServletContextSymbolProvider(ApplicationGlobals globals){
 return new
 ServletContextSymbolProvider(globals.getServletContext());
 }

 And it always ends to this error:
 java.lang.RuntimeException: Unable to instantiate class
 org.apache.tapestry5.services.TapestryModule as a module builder:
 Exception
 constructing service 'Alias': Error invoking service builder method
 org.apache.tapestry5.services.TapestryModule.buildAlias(Logger, String,
 AliasManager, Collection) (at TapestryModule.java:217) (for service
 'Alias'): Exception constructing service 'SymbolSource': Error invoking
 constructor
 o
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Re%3A-NPE-when-trying-to-contribute-ServletContextSymbolProvider-to---SymbolSource-%28WAS%3A-Re%3A-Page-pool-hard-limit-and-page-instance-usage%29-tp19609348p19621689.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]