Re: [t5] Problems with grid in a loop

2010-12-02 Thread forum

I am also same kind of the issue let me explain 

Currently we are working on a report generation. We are facing an issue with
pagination using tapestry grid component.

For a given date search criteria (1-Nov-2010 to 2-Nov-2010). We are using a
tapestry “Loop” component to iterate over the date range list, which
internally contains the list of transactions per day that is being displayed
using the grid component.

Here the grid component is configured with “rowsPerPage=5” for the
pagination.

• Assume for 1-Nov-2010, there are 11 rows, i.e., displays [1, 2 , 3]
pagination links. Here the pagination works as expected.

• For 2-Nov-2010, there are 21 rows, i.e., displays [1, 2, 3, 4, 5]
pagination links. But here on click of pagination link 4 and 5, it doesn’t
list out the next set of rows.

In the initial investigation we observed that first grid pagination always
takes the precedence over the other grids pagination.

Would like to know, if there any other configuration available to resolve
this issue or is there any any other approach/solution is there to overcome
this problem.



t:loop source=reports value=report encoder=reportEncoder
t:grid source=report.reportObjects row=reportObject lean=true
inPlace=false rowsPerPage=5 pagerPosition=bottom class=decora
include=name, age, country, city
t:parameter name=nameCell${name}/t:parameter
t:parameter name=countryCell${country}/t:parameter
t:parameter name=cityCell${city}/t:parameter
/t:grid
/t:loop

-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t5-Problems-with-grid-in-a-loop-tp3173508p3288953.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



T5.1 - dynamically generated pop-up dialogue box

2010-12-02 Thread Richard Hill

Hi All,

I have a draggable pop-up dialogue box which is generated dynamically in
javascript when a user clicks a link/button.

I want this to contain a couple of components - at the moment I have
them in their own T5 page which I am loading as an iframe in the
dialogue box. But this isn't great - loading the iframe is a little
slow, and dragging the box around becomes very jittery. 

So ideally I don't want to use an iframe, but something ajax, i.e a
zone. However as the dialogue is dynamically generated, how can I bind
what's in there with the page? Should I have a hidden zone on the page
which I attach to my dialogue? 

Thanks,

Richard.

 


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



Re: T5.1 - dynamically generated pop-up dialogue box

2010-12-02 Thread Everton Agner
Check out ChenilleKit http://www.chenillekit.org/

You might get what you want with the Window component - demo here :
http://www.chenillekit.org/demo/tapcomp/windowdemo#

But i believe it would be better to abstract this set of components which
appear in your dialog box in a single component, specially if you need them
in a couple of different places...

___
Everton Agner Ramos


2010/12/2 Richard Hill r...@su3analytics.com


 Hi All,

 I have a draggable pop-up dialogue box which is generated dynamically in
 javascript when a user clicks a link/button.

 I want this to contain a couple of components - at the moment I have
 them in their own T5 page which I am loading as an iframe in the
 dialogue box. But this isn't great - loading the iframe is a little
 slow, and dragging the box around becomes very jittery.

 So ideally I don't want to use an iframe, but something ajax, i.e a
 zone. However as the dialogue is dynamically generated, how can I bind
 what's in there with the page? Should I have a hidden zone on the page
 which I attach to my dialogue?

 Thanks,

 Richard.




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




Re: T5.1 - dynamically generated pop-up dialogue box

2010-12-02 Thread Thiago H. de Paula Figueiredo
On Thu, 02 Dec 2010 08:32:51 -0200, Richard Hill r...@su3analytics.com  
wrote:



Hi All,


Hi!


So ideally I don't want to use an iframe, but something ajax, i.e a
zone. However as the dialogue is dynamically generated, how can I bind
what's in there with the page? Should I have a hidden zone on the page
which I attach to my dialogue?


I've seen this approach used with success.

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



translators in 5.2, and re-use as formatters

2010-12-02 Thread Paul Stanton

Hi,

in 5.0 you used to be able to define and refer to Translators by name:

public static void 
contributeTranslatorSource(ConfigurationTranslator configuration)

{
configuration.add(new MyTranslator(Decimal));
configuration.add(new MyTranslator(Decimal2Dp));
}

I could then use t:textfield ... t:translator=Decimal / for example.

however in 5.2 you associate a translator to a type:

public static void 
contributeTranslatorSource(MappedConfigurationClass, Translator 
configuration)

{
configuration.add(Date.class, new DateTranslator(Date));
configuration.add(Date.class, new DateTranslator(DateTime));
}

but this causes an exception:
Service contribution (to service 'TranslatorSource') conflicts with 
existing contribution


I assume because they are mapped to the same class.

