Re: Issue while running Tapestry tutorial with JPA instead of Hibernate

2011-08-11 Thread Igor Drobiazko
Are you sure you added tapestry-jpa dependency?

On Thu, Aug 11, 2011 at 12:39 AM, mat -- mat...@gmail.com wrote:

Two other questions, regarding the JPA integration doc:

 Q: Should one keep the tapestry-hibernate dependency when integrating with
 JPA: import org.apache.tapestry5.hibernate.annotations.CommitAfter? if not,
 how to resolve the @CommitAfter annotation?


No, tapestry-hibernate is not needed.


 Q: should this service be seen in the Tapestry IoC Services Status?


 EntityManagerSource service should be visible as any other service.


 Mat

 On Wed, Aug 10, 2011 at 10:50 PM, Lenny Primak lpri...@hope.nyc.ny.us
 wrote:

  If you are not getting the eclipse link login messages it's not going to
  work.
  The file is supposed to be in classpath/META-INF directory. Not web-inf.
  Whatever your source package is just add META-INF To that.
 
  Also what's your content of the WEB-INF/lib directory?  The lack or
  incorrect libraries may also hurt you.
 
  On Aug 10, 2011, at 2:03 PM, mat -- mat...@gmail.com wrote:
 
   Hi
  
   What's your persistence.xml look like? -- Here it it:
   (as per the JPA integration instruction)?
  
   ?xml version=1.0 encoding=UTF-8?
   persistence xmlns=http://java.sun.com/xml/ns/persistence;
   version=2.0
 persistence-unit name=DemoUnit transaction-type=RESOURCE_LOCAL
 properties
property name=javax.persistence.jdbc.driver
  value=org.h2.Driver /
property name=javax.persistence.jdbc.url
  value=jdbc:h2:mem:test /
property name=javax.persistence.jdbc.username
  value=sa /
property name=eclipselink.ddl-generation
  value=create-tables/
property name=eclipselink.logging.level
  value=fine/