How do I associate more than one Translator to a type?

Also, now that I have created all these fancy translators is there any 
way to use them as formatters as well?


so that I can do t:output ... formatter=trans:Date / or similar?

thanks, p.

ps I can't find the 5.2 version of the userguides

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



Re: First Tapestry app with Hibernate

2010-12-02 Thread robnangle

Hi Angelo,
Unfortunetly adding that in failed to fix or progress the error im
receiving.
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/First-Tapestry-app-with-Hibernate-tp3285845p3289356.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



Tapestry-Hibernate

2010-12-02 Thread robnangle

Hi all,
Ive tried one or two example projects with tapestry and hibernate but cant
seem to get the hibernate part working. Is there any extremely basic ones
out there that anyone would recommend?

Cheers
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-Hibernate-tp3289396p3289396.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: First Tapestry app with Hibernate

2010-12-02 Thread Angelo C.

try Tapestry 5.1.0.5, here is pom file to test:


project xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns=http://maven.apache.org/POM/4.0.0;
modelVersion4.0.0/modelVersion
groupIdlearning/groupId
artifactIdtutorial1/artifactId
version1.0-SNAPSHOT/version
packagingwar/packaging
nametutorial1 Tapestry 5 Application/name
dependencies
dependency
groupIdorg.apache.tapestry/groupId
artifactIdtapestry-core/artifactId
version${tapestry-release-version}/version
/dependency
!-- A dependency on either JUnit or TestNG is required, or the
surefire plugin (which runs the tests)
will fail, preventing Maven from packaging the WAR. Tapestry includes a
large number
of testing facilities designed for use with TestNG (http://testng.org/), so
it's recommended. --
dependency
groupIdorg.testng/groupId
artifactIdtestng/artifactId
version5.8/version
classifierjdk15/classifier
scopetest/scope
/dependency

dependency
groupIdorg.easymock/groupId
artifactIdeasymock/artifactId
version2.4/version
scopetest/scope
/dependency

dependency
groupIdorg.apache.tapestry/groupId
artifactIdtapestry-hibernate/artifactId
version${tapestry-release-version}/version
/dependency

dependency
groupIdorg.hibernate/groupId
artifactIdhibernate/artifactId
version3.2.2.ga/version
/dependency

dependency
groupIdc3p0/groupId
artifactIdc3p0/artifactId
version0.9.1.2/version
/dependency

dependency
groupIdgeronimo-spec/groupId
artifactIdgeronimo-spec-jta/artifactId
version1.0-M1/version
scopetest/scope
/dependency

dependency
groupIdorg.hibernate/groupId
artifactIdhibernate-annotations/artifactId
version3.2.1.ga/version
/dependency

dependency
groupIdmysql/groupId
artifactIdmysql-connector-java/artifactId
version5.1.12/version
/dependency


dependency
  groupIdcommons-collections/groupId
  artifactIdcommons-collections/artifactId
  version3.1/version
/dependency

!-- tapestry-test will conflict with RunJettyRun inside Eclipse.
tapestry-test brings in Selenium, which
 is based on Jetty 5.1; RunJettyRun uses Jetty 6.
dependency
groupIdorg.apache.tapestry/groupId
artifactIdtapestry-test/artifactId
version${tapestry-release-version}/version
scopetest/scope
/dependency

--

!-- Provided by the servlet container, but sometimes referenced in
the application
   code. --
dependency
groupIdjavax.servlet/groupId
artifactIdservlet-api/artifactId
version2.5/version
scopeprovided/scope
/dependency

/dependencies
build
finalNametutorial1/finalName
plugins
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-compiler-plugin/artifactId
configuration
source1.5/source
target1.5/target
optimizetrue/optimize
/configuration
/plugin

!-- Run the application using mvn jetty:run --
plugin
groupIdorg.mortbay.jetty/groupId
artifactIdmaven-jetty-plugin/artifactId
version6.1.9/version
configuration
!-- Log to the console. --
requestLog
implementation=org.mortbay.jetty.NCSARequestLog
!-- This doesn't do anything for Jetty, but is a
workaround for a Maven bug
 that prevents the requestLog from being set.
--
appendtrue/append
/requestLog
/configuration
/plugin
/plugins
/build

reporting

!-- Adds a report detailing the components, mixins and base classes
defined by this module. --
plugins

/plugins
/reporting

repositories

!-- This repository is only needed if the Tapestry released
artifacts haven't made it to the central Maven repository yet. --
repository
idtapestry/id
urlhttp://tapestry.formos.com/maven-repository//url
/repository

!-- This repository is only needed when the
tapestry-release-version is a snapshot release. --
repository
idtapestry-snapshots/id

Re: First Tapestry app with Hibernate

2010-12-02 Thread robnangle

Thanks for that angelo but no luck.

Same two errors as from the begining.
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/First-Tapestry-app-with-Hibernate-tp3285845p3289417.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: First Tapestry app with Hibernate

2010-12-02 Thread Juan E. Maya
Rob, the problem u have is because tomcat is not finding those classes
in the classpath. How do u launch ur tomcat? if u want to work with
tomcat u might want to follow Kalle's guide so u r sure that there r
no problems in ur development environment. Here is the guide:
http://tynamo.org/Developing+with+Tomcat+and+Eclipse



On Thu, Dec 2, 2010 at 3:06 PM, robnangle robnan...@gmail.com wrote:

 Thanks for that angelo but no luck.

 Same two errors as from the begining.
 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/First-Tapestry-app-with-Hibernate-tp3285845p3289417.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: First Tapestry app with Hibernate

2010-12-02 Thread Andreas Andreou
Can you compile/run the project from the command line?

What happens when you do mvn jetty:run ?

On Thu, Dec 2, 2010 at 16:06, robnangle robnan...@gmail.com wrote:

 Thanks for that angelo but no luck.

 Same two errors as from the begining.
 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/First-Tapestry-app-with-Hibernate-tp3285845p3289417.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





-- 
Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
Tapestry PMC / Tacos developer
Open Source / JEE Consulting

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



Re: Tapestry-Hibernate

2010-12-02 Thread Everton Agner
What is the error you're getting?

Btw, could you stick on one of your mails? It seems that there's 3 mails
with the same issue.

___
Everton Agner Ramos


2010/12/2 robnangle robnan...@gmail.com


 Hi all,
 Ive tried one or two example projects with tapestry and hibernate but cant
 seem to get the hibernate part working. Is there any extremely basic ones
 out there that anyone would recommend?

 Cheers
 --
 View this message in context:
 http://tapestry.1045711.n5.nabble.com/Tapestry-Hibernate-tp3289396p3289396.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: First Tapestry app with Hibernate

2010-12-02 Thread Richard Hill

Yes tomcat needs most (all?) of your project's dependencies on it's
classpath.

I recently switched to run-jetty-run and it's been a bit of a
revelation. No messy classpath issues and live class reloading which a)
really speeds up dev time (changes to .tml and .java are near instant)
and b) also means your session doesn't keep getting trashed every time
tomcat restarts to effect a change.



-Original Message-
From: Juan E. Maya maya.j...@gmail.com
Reply-to: Tapestry users users@tapestry.apache.org
To: Tapestry users users@tapestry.apache.org
Subject: Re: First Tapestry app with Hibernate
Date: Thu, 2 Dec 2010 15:39:55 +0100

Rob, the problem u have is because tomcat is not finding those classes
in the classpath. How do u launch ur tomcat? if u want to work with
tomcat u might want to follow Kalle's guide so u r sure that there r
no problems in ur development environment. Here is the guide:
http://tynamo.org/Developing+with+Tomcat+and+Eclipse



On Thu, Dec 2, 2010 at 3:06 PM, robnangle robnan...@gmail.com wrote:

 Thanks for that angelo but no luck.

 Same two errors as from the begining.
 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/First-Tapestry-app-with-Hibernate-tp3285845p3289417.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




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



Re: First Tapestry app with Hibernate

2010-12-02 Thread robnangle

I create my project through the command:
mvn archetype:generate
-DarchetypeCatalog=http://tapestry.formos.com/maven-repository

then to import it into eclipse:
mvn eclipse:eclipse sysdeo-tomcat:generate

i also start the server in eclipse
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/First-Tapestry-app-with-Hibernate-tp3285845p3289543.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: First Tapestry app with Hibernate

2010-12-02 Thread Thiago H. de Paula Figueiredo

On Thu, 02 Dec 2010 13:26:48 -0200, robnangle robnan...@gmail.com wrote:


I create my project through the command:
mvn archetype:generate
-DarchetypeCatalog=http://tapestry.formos.com/maven-repository


It should be http://tapestry.apache.org. You're probably getting a very  
old version, as that repository isn't used for months.



then to import it into eclipse:
mvn eclipse:eclipse sysdeo-tomcat:generate


Do yourself a favor: use m2eclipse and use RunJettyRun or jetty:run to run  
the application, as least when you're still getting started.

Your problems are due to lacking packages in your classpath.

--
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: T5 page request return blank layout under heavy load test

2010-12-02 Thread dennisdeo81