/properties
 /persistence-unit
   /persistence
  
   Where exactly should the persistence.xml file be located?
   In the doc it says: and is expected to be located on the classpath in
  the *
   META-INF* directory. Is that under the WEB-INF directory?
  
   Do you get login messages int he logs for EclipseLink? -- No.
  
   What are the contents of your WEB-INF/lib? -- There is no lib older
  under
   WEB-INF in my sample app?
  
   AppModule.java? -- Here is it (much the same as in the Hibernate /
  Tutorial
   sample app).
   (I didn't add any of the configuration code mentioned in the JPA
   instructions as I understood this was needed only in XML-less JPA
   configuration
  
   package com.example.jpa.services;
  
   import java.io.IOException;
  
   import org.apache.tapestry5.*;
   import org.apache.tapestry5.ioc.Configuration;
   import org.apache.tapestry5.ioc.MappedConfiguration;
   import org.apache.tapestry5.ioc.OrderedConfiguration;
   import org.apache.tapestry5.ioc.ServiceBinder;
   import org.apache.tapestry5.ioc.annotations.Contribute;
   import org.apache.tapestry5.ioc.annotations.Local;
   import org.apache.tapestry5.services.Request;
   import org.apache.tapestry5.services.RequestFilter;
   import org.apache.tapestry5.services.RequestHandler;
   import org.apache.tapestry5.services.Response;
   import org.slf4j.Logger;
  
   /**
   * This module is automatically included as part of the Tapestry IoC
   Registry, it's a good place to
   * configure and extend Tapestry, or to place your own service
  definitions.
   */
   public class AppModule
   {
  public static void bind(ServiceBinder binder)
  {
  // binder.bind(MyServiceInterface.class, MyServiceImpl.class);
  
  // Make bind() calls on the binder object to define most IoC
   services.
  // Use service builder methods (example below) when the
   implementation
  // is provided inline, or requires more initialization than
 simply
  // invoking the constructor.
  }
  public static void contributeApplicationDefaults(
  MappedConfigurationString, String configuration)
  {
  // Contributions to ApplicationDefaults will override any
   contributions to
  // FactoryDefaults (with the same key). Here we're restricting
 the
   supported
  // locales to just en (English). As you add localised message
   catalogs and other assets,
  // you can extend this list of locales (it's a comma separated
   series of locale names;
  // the first locale name is the default when there's no
 reasonable
   match).
  
  configuration.add(SymbolConstants.SUPPORTED_LOCALES, en);
  
  // The factory default is true but during the early stages of an
   application
  // overriding to false is a good idea. In addition, this is
 often
   overridden
  // on the command line as -Dtapestry.production-mode=false
  configuration.add(SymbolConstants.PRODUCTION_MODE, false);
  
  // The application version number is incorprated into URLs for
  some
  // assets. Web browsers will cache assets 

Is there a way to change tapestry.application-version value without redeploying the webapp ?

2011-08-11 Thread Belot Thomas
Hi 

Is there a way to change tapestry.application-version value without 
redeploying the webapp ? 

We would like to be able to force all clients to refresh their static content 
cache (due to bogus client / proxy which keep serving corrupted files) without 
having to restart our tomcat or redeploy the webapp. 

see : 
http://tapestry.apache.org/configuration.html#Configuration-tapestry.applicationversion


Thanks for your help

Regards

Thomas



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



Re: Issue while running Tapestry tutorial with JPA instead of Hibernate

2011-08-11 Thread mat --
 Are you sure you added tapestry-jpa dependency?

I knew I was missing something obvious :-)
Thanks Igor, for the reminder!

So now I added tapestry-jpa and the CommitAfter annotation resolves without
Hibernate dependency and the EntityManagerSource service is now visible!

I can now run app with mvn jetty:run, but am getting this when
http://localhost:8080/jpaapp/
org.apache.tapestry5.internal.services.RenderQueueException
Render queue error in SetupRender[Index:grid]: Failure reading parameter
'source' of component Index:grid: Failed to create EntityManagerFactory for
persistence unit 'DemoUnit'

This occurs when using @PersistenceContext (unitName = DemoUnit) and the
with-XML configuration file with persistence-unit name=DemoUnit. So
presumably the two should match... Does this mean that the persistence.xml
file is not found by the application?

When using the without-XML code as per the JPA doc, I am getting a different
error:

Caused by: java.lang.RuntimeException: Exception constructing service
'EntityManagerSource': Error invoking service builder method
org.apache.tapestry5.jpa.JpaModule.buildEntityManagerSource(Logger,
Resource, PersistenceUnitConfigurer, Map, RegistryShutdownHub) (at
JpaModule.java:94) (for service 'EntityManagerSource'):
javax.naming.NameNotFoundException; remaining name 'jdbc/JPATest'

Let me know if you want the full error stack

Thanks

Mat

 On Thu, Aug 11, 2011 at 9:42 AM, Igor Drobiazko
igor.drobia...@gmail.comwrote:

 Are you sure you added tapestry-jpa dependency?

 On Thu, Aug 11, 2011 at 12:39 AM, mat -- mat...@gmail.com wrote:

 Two other questions, regarding the JPA integration doc:
 
  Q: Should one keep the tapestry-hibernate dependency when integrating
 with
  JPA: import org.apache.tapestry5.hibernate.annotations.CommitAfter? if
 not,
  how to resolve the @CommitAfter annotation?
 

 No, tapestry-hibernate is not needed.


  Q: should this service be seen in the Tapestry IoC Services Status?
 

  EntityManagerSource service should be visible as any other service.

 
  Mat
 
  On Wed, Aug 10, 2011 at 10:50 PM, Lenny Primak lpri...@hope.nyc.ny.us
  wrote:
 
   If you are not getting the eclipse link login messages it's not going
 to
   work.
   The file is supposed to be in classpath/META-INF directory. Not
 web-inf.
   Whatever your source package is just add META-INF To that.
  
   Also what's your content of the WEB-INF/lib directory?  The lack or
   incorrect libraries may also hurt you.
  
   On Aug 10, 2011, at 2:03 PM, mat -- mat...@gmail.com wrote:
  
Hi
   
What's your persistence.xml look like? -- Here it it:
(as per the JPA integration instruction)?
   
?xml version=1.0 encoding=UTF-8?
persistence xmlns=http://java.sun.com/xml/ns/persistence;
version=2.0
  persistence-unit name=DemoUnit
 transaction-type=RESOURCE_LOCAL
  properties
 property name=javax.persistence.jdbc.driver
   value=org.h2.Driver /
 property name=javax.persistence.jdbc.url
   value=jdbc:h2:mem:test /
 property name=javax.persistence.jdbc.username
   value=sa /
 property name=eclipselink.ddl-generation
   value=create-tables/
 property name=eclipselink.logging.level
   value=fine/
 /properties
  /persistence-unit
/persistence
   
Where exactly should the persistence.xml file be located?
In the doc it says: and is expected to be located on the classpath
 in
   the *
META-INF* directory. Is that under the WEB-INF directory?
   
Do you get login messages int he logs for EclipseLink? -- No.
   
What are the contents of your WEB-INF/lib? -- There is no lib older
   under
WEB-INF in my sample app?
   
AppModule.java? -- Here is it (much the same as in the Hibernate /
   Tutorial
sample app).
(I didn't add any of the configuration code mentioned in the JPA
instructions as I understood this was needed only in XML-less JPA
configuration
   
package com.example.jpa.services;
   
import java.io.IOException;
   
import org.apache.tapestry5.*;
import org.apache.tapestry5.ioc.Configuration;
import org.apache.tapestry5.ioc.MappedConfiguration;
import org.apache.tapestry5.ioc.OrderedConfiguration;
import org.apache.tapestry5.ioc.ServiceBinder;
import org.apache.tapestry5.ioc.annotations.Contribute;
import org.apache.tapestry5.ioc.annotations.Local;
import org.apache.tapestry5.services.Request;
import org.apache.tapestry5.services.RequestFilter;
import org.apache.tapestry5.services.RequestHandler;
import org.apache.tapestry5.services.Response;
import org.slf4j.Logger;
   
/**
* This module is automatically included as part of the Tapestry IoC
Registry, it's a good place to
* configure and extend Tapestry, or to place your own service
   definitions.
*/
public 

Re: Issue while running Tapestry tutorial with JPA instead of Hibernate

2011-08-11 Thread Igor Drobiazko
On Thu, Aug 11, 2011 at 11:37 AM, mat -- mat...@gmail.com wrote:


 I can now run app with mvn jetty:run, but am getting this when
 http://localhost:8080/jpaapp/
 org.apache.tapestry5.internal.services.RenderQueueException
 Render queue error in SetupRender[Index:grid]: Failure reading parameter
 'source' of component Index:grid: Failed to create EntityManagerFactory for
 persistence unit 'DemoUnit'

 This occurs when using @PersistenceContext (unitName = DemoUnit) and the
 with-XML configuration file with persistence-unit name=DemoUnit. So
 presumably the two should match... Does this mean that the persistence.xml
 file is not found by the application?


Not sure what is the cause here. Some stacktrace is needed.



 When using the without-XML code as per the JPA doc, I am getting a
 different
 error:

 Caused by: java.lang.RuntimeException: Exception constructing service
 'EntityManagerSource': Error invoking service builder method
 org.apache.tapestry5.jpa.JpaModule.buildEntityManagerSource(Logger,
 Resource, PersistenceUnitConfigurer, Map, RegistryShutdownHub) (at
 JpaModule.java:94) (for service 'EntityManagerSource'):
 javax.naming.NameNotFoundException; remaining name 'jdbc/JPATest'


Make sure your containers provides the JNDI Datasource jdbc/JPATest


 Let me know if you want the full error stack

 Thanks

 Mat

  On Thu, Aug 11, 2011 at 9:42 AM, Igor Drobiazko
 igor.drobia...@gmail.comwrote:

  Are you sure you added tapestry-jpa dependency?
 
  On Thu, Aug 11, 2011 at 12:39 AM, mat -- mat...@gmail.com wrote:
 
  Two other questions, regarding the JPA integration doc:
  
   Q: Should one keep the tapestry-hibernate dependency when integrating
  with
   JPA: import org.apache.tapestry5.hibernate.annotations.CommitAfter? if
  not,
   how to resolve the @CommitAfter annotation?
  
 
  No, tapestry-hibernate is not needed.
 
 
   Q: should this service be seen in the Tapestry IoC Services Status?
  
 
   EntityManagerSource service should be visible as any other service.
 
  
   Mat
  
   On Wed, Aug 10, 2011 at 10:50 PM, Lenny Primak lpri...@hope.nyc.ny.us
   wrote:
  
If you are not getting the eclipse link login messages it's not going
  to
work.
The file is supposed to be in classpath/META-INF directory. Not
  web-inf.
Whatever your source package is just add META-INF To that.
   
Also what's your content of the WEB-INF/lib directory?  The lack or
incorrect libraries may also hurt you.
   
On Aug 10, 2011, at 2:03 PM, mat -- mat...@gmail.com wrote:
   
 Hi

 What's your persistence.xml look like? -- Here it it:
 (as per the JPA integration instruction)?

 ?xml version=1.0 encoding=UTF-8?
 persistence xmlns=http://java.sun.com/xml/ns/persistence;
 version=2.0
   persistence-unit name=DemoUnit
  transaction-type=RESOURCE_LOCAL
   properties
  property name=javax.persistence.jdbc.driver
value=org.h2.Driver /
  property name=javax.persistence.jdbc.url
value=jdbc:h2:mem:test /
  property name=javax.persistence.jdbc.username
value=sa /
  property name=eclipselink.ddl-generation
value=create-tables/
  property name=eclipselink.logging.level
value=fine/
  /properties
   /persistence-unit
 /persistence

 Where exactly should the persistence.xml file be located?
 In the doc it says: and is expected to be located on the classpath
  in
the *
 META-INF* directory. Is that under the WEB-INF directory?

 Do you get login messages int he logs for EclipseLink? -- No.

 What are the contents of your WEB-INF/lib? -- There is no lib
 older
under
 WEB-INF in my sample app?

 AppModule.java? -- Here is it (much the same as in the Hibernate /
Tutorial
 sample app).
 (I didn't add any of the configuration code mentioned in the JPA
 instructions as I understood this was needed only in XML-less JPA
 configuration

 package com.example.jpa.services;

 import java.io.IOException;

 import org.apache.tapestry5.*;
 import org.apache.tapestry5.ioc.Configuration;
 import org.apache.tapestry5.ioc.MappedConfiguration;
 import org.apache.tapestry5.ioc.OrderedConfiguration;
 import org.apache.tapestry5.ioc.ServiceBinder;
 import org.apache.tapestry5.ioc.annotations.Contribute;
 import org.apache.tapestry5.ioc.annotations.Local;
 import org.apache.tapestry5.services.Request;
 import org.apache.tapestry5.services.RequestFilter;
 import org.apache.tapestry5.services.RequestHandler;
 import org.apache.tapestry5.services.Response;
 import org.slf4j.Logger;

 /**
 * This module is automatically included as part of the Tapestry IoC
 Registry, it's a good place to
 * configure and extend Tapestry, or to 

Re: Is there a way to change tapestry.application-version value without redeploying the webapp ?

2011-08-11 Thread nillehammer
Hi,
if you have used contributeApplicationDefaults in your AppModule, no.

But you can externalize the values to web.xml by providing context
parameters with appropriate name. The context parameters will be picked up
by tapestry during startup.

So first delete the code in AppModule and then write the paramters into
web.xml. For tapestry.application-version this would be:
context-param
  param-nametapestry.application-version/param-name
  param-valueYORVERSION/param-value
context-param
Now, when you change this value in web.xml a context reload is necessary,
but no redeployment.

-
http://www.winfonet.eu
--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Is-there-a-way-to-change-tapestry-application-version-value-without-redeploying-the-webapp-tp4688726p4689241.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: IoC services - can they come from an external jar?

2011-08-11 Thread nillehammer
No, that's part of what Tapestry calls distributed configuration You can
define separate modules and pack them into separate jars. If you want them
used in your AppModule yo can do this in two ways:
Either use the @SubModule-annotation telling AppModule, what the other
module's class name is. Or pack a MANIFEST.MF with apropriate entry with
your jar. Tapestry will scan for that and find your module. Here you'll find
more detailed info:
http://tapestry.apache.org/tapestry-ioc-configuration.html

-
http://www.winfonet.eu
--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/IoC-services-can-they-come-from-an-external-jar-tp4688157p4689254.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: IoC services - can they come from an external jar?

2011-08-11 Thread nillehammer
My No is a bit ambigous ;-)) So: No they don't have to be in the same
jar/Yes, they can come from an external jar

-
http://www.winfonet.eu
--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/IoC-services-can-they-come-from-an-external-jar-tp4688157p4689260.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: IoC services - can they come from an external jar?

2011-08-11 Thread Thiago H. de Paula Figueiredo
On Thu, 11 Aug 2011 00:32:57 -0300, Chris Mylonas ch...@opencsta.org  
wrote:



Hi Tapestry Users,


Hi!


Using jumpstart's BusinessServicesLocator(BSL) and bind() -ing it in
AppModule.java I wondered if the BSL and it's interface can come from
another jar or does it have to be in the services directory?


Tapestry-IoC doesn't care at all about what package or JAR  you put your  
services.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, 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



Re: IoC services - can they come from an external jar?

2011-08-11 Thread Thiago H. de Paula Figueiredo
On Thu, 11 Aug 2011 08:45:44 -0300, nillehammer  
tapestry.nilleham...@winfonet.eu wrote:


No, that's part of what Tapestry calls distributed configuration You  
can define separate modules and pack them into separate jars.


Well, my definition of distributed configuration is different: it's the  
ability of more than one module class to contribute configuration for a  
given service. Spring and Tapestry-IoC have the ability of having  
different sources of configuration (modules) and packing them in different  
JARs, but only Tapestry-IoC has distributed configuration.


From http://tapestry.apache.org/tapestry-ioc-configuration.html: One of  
the key concepts in Tapestry IoC is distributed configuration. The  
distributed part refers to the fact that any module may configure a  
service. Distributed configuration is the key feature of Tapestry IoC that  
supports extensibility and modularity.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, 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



Re: Is there a way to change tapestry.application-version value without redeploying the webapp ?

2011-08-11 Thread Thiago H. de Paula Figueiredo
On Thu, 11 Aug 2011 04:48:33 -0300, Belot Thomas  
thomas.be...@santeos.com wrote:



Hi


Hi!

Is there a way to change tapestry.application-version value without  
redeploying the webapp ?


Symbols are not updateable at runtime.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, 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



RE: Is there a way to change tapestry.application-version value without redeploying the webapp ?

2011-08-11 Thread Belot Thomas
Thanks for your idea Nillehammer

But unfortunately this has already been done.

Regards 

Thomas

Thomas BELOT
thomas.be...@santeos.com
Tél :   +33 (0)3 20 60 93 81
Fax :   +33 (0)3 20 60 82 18


-Message d'origine-
De : nillehammer [mailto:tapestry.nilleham...@winfonet.eu] 
Envoyé : jeudi 11 août 2011 13:41
À : users@tapestry.apache.org
Objet : Re: Is there a way to change tapestry.application-version value 
without redeploying the webapp ?

Hi,
if you have used contributeApplicationDefaults in your AppModule, no.

But you can externalize the values to web.xml by providing context
parameters with appropriate name. The context parameters will be picked up
by tapestry during startup.

So first delete the code in AppModule and then write the paramters into
web.xml. For tapestry.application-version this would be:
context-param
  param-nametapestry.application-version/param-name
  param-valueYORVERSION/param-value
context-param
Now, when you change this value in web.xml a context reload is necessary,
but no redeployment.

-
http://www.winfonet.eu
--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Is-there-a-way-to-change-tapestry-application-version-value-without-redeploying-the-webapp-tp4688726p4689241.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





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



RE: Is there a way to change tapestry.application-version value without redeploying the webapp ?

2011-08-11 Thread Belot Thomas
Thanks for your answer Thiago

This is what I thought ... does anybody think this would be a good idea or 
should I just forget it  ?

Regards

Thomas

Thomas BELOT
thomas.be...@santeos.com
Tél :   +33 (0)3 20 60 93 81
Fax :   +33 (0)3 20 60 82 18


-Message d'origine-
De : Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] 
Envoyé : jeudi 11 août 2011 14:16
À : Tapestry users
Objet : Re: Is there a way to change tapestry.application-version value 
without redeploying the webapp ?

On Thu, 11 Aug 2011 04:48:33 -0300, Belot Thomas  
thomas.be...@santeos.com wrote:

 Hi

Hi!

 Is there a way to change tapestry.application-version value without  
 redeploying the webapp ?

Symbols are not updateable at runtime.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, 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





Re: IoC services - can they come from an external jar?

2011-08-11 Thread nillehammer
 Well, my definition of distributed configuration is different: it's the
 ability of more than one module class to contribute configuration for a
 given service.
Granted. And how that works is, what I was trying to explain in my first
reply to the question. I wanted to point out, that this feature goes far
beyond just having services in a different jar. Admiddetly my explanation
was a bit too clumsy or short.

-
http://www.winfonet.eu
--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/IoC-services-can-they-come-from-an-external-jar-tp4688157p4689361.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



Is there a way to get the current rendering component?

2011-08-11 Thread Barry Books
I'm implementing a selector binding for jQuery. I'd like to be able to
do something like

t:any${selector:this}/t:any

and have selector:this emit the html id of its container if it
supports getClientId().

I've look thru the docs and I can't find any easy way to do this. Did
I just overlook something or is there another way to do something like
this?

Thanks
Barry

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



Re: Is there a way to change tapestry.application-version value without redeploying the webapp ?

2011-08-11 Thread Thiago H. de Paula Figueiredo
On Thu, 11 Aug 2011 09:20:50 -0300, Belot Thomas  
thomas.be...@santeos.com wrote:


This is what I thought ... does anybody think this would be a good idea  
or should I just forget it  ?


Why do you want to change it?

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, 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



RE: Is there a way to change tapestry.application-version value without redeploying the webapp ?

2011-08-11 Thread Belot Thomas
Because we found out that some users were complaining about bugs which were 
in fact cause by au buggy proxy with caching enabled (external to our web app) 
and so we would like to be able to force all clients to reload their resources 
from the server side without any service disruption. We don’t mind if the 
modification takes 5 minutes to be fully active but we don't want to lose users 
connected to a server during the change (session replication is not enabled so 
a restart / redeploy causes our users to be switched to the backup server and 
disconnects them).

To achieve that a solution would be to be able to change tapestry's app-version 
which would cause resources path to be rewritten and re-downloaded.

Regards 

Thomas
-Message d'origine-
De : Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] 
Envoyé : jeudi 11 août 2011 15:33
À : Tapestry users; Belot Thomas
Objet : Re: Is there a way to change tapestry.application-version value 
without redeploying the webapp ?

On Thu, 11 Aug 2011 09:20:50 -0300, Belot Thomas  
thomas.be...@santeos.com wrote:

 This is what I thought ... does anybody think this would be a good idea  
 or should I just forget it  ?

Why do you want to change it?

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br




Re: strange situation

2011-08-11 Thread David Canteros
Hi, thank you for your quick response.
My question was just out of curiosity because this behavior happens seldom
and this brings me no major problems .  It is rarely because there are other
projects  (developed with other frameworks) deployed on that server and the
strange page only appear with  tapestry applications. I'll try with tap
5.2.6

Thank you again!

David

--
David Germán Canteros


2011/8/10 Howard Lewis Ship hls...@gmail.com

 I believe this was a bug where under certain circumstances, a corrupt
 GZIP stream of page content would be streamed to the client; this is
 fixed in 5.2.6 for sure, but I thought it was fixed in 5.2.5 as well.

 Failing that, you need to be sure its Tapestry generating the corrupt
 content, rather than some other server in the middle (perhaps a
 firewall).  This isn't about shifting the blame, but merely about
 understanding the problem before looking for a fix.

 On Wed, Aug 10, 2011 at 1:56 PM, David Canteros
 davidcanteros@gmail.com wrote:
  Hi!
   I have a strange situation to share with you: a weird page appear
 when
  some users try to load some page of my tapestry application:  a lot of
  strange symbols appear instead of the correct page. But if they try again
  (or if they reload the page with F5) the correct page appear. This happen
  very rarely and I can not reproduce it... I have attached a screenshot
 for
  review. Just out of curiosity, has this ever happened to anyone else?‎
 
  Tapestry version: 5.2.5
  Server: Tomcat 6
  Browser: Firefox 4
 
  --
  David Germán Canteros
 
 
  -
  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




Missing ValueEncoder for java.util.Calendar

2011-08-11 Thread Eric Torti
Hello, guys!

I have a beaneditform that's used to create and update instances of one of
the models on my app. When it's used to create and persist the instaces I
have no problem. But when it comes to editing them as on
domain.com/project/somebean/edit/10, instead of rendereing the form with the
loaded properties, the page displays an error regarding the absence of a
value encoder for java.util.Calendar.

Naturally, the bean I'm trying to update has a Calendar property.

Do I have to provide a value encoder for Calendar, or am I missing something
on the configuration of the project? I've searched around the docs but
didn't quite get it.

I could provide source if you find it to be appropriate.

Thanks,

Eric Torti


Re: how to user jquery 1.5.1

2011-08-11 Thread thana
Thank you Emmanuel!

I solved it by upgrading to 2.1.2-Snapshot., (build nr 9) 

Then i got js script compability probelm on tinymc for IE 9. 

Ticket: Ticket #11690 -
http://dev.plone.org/plone/ticket/11690?action=diffversion=19
But this issue is not resolved jet., 
Finally I ended setting IE Page Default to IE-8., so that ie-9 newer loades.
I know this is not the best solution but its just a temp. solution util
#11690 is fixed. 




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/how-to-user-jquery-1-5-1-tp4682784p4689800.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: strange situation

2011-08-11 Thread Thiago H. de Paula Figueiredo
On Thu, 11 Aug 2011 11:32:59 -0300, David Canteros  
davidcanteros@gmail.com wrote:



Hi, thank you for your quick response.
My question was just out of curiosity because this behavior happens  
seldom and this brings me no major problems .  It is rarely because  
there are other projects  (developed with other frameworks) deployed on  
that server and the strange page only appear with  tapestry applications.


Only Tapestry (maybe some other framework too) automatically compresses  
responses, so this is not strange. ;) It could be a Tomcat problem too.
You can disable response compression by setting the  
tapestry.gzip-compression-enabled symbol to false.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, 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



Re: Missing ValueEncoder for java.util.Calendar

2011-08-11 Thread Thiago H. de Paula Figueiredo

On Thu, 11 Aug 2011 11:50:20 -0300, Eric Torti ericzu...@gmail.com wrote:


Hello, guys!


Hi!

Do I have to provide a value encoder for Calendar, or am I missing  
something on the configuration of the project? I've searched around the  
docs but

didn't quite get it.


As far as I know having editable class fields with Calendar type is quite  
rare (java.util.Date used instead), so that's probably why Tapestry  
doesn't provide a ValueEncoder for it out-of-the-box..


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, 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



Re: Missing ValueEncoder for java.util.Calendar

2011-08-11 Thread Eric Torti
Thank you, Thiago!

Normally I prefer to use Calendar, so I'll try to provide a value encoder
for that type on my project. Do you know of any implementation for that or
something similar? I've googled it with no success :]

On Thu, Aug 11, 2011 at 12:36 PM, Thiago H. de Paula Figueiredo 
thiag...@gmail.com wrote:

 On Thu, 11 Aug 2011 11:50:20 -0300, Eric Torti ericzu...@gmail.com
 wrote:

  Hello, guys!


 Hi!


  Do I have to provide a value encoder for Calendar, or am I missing
 something on the configuration of the project? I've searched around the docs
 but
 didn't quite get it.


 As far as I know having editable class fields with Calendar type is quite
 rare (java.util.Date used instead), so that's probably why Tapestry doesn't
 provide a ValueEncoder for it out-of-the-box..

 --
 Thiago H. de Paula Figueiredo
 Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
 and instructor
 Owner, Ars Machina Tecnologia da Informação Ltda.
 http://www.arsmachina.com.br

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




Re: ANN: Tapestry-tagselect version 1.0 released

2011-08-11 Thread George Christman
Excellent, thanks for incorporating that feature. I have encountered a few
bugs though.

1. When using a value encoder, the component seams to be adding the label
string value to the hidden field rather than the string id provided by the
value encoder. 

lt;input id=quot;commentators-valuesquot; type=quot;hiddenquot;
name=quot;commentators-valuesquot; value=quot;George 
lt;gm...@myemail.orggt; ;Charlie lt;char...@myemail.orggt; 

This results in the following error 
Caused by: org.apache.tapestry5.ioc.util.UnknownValueException: Could not
find a coercion from type java.lang.String to type
org.company.eprs.entities.ApplicationUser.

2. The duplicated textarea's seemed to be a result of my auto resizing
textarea script. Resolved

3. A new issue has been created with greater than less than now. 

   George Christman lt;g...@myemail.orggt; lt;/g...@myemail.orggt;


Couple enhancements I feel could add more value and flexibility to the
component. 

1. I think adding a vertical parameter that takes a boolean would be a nice
addition. This would allow the component to either display the box's
horizontally as is, or if vertical == true, display the input fields with
the box's vertically,  Similar to the Facebook language selection under
edit profile.

2. Giving the component the ability to use a comma to add new items that may
not be contained within the autocomplete selection would be a great
addition. This would be useful when using the component with email. 

Thanks Joakim, excellent job. 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4690017.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: Missing ValueEncoder for java.util.Calendar

2011-08-11 Thread Thiago H. de Paula Figueiredo

On Thu, 11 Aug 2011 12:45:16 -0300, Eric Torti ericzu...@gmail.com wrote:


Thank you, Thiago!


You're welcome!


Normally I prefer to use Calendar, so I'll try to provide a value encoder
for that type on my project. Do you know of any implementation for that  
or something similar? I've googled it with no success :]


Just read the ValueEncoder JavaDoc implementation. That's everything you  
need.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, 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



T5.2.6: Activate called twice

2011-08-11 Thread nillehammer
Hi List,

I've never really used onActivate so I did not care about how often it would
be called... up to today. I have a single onActivate(EventContext context)
and corresponding onPassivate in my page class and use the context to load
som data from the db. I suddenly realized that onActivate allways get's
called twice.

The first thing I have done to fix this, was double checking all my
css/js/tml/java files for usage of relative URLs, as suggested by Thiago in
this thread:
http://tapestry.1045711.n5.nabble.com/t5-onActivate-called-twice-td2429079.html#a2429087
Without success

Then I thought some unseen redirects could be the cause. I installed
HTTP-Live Headers plugin in FF5 to observe the HTTP headers. No redirects
sent. CSS-files and images are cached and the only GET-request for the page
ittself is answered with HTTP OK.

Where else could I look?

Thanks in advance

-
http://www.winfonet.eu
--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-2-6-Activate-called-twice-tp4690554p4690554.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: Missing ValueEncoder for java.util.Calendar

2011-08-11 Thread Eric Torti
Hi, Thiago,

I'm tackling the construction of a Calendar Value Enconder and, as you've
said it, the javadocs are pretty much it :]

I didn't get though how do I address localization issues. For example, if
the String received as a parameter for the toValue(...) method and it is
formatted according to pt_BR the month will be in place of the day regarding
the default behavior as localized by en_US.

Is it the best approach to implement the value encoder to address Strings as
en_US formatted?

Thanks again,

Eric Torti

On Thu, Aug 11, 2011 at 2:28 PM, Thiago H. de Paula Figueiredo 
thiag...@gmail.com wrote:

 On Thu, 11 Aug 2011 12:45:16 -0300, Eric Torti ericzu...@gmail.com
 wrote:

  Thank you, Thiago!


 You're welcome!


  Normally I prefer to use Calendar, so I'll try to provide a value encoder
 for that type on my project. Do you know of any implementation for that or
 something similar? I've googled it with no success :]


 Just read the ValueEncoder JavaDoc implementation. That's everything you
 need.


 --
 Thiago H. de Paula Figueiredo
 Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
 and instructor
 Owner, Ars Machina Tecnologia da Informação Ltda.
 http://www.arsmachina.com.br

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




Re: T5.2.6: Activate called twice

2011-08-11 Thread Kalle Korhonen
Are you instantiating (injecting) the page somewhere? onActive is
called called once when required, you have to tell more about your
case if you want reasonable answers.

Kalle


On Thu, Aug 11, 2011 at 11:44 AM, nillehammer
tapestry.nilleham...@winfonet.eu wrote:
 Hi List,

 I've never really used onActivate so I did not care about how often it would
 be called... up to today. I have a single onActivate(EventContext context)
 and corresponding onPassivate in my page class and use the context to load
 som data from the db. I suddenly realized that onActivate allways get's
 called twice.

 The first thing I have done to fix this, was double checking all my
 css/js/tml/java files for usage of relative URLs, as suggested by Thiago in
 this thread:
 http://tapestry.1045711.n5.nabble.com/t5-onActivate-called-twice-td2429079.html#a2429087
 Without success

 Then I thought some unseen redirects could be the cause. I installed
 HTTP-Live Headers plugin in FF5 to observe the HTTP headers. No redirects
 sent. CSS-files and images are cached and the only GET-request for the page
 ittself is answered with HTTP OK.

 Where else could I look?

 Thanks in advance

 -
 http://www.winfonet.eu
 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/T5-2-6-Activate-called-twice-tp4690554p4690554.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



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



Re: ANN: Tapestry-tagselect version 1.0 released

2011-08-11 Thread Joakim Olsson
Good catch on the first point. It's fixed now and pushed to GitHub.

Can you describe the problem in point 3 a bit? And if you could create
issues at GitHub for the enhancements would be great.

Regards,
Joakim


On Thu, Aug 11, 2011 at 5:58 PM, George Christman
gchrist...@cardaddy.com wrote:
 Excellent, thanks for incorporating that feature. I have encountered a few
 bugs though.

 1. When using a value encoder, the component seams to be adding the label
 string value to the hidden field rather than the string id provided by the
 value encoder.

 lt;input id=quot;commentators-valuesquot; type=quot;hiddenquot;
 name=quot;commentators-valuesquot; value=quot;George
 lt;gm...@myemail.orggt; ;Charlie lt;char...@myemail.orggt; 

 This results in the following error
 Caused by: org.apache.tapestry5.ioc.util.UnknownValueException: Could not
 find a coercion from type java.lang.String to type
 org.company.eprs.entities.ApplicationUser.

 2. The duplicated textarea's seemed to be a result of my auto resizing
 textarea script. Resolved

 3. A new issue has been created with greater than less than now.

       George Christman lt;g...@myemail.orggt; lt;/g...@myemail.orggt;


 Couple enhancements I feel could add more value and flexibility to the
 component.

 1. I think adding a vertical parameter that takes a boolean would be a nice
 addition. This would allow the component to either display the box's
 horizontally as is, or if vertical == true, display the input fields with
 the box's vertically,  Similar to the Facebook language selection under
 edit profile.

 2. Giving the component the ability to use a comma to add new items that may
 not be contained within the autocomplete selection would be a great
 addition. This would be useful when using the component with email.

 Thanks Joakim, excellent job.

 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4690017.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



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



Re: ANN: Tapestry-tagselect version 1.0 released

2011-08-11 Thread George Christman
Great, I just started looking into repairing the bug... you beat me to it :)

Yep I was thinking the samething with github. 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4690665.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: T5.2.6: Activate called twice

2011-08-11 Thread Thiago H. de Paula Figueiredo
On Thu, 11 Aug 2011 15:44:51 -0300, nillehammer  
tapestry.nilleham...@winfonet.eu wrote:



Hi List,


Hi!


I suddenly realized that onActivate allways get's
called twice.


Have you checked what context values does onActivate() get in these two  
requests?


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, 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



Re: Missing ValueEncoder for java.util.Calendar

2011-08-11 Thread Thiago H. de Paula Figueiredo

On Thu, 11 Aug 2011 15:48:55 -0300, Eric Torti ericzu...@gmail.com wrote:


Hi, Thiago,


Hi! :)


I'm tackling the construction of a Calendar Value Enconder and, as you've
said it, the javadocs are pretty much it :]


;)


I didn't get though how do I address localization issues. For example, if
the String received as a parameter for the toValue(...) method and it is
formatted according to pt_BR the month will be in place of the day  
regarding the default behavior as localized by en_US.
Is it the best approach to implement the value encoder to address  
Strings as en_US formatted?


I guess so.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, 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



Re: ANN: Tapestry-tagselect version 1.0 released

2011-08-11 Thread Joakim Olsson
Just thought a little on enhancement number one. One possible way to
solve this (not exactly like facebook though) is to add the following
CSS;
.u-tagselect .u-tag-container .u-tags .u-tag {
  clear: both;
}

Maybe with some CSS id-specifier if you don't want all tagselects to
behave the same way.

Regards,
Joakim


On Thu, Aug 11, 2011 at 5:58 PM, George Christman
gchrist...@cardaddy.com wrote:
 Excellent, thanks for incorporating that feature. I have encountered a few
 bugs though.

 1. When using a value encoder, the component seams to be adding the label
 string value to the hidden field rather than the string id provided by the
 value encoder.

 lt;input id=quot;commentators-valuesquot; type=quot;hiddenquot;
 name=quot;commentators-valuesquot; value=quot;George
 lt;gm...@myemail.orggt; ;Charlie lt;char...@myemail.orggt; 

 This results in the following error
 Caused by: org.apache.tapestry5.ioc.util.UnknownValueException: Could not
 find a coercion from type java.lang.String to type
 org.company.eprs.entities.ApplicationUser.

 2. The duplicated textarea's seemed to be a result of my auto resizing
 textarea script. Resolved

 3. A new issue has been created with greater than less than now.

       George Christman lt;g...@myemail.orggt; lt;/g...@myemail.orggt;


 Couple enhancements I feel could add more value and flexibility to the
 component.

 1. I think adding a vertical parameter that takes a boolean would be a nice
 addition. This would allow the component to either display the box's
 horizontally as is, or if vertical == true, display the input fields with
 the box's vertically,  Similar to the Facebook language selection under
 edit profile.

 2. Giving the component the ability to use a comma to add new items that may
 not be contained within the autocomplete selection would be a great
 addition. This would be useful when using the component with email.

 Thanks Joakim, excellent job.

 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4690017.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



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



Re: T5.2.6: Activate called twice

2011-08-11 Thread Howard Lewis Ship
This is almost always due to a bad img URL; the browser gets the
URL, there's no actual file, it ends up invoking the Index page
passing the bad path as activation context.

On Thu, Aug 11, 2011 at 12:42 PM, Thiago H. de Paula Figueiredo
thiag...@gmail.com wrote:
 On Thu, 11 Aug 2011 15:44:51 -0300, nillehammer
 tapestry.nilleham...@winfonet.eu wrote:

 Hi List,

 Hi!

 I suddenly realized that onActivate allways get's
 called twice.

 Have you checked what context values does onActivate() get in these two
 requests?

 --
 Thiago H. de Paula Figueiredo
 Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and
 instructor
 Owner, 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





-- 
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



Re: T5.2.6: Activate called twice

2011-08-11 Thread nillehammer
Hi guys,

Thanks for the replies. In fact I had some img tags with no src-attribute as
a placeholder for the designers to deliver their content. I replaced them
now with properly styled divs. Although what was strange, they were on
totally different pages. So I could not imagine them being the reason for
such trouble. And indeed they did not cause the trouble.

In fact my activate method IS just called ONCE. I somehow managed to
misconfigure my logging system in a way that every message gets logged
twice. I was fooled by that. I checked by replacing the log statements with
ordinary System.out.printlns and tadaa everythin works as expected.

Now for the logging configuration... but I wouldn't dare to badger you with
that...

-
http://www.winfonet.eu
--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-2-6-Activate-called-twice-tp4690554p4691473.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: T5.2.6: Activate called twice

2011-08-11 Thread nillehammer
Just for the records:
NEVER do that: log4j.rootCategory=info, A1
That will cause every message to be logged twice. I had managed that by
misconfiguring maven resource filtering...

-
http://www.winfonet.eu
--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-2-6-Activate-called-twice-tp4690554p4691543.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: tapestry-security and sso

2011-08-11 Thread Vangel V. Ajanovski
Sorry for late answer - we use CAS at our institution and I found it is 
very easy to front Tapestry with CAS even from scratch.


Some 2-3 years ago I found a tutorial on the web how to do that with 
help of Spring Security (previuosly named Acegi), but later I learned a 
bit how to do it from scratch because I don't want Spring wasting more 
resources.


Basically there exists a ready to use CAS SSO filter that you include in 
the project and configure (let's say via dependency in pom.xml and 
config in web.xml) so that it will be called before a set of pages that 
you need to protect.


So, how it works?

The filter will check for tickets and if you are logged in it will pass 
you to the page, otherwise will redirect to the cas login address.


In your application you just check the REMOTE_USER variable which will 
be set to the username of the logged in user. This is set by the CAS 
filter and will only be set if someone is logged in. Very simple.


Check here for examples from our students information system 
(enrollment, grades, courses):

http://develop.ii.edu.mk/projects/isii/browser/trunk

Especially check for CAS references in:
pom.xml
web.xml
mk.edu.ii.isii.upisi.model.UserInfo

UserInfo is a sessionstate object that we keep arround in the session 
that holds who is logged in and what role, etc.


Of course since CAS is only for authentication (login logout), we 
implemented some access control by checking the logged in user in the 
database and using annotations (ex. @AdministratorPage) placed on page 
classes for various roles. The access controller only allows access if 
the page is accessed by a username that has the appropriate role. For 
this check:


mk.edu.ii.isii.upisi.model.UserInfo
mk.edu.ii.isii.upisi.services.AccessController
mk.edu.ii.isii.upisi.annotations...

Of course comments are welcome by anyone, especially regarding how to 
better the solution security-wise.




smime.p7s
Description: S/MIME Cryptographic Signature


T5 Tapestry.Initializer's function

2011-08-11 Thread dick_hu
I create a mixins A with the js Tapestry.Initializer.Rocker
Now I create another mixins B,How can I use the 
Tapestry.Initializer.Rocker
in B's js
AnyOne can help me 
Thanks a lot

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Tapestry-Initializer-s-function-tp4691890p4691890.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: T5 Tapestry.Initializer's function

2011-08-11 Thread Taha Hafeez
Just import the same js file using @Import and then use
javaScriptSupport.addInitializerCall(Rocker, params_if_any)

On Fri, Aug 12, 2011 at 8:23 AM, dick_hu dickan...@gmail.com wrote:
 I create a mixins A with the js Tapestry.Initializer.Rocker
 Now I create another mixins B,How can I use the
 Tapestry.Initializer.Rocker
 in B's js
 AnyOne can help me
 Thanks a lot

 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/T5-Tapestry-Initializer-s-function-tp4691890p4691890.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





-- 
Regards

Taha Hafeez Siddiqi (tawus)
http://tawus.wordpress.com

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



Re: T5 Tapestry.Initializer's function

2011-08-11 Thread dick_hu
I use the two mixins in a page 
so the two js are already imported, I try to use one mixins's js funtion in
another mixins's js 

eg:
Tapestry.Initializer.Rocker1 = fucntion(){
  var f1 = function(){
 
  }
}

Tapestry.Initializer.Rocker2 = fucntion(){
// I want use the Rocker1's f1 
}

Howcan I do?

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Tapestry-Initializer-s-function-tp4691890p4692065.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: T5 Tapestry.Initializer's function

2011-08-11 Thread Taha Hafeez
It is defined as local to the initializer.Rocker1 function and can't
be accessed outside it. if the function is generic enough just put it
in a separate js and include that in both mixins.

On Fri, Aug 12, 2011 at 9:42 AM, dick_hu dickan...@gmail.com wrote:
 I use the two mixins in a page
 so the two js are already imported, I try to use one mixins's js funtion in
 another mixins's js

 eg:
 Tapestry.Initializer.Rocker1 = fucntion(){
  var f1 = function(){

  }
 }

 Tapestry.Initializer.Rocker2 = fucntion(){
    // I want use the Rocker1's f1
 }

 Howcan I do?

 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/T5-Tapestry-Initializer-s-function-tp4691890p4692065.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





-- 
Regards

Taha Hafeez Siddiqi (tawus)
http://tawus.wordpress.com

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