Turn out to be -XX:+UseCompressedOops cause the problem. Problem solved.
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-page-request-return-blank-layout-under-heavy-load-test-tp3277134p3289579.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: First Tapestry app with Hibernate

2010-12-02 Thread Andreas Andreou
Also, because you import th project this way, if you change your pom,
you have to reimport the project again

On Thu, Dec 2, 2010 at 17:30, Thiago H. de Paula Figueiredo
thiag...@gmail.com wrote:
 On Thu, 02 Dec 2010 13:26:48 -0200, robnangle robnan...@gmail.com wrote:

 I create my project through the command:
 mvn archetype:generate
 -DarchetypeCatalog=http://tapestry.formos.com/maven-repository

 It should be http://tapestry.apache.org. You're probably getting a very old
 version, as that repository isn't used for months.

 then to import it into eclipse:
 mvn eclipse:eclipse sysdeo-tomcat:generate

 Do yourself a favor: use m2eclipse and use RunJettyRun or jetty:run to run
 the application, as least when you're still getting started.
 Your problems are due to lacking packages in your classpath.

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





-- 
Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
Tapestry PMC / Tacos developer
Open Source / JEE Consulting

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



JPA EntityManager injection (Spring Roo + Tapestry)

2010-12-02 Thread Matheus Eduardo Machado Moreira
   Hi!

   I'm building a proof of concept app using Tapestry + Spring Roo and am
having a little trouble trying to inject the JPA EntityManager (or
EntityManagerFactory) into one of my contribute (AppModule) methods.

   The method signature is
contributeValueEncoderSource(MappedConfiguration(Class,
ValueEncoderFactory), EntityManager, TypeCoercer, LoggerSource). The Spring
app context declares the following beans:

   - dataSource (org.apache.commons.dbcp.BasicDataSource)
   - transactionManager (org.springframework.orm.jpa.JpaTransactionManager)
   - entityManagerFactory
   (org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean)

   I tried to change the contribute method signature to use
EntityManagerFactory instead of EntityManager but to no avail. The error
message is *No service implements the interface
javax.persistence.EntityManager*. My next try would be inject the whole
Spring app context and get the EntityManager from there but I don't think
this is the best way to resolve this dependency. What is the best way to do
it?

   Thanks,

Matheus Eduardo Machado Moreira
matheus@gmail.com

*Good cooking takes time. If you are made to wait, it is to serve you
better, and to please you.*
Menu do Restaurant Antoine, New Orleans


Re: First Tapestry app with Hibernate

2010-12-02 Thread robnangle

Hi,
I switched to using jetty and unfortunetly the project still will not work.
I get a different error by the looks of it though:

HTTP Error 500:
Exception constructing service 'ValueEncoderSource': Error invoking service
builder method
org.apache.tapestry5.services.TapestryModule.buildValueEncoderSource(Map,
InvalidationEventHub) (at TapestryModule.java:1910) (for service
'ValueEncoderSource'): Error invoking service contribution method
org.apache.tapestry5.hibernate.HibernateModule.contributeValueEncoderSource(MappedConfiguration,
boolean, HibernateSessionSource, Session, TypeCoercer, PropertyAccess,
LoggerSource): Exception constructing service 'HibernateSessionSource':
Error invoking service builder method
org.apache.tapestry5.hibernate.HibernateModule.buildHibernateSessionSource(Logger,
List, RegistryShutdownHub) (at HibernateModule.java:120) (for service
'HibernateSessionSource'):
org/hibernate/annotations/common/reflection/ReflectionManager
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/First-Tapestry-app-with-Hibernate-tp3285845p3289820.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: First Tapestry app with Hibernate

2010-12-02 Thread Thiago H. de Paula Figueiredo

On Thu, 02 Dec 2010 16:40:29 -0200, robnangle robnan...@gmail.com wrote:


Hi,
I switched to using jetty and unfortunetly the project still will not  
work. I get a different error by the looks of it though:


Are you using m2eclipse?

--
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: Tapestry-Hibernate

2010-12-02 Thread ael

How about this?

http://tapestry.1045711.n5.nabble.com/T5-Working-Tapestry-Hibernate-with-DAO-td3229905.html
http://tapestry.1045711.n5.nabble.com/T5-Working-Tapestry-Hibernate-with-DAO-td3229905.html
 
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-Hibernate-tp3289396p3290127.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: Hibernate

2010-12-02 Thread ael

How about this?

http://tapestry.1045711.n5.nabble.com/T5-Working-Tapestry-Hibernate-with-DAO-td3229905.html
http://tapestry.1045711.n5.nabble.com/T5-Working-Tapestry-Hibernate-with-DAO-td3229905.html
 
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Hibernate-tp2409789p3290129.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