Re: t5: Snow Leopard upgrade?

2009-09-11 Thread Sebastian Hennebrueder

Hello,

Leopard has Java 64 bit as well. If I open programs - service programs 
(name might be different, I translated the name) - Java,

I can see Java 6 - 64 bit, 6 - 32 bit, 5 - 64 bit, 5 - 32 bit, 1.4 - 32 bit



--
Best Regards / Viele Grüße

Sebastian Hennebrueder
-
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de





Angelo Chen schrieb:

thanks for the quick response. currently, I compiled the program under
Tiger's java which is 1.5, but the java runtime in the deployed server is
1.6, it works quite well.


Howard Lewis Ship wrote:

Hard to say; there's been some issues with Javassist and Java 6 not
meshing
together very well.

On Thu, Sep 10, 2009 at 8:56 PM, Angelo Chen
angelochen...@yahoo.com.hkwrote:


Hi,

Snow Leopard comes with 64 bit java 6, programs compiled under that
compatible with Tapestry 5 binary from the apache site? Thanks,

Angelo
--
View this message in context:
http://www.nabble.com/t5%3A-Snow-Leopard-upgrade--tp25394678p25394678.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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




--
Howard M. Lewis Ship

Creator of Apache Tapestry

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: Tapestry Training in Frankfurt, Germany: Nov 23-25

2009-09-11 Thread Sebastian Hennebrueder

Hello,

just a note. The price of 1300 EUR is excluding VAT. VAT is 19 % in Germany.

--
Best Regards / Viele Grüße

Sebastian Hennebrueder
-
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de





Howard Lewis Ship schrieb:

Sebastian Hennebrüder and I have been working on a plan to bring
open-enrollment Tapestry training to Europe!
We are planning on offering training in Frankfurt, Germany on Nov 23-25.
 This is my three-day, hands-on Tapestry workshop, which I normally teach
on-site for specific clients. Recent clients include ProQuest, Ioko, Chess,
and Reach-U.

The training is fully described on my home
pagehttp://howardlewisship.com/training.html
.

I strongly believe that, when it comes to technology, people *learn through
their fingertips* . To that aim, I teach Tapestry as an interactive *
workshop* consisting of ten labs. Each lab teaches a different aspect of
Tapestry; a particular component or set of components, or a particular
challenge developers are likely to face.

Each lab starts with a 20 to 30 minute presentation that will outline the
goals of the lab: the issues to be tackled, the components to be covered,
the special challenges to be explored. The labs themselves consist of an
Eclipse project and a partially working Tapestry application (usually, just
a single page). The goal is to fix the application, by adding and
configuring components, and by writing small amounts of Java code. For the
more complex labs, the work is broken up into smaller stages. Each lab
includes a *cheat sheet* to ensure that no one gets too frustrated.

This Workshop approach is a way for me to gently lead people into the way of
Tapestry, and to help developers understand exactly what it is that Tapestry
does and even how it operates internally. Although the labs are geared for
developers new to web development and new to Tapestry, they are also rich
with information of value to even seasoned Tapestry developers.



We are currently gauging interest level.  If you are DEFINITELY interested,
please respond ... if we get sufficient responses, we will go forward with
the class.

Cost for the the course will be € 1300. This will include the training
itself, plus:

   - Hard copies of the training materials
   - Morning and afternoon breaks with tea, coffee and snacks
   - Lunch


It is suggested that you bring your own laptop computer; if not,
arrangements can be made to supply you with a laptop for the duration of the
class.

You will need about 8 GB free on the laptop and admin rights, to install
VMWare Player.






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



Re: Website concept

2009-09-11 Thread ice


Agree to all of that. Fantastic analysis Sebastian.

The whole documentation should revolve around Tapestry 5.x, and make it
clear, an easy snapshot of what the framework looks like. Then more detailed
information on demand.


Michael Gerzabek wrote:
 
 Sebastian, great job! The main point is your thesis of missing 50 to 80 
 percent of potential new customers. What a waste of time and brainpower!!!
 
 I completely agree in selling the stuff to new users. This could as you 
 pointed out very elegantly with rather small changes in the structure 
 and graphical design.
 
 Anyway. What I see as an urgent need though are some high level 
 architecture overviews like the one of the component rendering [1]. For 
 example what was hard to learn for me was the concept of how the request 
 ist processed. A single picture of the different cycles of 
 render-request and action-request (and when what setup is important and 
 how achieved) would solve a lot of problems. And I'm sure there are many 
 other concepts as well.
 
 Kudos Sebastian!
 
 Michael
 
 [1] http://tapestry.apache.org/tapestry5.1/guide/rendering.html
 

-- 
View this message in context: 
http://n2.nabble.com/Website-concept-tp3619168p3624505.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Website task 1: convincing text for index page

2009-09-11 Thread Sebastian Hennebrueder

Hello,
I spoke to Howard and we agreed on using a git repository temporarily to 
update the website. I have modified the skin and started to work on the 
menus.


I would like to ask for help on working on a number of tasks, because I 
am not native English and I am missing features (like sales know-how) to 
do some things properly.


If you like pick or contribute to a task. Just use the thread to discuss 
the task and send an email with (solved) at the end of the subject to 
mark it as finished.


Convincing text for index page

The text can be based on the existing but should be way shorter and way 
simpler. It addresses new technical users and new less technical users. 
See the user models in the PDF of the Website Concept Thread. It should 
be possible to read the text cross over and still get a good impression.


There should be a short statement what Tapestry and then a number of 
convincing arguments to use it.


I am looking forward to any kind of contributions.


**Documentation Format**
The documentation is build using Maven with a modified skin. The pages 
should be in the XDoc format of doxia. Here is a description 
http://maven.apache.org/doxia/references/xdoc-format.html
The pages are located in src/site/xdoc . You can always copy the 
base.xml to a new file


**How to download the documentation?**
You need to have git installed.
git clone http://dev.laliluna.de/public/tapestry-website.git/ 
tapestry-website


In the root of the documentation you can find a modified skin. You can 
install it into your local maven repository using
mvn install:install-file -Dfile=maven-skin-1.2.S.jar 
-DgroupId=org.apache.tapestry -DartifactId=maven-skin -Dversion=1.2.S 
-Dpackaging=jar -DcreateChecksum=true


After this you can use
mvn clean
mvn site
to build the documentation

**Sending patches, changes **
You can send me just mails with plain text or a git patch.

A quick tutorial on using git is here
http://www.kernel.org/pub/software/scm/git/docs/v1.6.3/everyday.html
You are a Individual Developer (Participant)

--
Best Regards / Viele Grüße

Sebastian Hennebrueder
-
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de




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



Website task 2: describing the features

2009-09-11 Thread Sebastian Hennebrueder

Hello,

there is a features pages in the about section of the new website.

We need a new description on main features there. The text can be more 
technical then the text on the front page but it should be still 
understandable for an average new user or a new user with less technical 
interest (project manager, CTO).


Consider to describe the goal first and then the technical explanation.
good: is very scalable. Because a page pool is used, which can be 
adapted to production needs. ...
bad: has a page pooling feature, binding expression can be marked as 
cacheable or not ...


Keep in mind that new users are addressed. They don't even understand 
the word binding expression


Some information are here
http://tapestry.apache.org/tapestry5.1/


I am looking forward to any kind of contributions.

--
Best Regards / Viele Grüße

Sebastian Hennebrueder
-
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de



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



Website task 3: Chosen tutorial or articles

2009-09-11 Thread Sebastian Hennebrueder

Hello,

there is a Chosen tutorial or articles page in the getting started area.

We need to choose a number of uptodate tutorials and articles. 3-7 not more.

This section targets the technical interested new user.

I am looking forward to any kind of contributions and respond with the 
(solved) postfix in the subject, if this is done.



--
Best Regards / Viele Grüße

Sebastian Hennebrueder
-
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de



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



Website task 4: Maven configuration

2009-09-11 Thread Sebastian Hennebrueder

Hello,

there is a Maven configuration page in the Download section.

It should describe, how to prepare Maven to use Tapestry in a project. 
It might take care of the modules, show a minimal configuration and 
things you need for Spring or Hibernate integration.


This section targets the technical interested new user and existing users.

I am looking forward to any kind of contributions and respond with the
(solved) postfix in the subject, if this is done.

--
Best Regards / Viele Grüße

Sebastian Hennebrueder
-
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de



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



Re: Dynamically creating submit buttons, how to call submit methods?

2009-09-11 Thread Stephan Windmüller
Thiago H. de Paula Figueiredo wrote:

 t:loop t:source=objetcs t:value=current t:formState=iteration
  t:submit t:id=toggleState t:context=current/
 /t:loop
 This will not work, the id has to be unique.
 You could annotate your event handler method with  
 @OnEvent(EventConstants.SELECTED) and use the context to disambiguate  
 between them.

I tried it and at first all seemed work. But then I recognized that each
time the system behaves like I pressed the _last_ button. The context is
always the same, regardless of which button I press.

My code:

input t:type=submit t:context=[firstObject, secondObject]/

@OnEvent(EventConstants.SELECTED)
public void onSelectedFromEditButton(Object1 first, Object2 second) {
 ...
}

Regards
 Stephan

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



Website task 5: Third party libraries and components

2009-09-11 Thread Sebastian Hennebrueder

Hello,

there is a Third party library page in the Extensions and modules section

It should list third party libraries and components.

I am not sure if the section (scroll down) on 
http://tapestry.apache.org/index.html is still up to date.


Could someone check the list and complete it with things, we have on 
T360 and google.


This section targets all users and descriptions should be not to 
technical (if not required)


I am looking forward to any kind of contributions and respond with the
(solved) postfix in the subject, if this is done.


--
Best Regards / Viele Grüße

Sebastian Hennebrueder
-
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de



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



Re: Website task 1: convincing text for index page

2009-09-11 Thread Andreas Andreou
I'm wondering, why not use github.com ?

It would be much easier:
- for ppl to fork into their own repo
- for you to gather all available edits/changes
- for different contributors to collaborate with each other (and not
directly with you,
i.e. for specific translations, or subtasks)


On Fri, Sep 11, 2009 at 2:23 PM, Sebastian Hennebrueder
use...@laliluna.de wrote:
 Hello,
 I spoke to Howard and we agreed on using a git repository temporarily to
 update the website. I have modified the skin and started to work on the
 menus.

 I would like to ask for help on working on a number of tasks, because I am
 not native English and I am missing features (like sales know-how) to do
 some things properly.

 If you like pick or contribute to a task. Just use the thread to discuss the
 task and send an email with (solved) at the end of the subject to mark it as
 finished.

 Convincing text for index page

 The text can be based on the existing but should be way shorter and way
 simpler. It addresses new technical users and new less technical users. See
 the user models in the PDF of the Website Concept Thread. It should be
 possible to read the text cross over and still get a good impression.

 There should be a short statement what Tapestry and then a number of
 convincing arguments to use it.

 I am looking forward to any kind of contributions.


 **Documentation Format**
 The documentation is build using Maven with a modified skin. The pages
 should be in the XDoc format of doxia. Here is a description
 http://maven.apache.org/doxia/references/xdoc-format.html
 The pages are located in src/site/xdoc . You can always copy the base.xml to
 a new file

 **How to download the documentation?**
 You need to have git installed.
 git clone http://dev.laliluna.de/public/tapestry-website.git/
 tapestry-website

 In the root of the documentation you can find a modified skin. You can
 install it into your local maven repository using
 mvn install:install-file -Dfile=maven-skin-1.2.S.jar
 -DgroupId=org.apache.tapestry -DartifactId=maven-skin -Dversion=1.2.S
 -Dpackaging=jar -DcreateChecksum=true

 After this you can use
 mvn clean
 mvn site
 to build the documentation

 **Sending patches, changes **
 You can send me just mails with plain text or a git patch.

 A quick tutorial on using git is here
 http://www.kernel.org/pub/software/scm/git/docs/v1.6.3/everyday.html
 You are a Individual Developer (Participant)

 --
 Best Regards / Viele Grüße

 Sebastian Hennebrueder
 -
 Software Developer and Trainer for Hibernate / Java Persistence
 http://www.laliluna.de




 -
 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 / 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: Dynamically creating submit buttons, how to call submit methods?

2009-09-11 Thread Stephan Windmüller
Stephan Windmüller wrote:

 I tried it and at first all seemed work. But then I recognized that each
 time the system behaves like I pressed the _last_ button. The context is
 always the same, regardless of which button I press.

Hm, the above behaviour might be related to this thread:

http://www.nabble.com/5.1.0.1-SNAPSHOT-submit-context-not-workin-in-a-loop-td22379936.html

Regards
 Stephan

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



Re: Website task 1: convincing text for index page

2009-09-11 Thread Sebastian Hennebrueder



Andreas Andreou schrieb:

I'm wondering, why not use github.com ?



Because setting up a temporary repository consist of two commands for me
ssh lali
initgit tapestry-website.git

I don't have a githup account and the repository has a temporarily 
nature as well




It would be much easier:
- for ppl to fork into their own repo
- for you to gather all available edits/changes
- for different contributors to collaborate with each other (and not
directly with you,
i.e. for specific translations, or subtasks)


On Fri, Sep 11, 2009 at 2:23 PM, Sebastian Hennebrueder
use...@laliluna.de wrote:

Hello,
I spoke to Howard and we agreed on using a git repository temporarily to
update the website. I have modified the skin and started to work on the
menus.

I would like to ask for help on working on a number of tasks, because I am
not native English and I am missing features (like sales know-how) to do
some things properly.

If you like pick or contribute to a task. Just use the thread to discuss the
task and send an email with (solved) at the end of the subject to mark it as
finished.

Convincing text for index page

The text can be based on the existing but should be way shorter and way
simpler. It addresses new technical users and new less technical users. See
the user models in the PDF of the Website Concept Thread. It should be
possible to read the text cross over and still get a good impression.

There should be a short statement what Tapestry and then a number of
convincing arguments to use it.

I am looking forward to any kind of contributions.


**Documentation Format**
The documentation is build using Maven with a modified skin. The pages
should be in the XDoc format of doxia. Here is a description
http://maven.apache.org/doxia/references/xdoc-format.html
The pages are located in src/site/xdoc . You can always copy the base.xml to
a new file

**How to download the documentation?**
You need to have git installed.
git clone http://dev.laliluna.de/public/tapestry-website.git/
tapestry-website

In the root of the documentation you can find a modified skin. You can
install it into your local maven repository using
mvn install:install-file -Dfile=maven-skin-1.2.S.jar
-DgroupId=org.apache.tapestry -DartifactId=maven-skin -Dversion=1.2.S
-Dpackaging=jar -DcreateChecksum=true

After this you can use
mvn clean
mvn site
to build the documentation

**Sending patches, changes **
You can send me just mails with plain text or a git patch.

A quick tutorial on using git is here
http://www.kernel.org/pub/software/scm/git/docs/v1.6.3/everyday.html
You are a Individual Developer (Participant)

--
Best Regards / Viele Grüße

Sebastian Hennebrueder
-
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de




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










--
Best Regards / Viele Grüße

Sebastian Hennebrueder
-
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de



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



Re: Website task 1: convincing text for index page

2009-09-11 Thread Andreas Andreou
I'm confident it'll pay back the wasted minutes, esp. as ppl start to contribute

Additionally, it doesn't have to be something temporal... it can go on
and include
the new quickstart tutorial (as discussed in previous threads) and its
translations.

On Fri, Sep 11, 2009 at 3:05 PM, Sebastian Hennebrueder
use...@laliluna.de wrote:


 Andreas Andreou schrieb:

 I'm wondering, why not use github.com ?


 Because setting up a temporary repository consist of two commands for me
 ssh lali
 initgit tapestry-website.git

 I don't have a githup account and the repository has a temporarily nature as
 well


 It would be much easier:
 - for ppl to fork into their own repo
 - for you to gather all available edits/changes
 - for different contributors to collaborate with each other (and not
 directly with you,
 i.e. for specific translations, or subtasks)


 On Fri, Sep 11, 2009 at 2:23 PM, Sebastian Hennebrueder
 use...@laliluna.de wrote:

 Hello,
 I spoke to Howard and we agreed on using a git repository temporarily to
 update the website. I have modified the skin and started to work on the
 menus.

 I would like to ask for help on working on a number of tasks, because I
 am
 not native English and I am missing features (like sales know-how) to do
 some things properly.

 If you like pick or contribute to a task. Just use the thread to discuss
 the
 task and send an email with (solved) at the end of the subject to mark it
 as
 finished.

 Convincing text for index page

 The text can be based on the existing but should be way shorter and way
 simpler. It addresses new technical users and new less technical users.
 See
 the user models in the PDF of the Website Concept Thread. It should be
 possible to read the text cross over and still get a good impression.

 There should be a short statement what Tapestry and then a number of
 convincing arguments to use it.

 I am looking forward to any kind of contributions.


 **Documentation Format**
 The documentation is build using Maven with a modified skin. The pages
 should be in the XDoc format of doxia. Here is a description
 http://maven.apache.org/doxia/references/xdoc-format.html
 The pages are located in src/site/xdoc . You can always copy the base.xml
 to
 a new file

 **How to download the documentation?**
 You need to have git installed.
 git clone http://dev.laliluna.de/public/tapestry-website.git/
 tapestry-website

 In the root of the documentation you can find a modified skin. You can
 install it into your local maven repository using
 mvn install:install-file -Dfile=maven-skin-1.2.S.jar
 -DgroupId=org.apache.tapestry -DartifactId=maven-skin -Dversion=1.2.S
 -Dpackaging=jar -DcreateChecksum=true

 After this you can use
 mvn clean
 mvn site
 to build the documentation

 **Sending patches, changes **
 You can send me just mails with plain text or a git patch.

 A quick tutorial on using git is here
 http://www.kernel.org/pub/software/scm/git/docs/v1.6.3/everyday.html
 You are a Individual Developer (Participant)

 --
 Best Regards / Viele Grüße

 Sebastian Hennebrueder
 -
 Software Developer and Trainer for Hibernate / Java Persistence
 http://www.laliluna.de




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








 --
 Best Regards / Viele Grüße

 Sebastian Hennebrueder
 -
 Software Developer and Trainer for Hibernate / Java Persistence
 http://www.laliluna.de



 -
 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 / 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: Website task 1: convincing text for index page

2009-09-11 Thread Sebastian Hennebrueder

Hello Andreas,

I believe you but let's wait for input of other people. If they agree, 
someone can set up a repository their.


As it is no consequence to change the repository you are pulling from, 
we can migrate their at any time.


Andreas Andreou schrieb:

I'm confident it'll pay back the wasted minutes, esp. as ppl start to contribute

Additionally, it doesn't have to be something temporal... it can go on
and include
the new quickstart tutorial (as discussed in previous threads) and its
translations.

On Fri, Sep 11, 2009 at 3:05 PM, Sebastian Hennebrueder
use...@laliluna.de wrote:


Andreas Andreou schrieb:

I'm wondering, why not use github.com ?


Because setting up a temporary repository consist of two commands for me
ssh lali
initgit tapestry-website.git

I don't have a githup account and the repository has a temporarily nature as
well



It would be much easier:
- for ppl to fork into their own repo
- for you to gather all available edits/changes
- for different contributors to collaborate with each other (and not
directly with you,
i.e. for specific translations, or subtasks)


On Fri, Sep 11, 2009 at 2:23 PM, Sebastian Hennebrueder
use...@laliluna.de wrote:

Hello,
I spoke to Howard and we agreed on using a git repository temporarily to
update the website. I have modified the skin and started to work on the
menus.

I would like to ask for help on working on a number of tasks, because I
am
not native English and I am missing features (like sales know-how) to do
some things properly.

If you like pick or contribute to a task. Just use the thread to discuss
the
task and send an email with (solved) at the end of the subject to mark it
as
finished.

Convincing text for index page

The text can be based on the existing but should be way shorter and way
simpler. It addresses new technical users and new less technical users.
See
the user models in the PDF of the Website Concept Thread. It should be
possible to read the text cross over and still get a good impression.

There should be a short statement what Tapestry and then a number of
convincing arguments to use it.

I am looking forward to any kind of contributions.


**Documentation Format**
The documentation is build using Maven with a modified skin. The pages
should be in the XDoc format of doxia. Here is a description
http://maven.apache.org/doxia/references/xdoc-format.html
The pages are located in src/site/xdoc . You can always copy the base.xml
to
a new file

**How to download the documentation?**
You need to have git installed.
git clone http://dev.laliluna.de/public/tapestry-website.git/
tapestry-website

In the root of the documentation you can find a modified skin. You can
install it into your local maven repository using
mvn install:install-file -Dfile=maven-skin-1.2.S.jar
-DgroupId=org.apache.tapestry -DartifactId=maven-skin -Dversion=1.2.S
-Dpackaging=jar -DcreateChecksum=true

After this you can use
mvn clean
mvn site
to build the documentation

**Sending patches, changes **
You can send me just mails with plain text or a git patch.

A quick tutorial on using git is here
http://www.kernel.org/pub/software/scm/git/docs/v1.6.3/everyday.html
You are a Individual Developer (Participant)

--
Best Regards / Viele Grüße

Sebastian Hennebrueder
-
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de




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








--
Best Regards / Viele Grüße

Sebastian Hennebrueder
-
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de



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










--
Best Regards / Viele Grüße

Sebastian Hennebrueder
-
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de



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



Website task 6: Stylesheet and Colors

2009-09-11 Thread Sebastian Hennebrueder

Hello,

currently the colors of the menu and the colors of the logo are not 
aligned and the content boxes inside of a page are not yet updated.


The accordion is done with JQuery UI. I chose south-street as theme and 
you can select another theme or modify it directly on the JQuery UI web 
site http://jqueryui.com/themeroller/


In my opinion, we don't have to change to much, just align the colors, 
decide if we go for a frog like green or not etc.


Is there any CSS enthusiast who could work on that?


--
Best Regards / Viele Grüße

Sebastian Hennebrueder
-
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de



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



Re: t5: Snow Leopard upgrade?

2009-09-11 Thread Massimo Lusetti
On Fri, Sep 11, 2009 at 6:01 AM, Howard Lewis Ship hls...@gmail.com wrote:

 Hard to say; there's been some issues with Javassist and Java 6 not meshing
 together very well.

I'm under java 6 from some time now and didn't have any issues till now...

-- 
Massimo
http://meridio.blogspot.com

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



Re: T5: AccessController Dispatcher asm.exists() not working?

2009-09-11 Thread Massimo Lusetti
On Thu, Sep 10, 2009 at 7:06 PM, neo anderson
javadeveloper...@yahoo.co.uk wrote:

 Is this the same way as explained in
 http://wiki.apache.org/tapestry/Tapestry5HowToCreateADispatcher2? Or what's
 difference between this srategy?

The chenillekit access module comes from the experience that made up
the wiki doc.

Cheers
-- 
Massimo
http://meridio.blogspot.com

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



Website preview

2009-09-11 Thread Sebastian Hennebrueder

Hello,

I setup a preview website. You can find it here.

http://tapestry.laliluna.de/

--
Best Regards / Viele Grüße

Sebastian Hennebrueder
-
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de




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



Re: Website preview

2009-09-11 Thread Alfonso Quiroga
I like it :-)

On Fri, Sep 11, 2009 at 12:10 PM, Sebastian Hennebrueder
use...@laliluna.de wrote:
 Hello,

 I setup a preview website. You can find it here.

 http://tapestry.laliluna.de/

 --
 Best Regards / Viele Grüße

 Sebastian Hennebrueder
 -
 Software Developer and Trainer for Hibernate / Java Persistence
 http://www.laliluna.de




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



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



[T5.0.18] Out of Memory Error / Potential Leak (doesn't reduce after forced GC)

2009-09-11 Thread Dave Greggory
I have T5.0.18 running in Tomcat 5.5 with Java 1.5 32-bit  -Xms2048m -Xmx2048m  
-XX:PermSize=128m  -XX:MaxPermSize=128m.

Configured as:
tapestry.page-pool.active-window = 5 m
tapestry.page-pool.hard-limit = 10

Ran a JMeter Load Test with 
10 concurrent users
Ramp-up time of 60 seconds
1 second between requests for a particular user
Repeated 20 times

The user will visit a signup page, submit a form, then get redirected to a 
billing page, submit that with CC info and be shown a thank you receipt page 
and will log out. During the test, memory usage went from around 400MB to 
1.5GB. Did a forced GC from JConsole and it did not release more than 100MB at 
most. Re-ran the above test with 20 users instead with the same config (no 
re-starting of Tomcat) and the memory usage climbed to about 2GB (max Xmx) and 
eventually Tomcat stopped responding. After 30 minutes or so, it finally threw 
an OOM with a memory dump.

JConsole Memory Usage
http://img41.imageshack.us/img41/5303/tapestryloadtestmemoryu.jpg

HPROF Memory Dump in YourKit:
http://img38.imageshack.us/img38/431/memorydumpclasslist.png

What's going on here?

Just some info on our app. Our pages are similar to a CMS system, except that 
instead of static content, we serve up different components (forms, etc) for 
users. We use a Dispatcher and overriden LinkFactory to map seo-optimized URLs 
to a given Page. Many different URLs may map to the same page and the same URL 
may map to more than 1 page based on user's status. A given page will have 
multiple layouts injected into it, and each layout will have multiple 
components injected into it (it goes a little bit deeper than that). At 
runtime, a page configuration is read from the database based on the URL and 
user's status, and the relevant layouts and components to show are selected. 
Since Tapestry is limited in the way that it can only use a component that has 
already been injected to the page (ie. IoC can't dynamically load a component 
without having being referenced in the page before), each page can load a 
multiple different components. 

I can understand if this complex scenario needed a couple of hundred megs, but 
2 GB? And even more worrisome, why does it not collect during garbage 
collection? During the whole test of 20 minutes or so, more than 6 minutes were 
spent in GC.

Any ideas? Thoughts?


  


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



Re: [T5.0.18] Out of Memory Error / Potential Leak (doesn't reduce after forced GC)

2009-09-11 Thread Thiago H. de Paula Figueiredo
Em Fri, 11 Sep 2009 12:47:23 -0300, Dave Greggory davegregg...@yahoo.com  
escreveu:


I have T5.0.18 running in Tomcat 5.5 with Java 1.5 32-bit  -Xms2048m  
-Xmx2048m  -XX:PermSize=128m  -XX:MaxPermSize=128m.


Have you tried 5.1.0.5?

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: [T5.0.18] Out of Memory Error / Potential Leak (doesn't reduce after forced GC)

2009-09-11 Thread Kalle Korhonen
I applaud the efforts, but I think you really really have to upgrade
to 5.1.0.5 before you can get this on anybody's radar. There's a good
possibility the same wouldn't happen in it. If you are running with
-server (think it may be automatically chosen if you haven't specified
with that heap max) and the application is sufficiently busy, the gc
wouldn't kick in until heap space is exhausted. Have you checked that
you are closing db connections/returning them to to the pool properly?
In any case obviously this is not right, you shouldn't need to accept
memory usage of 2GB with that load. I've been able to run small
db-backed Tapestry apps with a memory budget of less than 200MB.

Kalle


On Fri, Sep 11, 2009 at 8:47 AM, Dave Greggory davegregg...@yahoo.com wrote:
 I have T5.0.18 running in Tomcat 5.5 with Java 1.5 32-bit  -Xms2048m 
 -Xmx2048m  -XX:PermSize=128m  -XX:MaxPermSize=128m.

 Configured as:
    tapestry.page-pool.active-window = 5 m
    tapestry.page-pool.hard-limit = 10

 Ran a JMeter Load Test with
    10 concurrent users
    Ramp-up time of 60 seconds
    1 second between requests for a particular user
    Repeated 20 times

 The user will visit a signup page, submit a form, then get redirected to a 
 billing page, submit that with CC info and be shown a thank you receipt page 
 and will log out. During the test, memory usage went from around 400MB to 
 1.5GB. Did a forced GC from JConsole and it did not release more than 100MB 
 at most. Re-ran the above test with 20 users instead with the same config (no 
 re-starting of Tomcat) and the memory usage climbed to about 2GB (max Xmx) 
 and eventually Tomcat stopped responding. After 30 minutes or so, it finally 
 threw an OOM with a memory dump.

 JConsole Memory Usage
 http://img41.imageshack.us/img41/5303/tapestryloadtestmemoryu.jpg

 HPROF Memory Dump in YourKit:
 http://img38.imageshack.us/img38/431/memorydumpclasslist.png

 What's going on here?

 Just some info on our app. Our pages are similar to a CMS system, except that 
 instead of static content, we serve up different components (forms, etc) for 
 users. We use a Dispatcher and overriden LinkFactory to map seo-optimized 
 URLs to a given Page. Many different URLs may map to the same page and the 
 same URL may map to more than 1 page based on user's status. A given page 
 will have multiple layouts injected into it, and each layout will have 
 multiple components injected into it (it goes a little bit deeper than that). 
 At runtime, a page configuration is read from the database based on the URL 
 and user's status, and the relevant layouts and components to show are 
 selected. Since Tapestry is limited in the way that it can only use a 
 component that has already been injected to the page (ie. IoC can't 
 dynamically load a component without having being referenced in the page 
 before), each page can load a multiple different components.

 I can understand if this complex scenario needed a couple of hundred megs, 
 but 2 GB? And even more worrisome, why does it not collect during garbage 
 collection? During the whole test of 20 minutes or so, more than 6 minutes 
 were spent in GC.

 Any ideas? Thoughts?





 -
 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.0.18] Out of Memory Error / Potential Leak (doesn't reduce after forced GC)

2009-09-11 Thread Howard Lewis Ship
Tapestry 5.1.0.5 is more efficient, but that's mostly in terms of reducing
the number of temporary objects created during a single request.
392,000 instances of ComponentPageElementImpl?

How many pages in your application?  Say there's 15 distinct pages.

392,000 / (15 district * 10 hard limit) =  2600 components per page

In fact, looking at the memory, there's 25 PageImpls, so now we're talking
15,680 components / page! That seems like a lot!

I'm concerned you've fallen prey to the Uber-component anti-pattern.

If you have a component that contains, in its template, 10 other components
then every time you use such a component, that's 10 instances of
ComponentPageElementImpl.

I've seen systems that, for every field to be edited, an Uber-component is
used, and the Uber-component is set up to edit any type of data, so it has a
TextField, a Select, a Checkbox ... and a Grid containing a bunch of other
stuff ... and so on.  Thus editing the userId field of the User object
claims several hundred components (instances of ComponentPageElementImpl).

If you notice how BeanEditForm / BeanEditor / PropertyEditor works, the
actual editing components live on a secondary page.  An instance of
PropertyEditor is just the one ComponentPageElementImpl instance, plus
shared off screen components from the PropertyEditBlocks page (part of
Tapestry's core library).

If you have ten PropertyEditor components on a page, that's 10
ComponentPageElementImpl instances, not hundreds or thousands, even though
there are dozens of components on the PropertyEditBlocksPage.

Anyway, perhaps this is what you've done, or perhaps there's some other
issue ... some cache or pool (outside of Tapestry) that is holding onto page
instances even after Tapestry has discarded them. Or perhaps the memory
issue is not related to Tapestry after all (though that 392,000 instances
seems troublesome).


On Fri, Sep 11, 2009 at 8:47 AM, Dave Greggory davegregg...@yahoo.comwrote:

 I have T5.0.18 running in Tomcat 5.5 with Java 1.5 32-bit  -Xms2048m
 -Xmx2048m  -XX:PermSize=128m  -XX:MaxPermSize=128m.

 Configured as:
tapestry.page-pool.active-window = 5 m
tapestry.page-pool.hard-limit = 10

 Ran a JMeter Load Test with
10 concurrent users
Ramp-up time of 60 seconds
1 second between requests for a particular user
Repeated 20 times

 The user will visit a signup page, submit a form, then get redirected to a
 billing page, submit that with CC info and be shown a thank you receipt page
 and will log out. During the test, memory usage went from around 400MB to
 1.5GB. Did a forced GC from JConsole and it did not release more than 100MB
 at most. Re-ran the above test with 20 users instead with the same config
 (no re-starting of Tomcat) and the memory usage climbed to about 2GB (max
 Xmx) and eventually Tomcat stopped responding. After 30 minutes or so, it
 finally threw an OOM with a memory dump.

 JConsole Memory Usage
 http://img41.imageshack.us/img41/5303/tapestryloadtestmemoryu.jpg

 HPROF Memory Dump in YourKit:
 http://img38.imageshack.us/img38/431/memorydumpclasslist.png

 What's going on here?

 Just some info on our app. Our pages are similar to a CMS system, except
 that instead of static content, we serve up different components (forms,
 etc) for users. We use a Dispatcher and overriden LinkFactory to map
 seo-optimized URLs to a given Page. Many different URLs may map to the same
 page and the same URL may map to more than 1 page based on user's status. A
 given page will have multiple layouts injected into it, and each layout will
 have multiple components injected into it (it goes a little bit deeper than
 that). At runtime, a page configuration is read from the database based on
 the URL and user's status, and the relevant layouts and components to show
 are selected. Since Tapestry is limited in the way that it can only use a
 component that has already been injected to the page (ie. IoC can't
 dynamically load a component without having being referenced in the page
 before), each page can load a multiple different components.

 I can understand if this complex scenario needed a couple of hundred megs,
 but 2 GB? And even more worrisome, why does it not collect during garbage
 collection? During the whole test of 20 minutes or so, more than 6 minutes
 were spent in GC.

 Any ideas? Thoughts?





 -
 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


Re: [T5.0.18] Out of Memory Error / Potential Leak (doesn't reduce after forced GC)

2009-09-11 Thread Dave Greggory
Yes, we're using a the Uber-component pattern as you put it. As that is the 
only way, we can build a dynamically defined Page. 

Right now, we have about 8 pages, containing possibly 12 Layout components, and 
29 functional components, some of which a Form Components. And those contain 4 
possible Form Layouts and 13 possible Form Sub Components. A database based 
configuration defines what components and layouts are active or shown on each 
page. We have separate CMS like management system to update / edit this page 
configuration. 

Is there a different way we can accomplish the same thing? We need to maintain 
the flexibility to dynamically determine where in the page a component is added 
to or shown at all. 

I don't quite understand what you mean by how the BeanEditForm component works. 
Perhaps someone can kindly explain it to me. Thanks so much.



- Original Message 
From: Howard Lewis Ship hls...@gmail.com
To: Tapestry users users@tapestry.apache.org
Sent: Friday, September 11, 2009 2:36:00 PM
Subject: Re: [T5.0.18] Out of Memory Error / Potential Leak (doesn't reduce  
after forced GC)

Tapestry 5.1.0.5 is more efficient, but that's mostly in terms of reducing
the number of temporary objects created during a single request.
392,000 instances of ComponentPageElementImpl?

How many pages in your application?  Say there's 15 distinct pages.

392,000 / (15 district * 10 hard limit) =  2600 components per page

In fact, looking at the memory, there's 25 PageImpls, so now we're talking
15,680 components / page! That seems like a lot!

I'm concerned you've fallen prey to the Uber-component anti-pattern.

If you have a component that contains, in its template, 10 other components
then every time you use such a component, that's 10 instances of
ComponentPageElementImpl.

I've seen systems that, for every field to be edited, an Uber-component is
used, and the Uber-component is set up to edit any type of data, so it has a
TextField, a Select, a Checkbox ... and a Grid containing a bunch of other
stuff ... and so on.  Thus editing the userId field of the User object
claims several hundred components (instances of ComponentPageElementImpl).

If you notice how BeanEditForm / BeanEditor / PropertyEditor works, the
actual editing components live on a secondary page.  An instance of
PropertyEditor is just the one ComponentPageElementImpl instance, plus
shared off screen components from the PropertyEditBlocks page (part of
Tapestry's core library).

If you have ten PropertyEditor components on a page, that's 10
ComponentPageElementImpl instances, not hundreds or thousands, even though
there are dozens of components on the PropertyEditBlocksPage.

Anyway, perhaps this is what you've done, or perhaps there's some other
issue ... some cache or pool (outside of Tapestry) that is holding onto page
instances even after Tapestry has discarded them. Or perhaps the memory
issue is not related to Tapestry after all (though that 392,000 instances
seems troublesome).


On Fri, Sep 11, 2009 at 8:47 AM, Dave Greggory davegregg...@yahoo.comwrote:

 I have T5.0.18 running in Tomcat 5.5 with Java 1.5 32-bit  -Xms2048m
 -Xmx2048m  -XX:PermSize=128m  -XX:MaxPermSize=128m.

 Configured as:
tapestry.page-pool.active-window = 5 m
tapestry.page-pool.hard-limit = 10

 Ran a JMeter Load Test with
10 concurrent users
Ramp-up time of 60 seconds
1 second between requests for a particular user
Repeated 20 times

 The user will visit a signup page, submit a form, then get redirected to a
 billing page, submit that with CC info and be shown a thank you receipt page
 and will log out. During the test, memory usage went from around 400MB to
 1.5GB. Did a forced GC from JConsole and it did not release more than 100MB
 at most. Re-ran the above test with 20 users instead with the same config
 (no re-starting of Tomcat) and the memory usage climbed to about 2GB (max
 Xmx) and eventually Tomcat stopped responding. After 30 minutes or so, it
 finally threw an OOM with a memory dump.

 JConsole Memory Usage
 http://img41.imageshack.us/img41/5303/tapestryloadtestmemoryu.jpg

 HPROF Memory Dump in YourKit:
 http://img38.imageshack.us/img38/431/memorydumpclasslist.png

 What's going on here?

 Just some info on our app. Our pages are similar to a CMS system, except
 that instead of static content, we serve up different components (forms,
 etc) for users. We use a Dispatcher and overriden LinkFactory to map
 seo-optimized URLs to a given Page. Many different URLs may map to the same
 page and the same URL may map to more than 1 page based on user's status. A
 given page will have multiple layouts injected into it, and each layout will
 have multiple components injected into it (it goes a little bit deeper than
 that). At runtime, a page configuration is read from the database based on
 the URL and user's status, and the relevant layouts and components to show
 are selected. Since Tapestry is limited in the way that it can 

Re: [T5.0.18] Out of Memory Error / Potential Leak (doesn't reduce after forced GC)

2009-09-11 Thread Dave Greggory
Upgrading to 5.1 is going to require a lot of effort since we have hacked 
LinkFactory, RequestSecurityManager, etc to get functionality that did not 
exist. But we'll certainly do it if it will solve the problem. It's just that 
we don't know whether we can allocate the resources to do it unless we know 
whether that's a potential solution to the problem.



- Original Message 
From: Thiago H. de Paula Figueiredo thiag...@gmail.com
To: Tapestry users users@tapestry.apache.org
Sent: Friday, September 11, 2009 12:17:38 PM
Subject: Re: [T5.0.18] Out of Memory Error / Potential Leak (doesn't reduce 
after forced GC)

Em Fri, 11 Sep 2009 12:47:23 -0300, Dave Greggory davegregg...@yahoo.com 
escreveu:

 I have T5.0.18 running in Tomcat 5.5 with Java 1.5 32-bit  -Xms2048m 
 -Xmx2048m  -XX:PermSize=128m  -XX:MaxPermSize=128m.

Have you tried 5.1.0.5?

--Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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


  


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



Re: Website preview

2009-09-11 Thread Madtyn
Nice design. Keep on with the good work.

2009/9/11 Alfonso Quiroga alfonsose...@gmail.com:
 I like it :-)

 On Fri, Sep 11, 2009 at 12:10 PM, Sebastian Hennebrueder
 use...@laliluna.de wrote:
 Hello,

 I setup a preview website. You can find it here.

 http://tapestry.laliluna.de/

 --
 Best Regards / Viele Grüße

 Sebastian Hennebrueder
 -
 Software Developer and Trainer for Hibernate / Java Persistence
 http://www.laliluna.de




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



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



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



Re: [T5.0.18] Out of Memory Error / Potential Leak (doesn't reduce after forced GC)

2009-09-11 Thread Dave Greggory
NYC.



- Original Message 
From: Howard Lewis Ship hls...@gmail.com
To: Tapestry users users@tapestry.apache.org
Sent: Friday, September 11, 2009 3:11:57 PM
Subject: Re: [T5.0.18] Out of Memory Error / Potential Leak (doesn't reduce  
after forced GC)

Although upgrading is a good idea for many reasons, I don't think it will
solve your problem. You need a little re-architecting of your approach to
get the component instance count back under control. Where are you located?
On Fri, Sep 11, 2009 at 12:03 PM, Dave Greggory davegregg...@yahoo.comwrote:


  


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



Re: [T5.0.18] Out of Memory Error / Potential Leak (doesn't reduce after forced GC)

2009-09-11 Thread Howard Lewis Ship
Although upgrading is a good idea for many reasons, I don't think it will
solve your problem. You need a little re-architecting of your approach to
get the component instance count back under control. Where are you located?
On Fri, Sep 11, 2009 at 12:03 PM, Dave Greggory davegregg...@yahoo.comwrote:

 Upgrading to 5.1 is going to require a lot of effort since we have hacked
 LinkFactory, RequestSecurityManager, etc to get functionality that did not
 exist. But we'll certainly do it if it will solve the problem. It's just
 that we don't know whether we can allocate the resources to do it unless we
 know whether that's a potential solution to the problem.



 - Original Message 
 From: Thiago H. de Paula Figueiredo thiag...@gmail.com
 To: Tapestry users users@tapestry.apache.org
 Sent: Friday, September 11, 2009 12:17:38 PM
 Subject: Re: [T5.0.18] Out of Memory Error / Potential Leak (doesn't reduce
 after forced GC)

 Em Fri, 11 Sep 2009 12:47:23 -0300, Dave Greggory davegregg...@yahoo.com
 escreveu:

  I have T5.0.18 running in Tomcat 5.5 with Java 1.5 32-bit  -Xms2048m
 -Xmx2048m  -XX:PermSize=128m  -XX:MaxPermSize=128m.

 Have you tried 5.1.0.5?

 --Thiago H. de Paula Figueiredo
 Independent Java consultant, developer, and instructor
 http://www.arsmachina.com.br/thiago

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





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




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


Exception handling after violation of unique constraint

2009-09-11 Thread Bruno Santos
Thanks for your answer, i learned a bit more of tapestry.

Now i have one more problem, not exactly related but in the same area.

I have

void onValidateForm() {
if (entity.getId().longValue() == 0l) {
league.setId(null);
}

System.out.println(OnValidateForm);
try {
_entityDAO.persist(entity);
} catch (RuntimeException ex) {
leagueForm.recordError(error); // EXCEPTION IS THROWN 
- THE TEST
I'M DOING HITS THE UNIQUE CONSTRAINT
}

}

void onFailure() {
_entityDAO.abort();
System.out.println(onFailure);
}

And this is working except it doesn't refresh the form with the errors
i added on the onValidate

When i use:

Object onFailure() {
_entityDAO.abort();
System.out.println(onFailure);
return this;
}

The following exception is thrown:

Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException:
null id in pt.hi.asianconnect.entities.League entry (don't flush the
Session after an exception occurs) [at
classpath:pt/hi/asianconnect/components/generated/CreateUpdateLeague.tml,
line 12]
at 
org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:62)
at 
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl$1.read(InternalComponentResourcesImpl.java:510)
... 119 more
Caused by: org.hibernate.AssertionFailure: null id in
pt.hi.asianconnect.entities.League entry (don't flush the Session
after an exception occurs)
at 
org.hibernate.event.def.DefaultFlushEntityEventListener.checkId(DefaultFlushEntityEventListener.java:78)
at 
org.hibernate.event.def.DefaultFlushEntityEventListener.getValues(DefaultFlushEntityEventListener.java:187)
at 
org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:143)
at 
org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:219)
at 
org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99)
at 
org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:58)
at 
org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:996)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1589)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
at DefaultHibernateDAO.findByCriteria(DefaultHibernateDAO.java:104)


The abort method from DAO was an experiment of mine wich calls
hibernatesessionmanager.abort(). From what i understand, what happens
is when the page is to be renderered, the hibernatesessionmanager
that's used has dirty data that's why it uses
SessionImpl.autoFlushIfRequired when i'm fetching data to refill the
page, hence my experiment on calling the abort from
hibernatesessionmanger, still this doesn't do it and i don't know how
to clean data from the sessionmanager.

Ideas anyone?

One importante note, the test i'm doing implies that the my method
that saveOrUpdate the entity is hitting a unique constraint

On Thu, Sep 10, 2009 at 11:20 PM, Kalle Korhonen
kalle.o.korho...@gmail.com wrote:
 You should instead try storing it onValidate. If it fails, you should
 record an error and if it succeeds you should commit only in onSuccess
 (but the method body can be otherwise empty).

 Kalle


 On Thu, Sep 10, 2009 at 2:55 PM, Bruno Santos bitbet...@gmail.com wrote:
 Good evening,

 I have a form using a zone and i have @CommitAfter on the
 onSubmitFromEntityForm()

 t:form t:id=entityForm zone=entityZone
 input type=text t:type=textfield t:id=name
                                        t:value=entity.name /
 /t:form

 @CommitAfter
 Object onSubmitFromEntityForm() {
  
 try {
 entityDao.persist(entity);
 } catch (exception ex) {
  // handle exception
 }
 }

 altough i'm handling the exception the @CommitAfter creates a new
 exception since it tries to commit something that's not in transaction
 due to catched exception.

 How to deal with this? Is there a way to avoid the @CommitAfter to
 execute ... a handler i can use? I think i can remove the @CommitAfter
 but don't believe this should be first option.

 -
 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 

Re: Website preview - update

2009-09-11 Thread Sebastian Hennebrueder

Hello,
I tried to limit the number of menu entries to 7. The magic number of 
items you can overlook.


I removed the 'Getting a first impression' area and moved the content 
into the 'About Tapestry' area. We can still make a block on the front 
page to help user.


The user guide requires a nested navigation. My first idea, was to move 
it to a Tapestry sub module, which has the advantage, that we can modify 
the menu (remove items). I tested a kind of pure documentation sub 
project. This approach wasn't very nice as you have menu items of the 
main level (about, support, download) which suddenly disappears. You can 
find this effect on the current website, if you visit tapestry modules 
like tapestry-ioc, the tutorial etc.
As a consequence, I reverted the change and moved the user guide as 
special item to the main area. This allows to have two sub levels in the 
user guide.


I merged the Tapestry modules and the page for external modules into a 
common menu area.


Furthermore, I moved the project information, which is a kind of default 
into 'About Tapestry'. I believe that finding the contained information 
(JIRA, Mailinglist, Subversion) is still intuitive. JIRA and Mailinglist 
can additionally found in the support area and the subversion is 
referenced in addition in the download area.


What do you think?



--
Best Regards / Viele Grüße

Sebastian Hennebrueder
-
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de


Madtyn schrieb:

Nice design. Keep on with the good work.

2009/9/11 Alfonso Quiroga alfonsose...@gmail.com:

I like it :-)

On Fri, Sep 11, 2009 at 12:10 PM, Sebastian Hennebrueder
use...@laliluna.de wrote:

Hello,

I setup a preview website. You can find it here.

http://tapestry.laliluna.de/

--
Best Regards / Viele Grüße

Sebastian Hennebrueder
-
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de




-
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






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



Re: Exception handling after violation of unique constraint

2009-09-11 Thread Sven Homburg
what is your reason, that you want to persist the enity
in the validation event?

i think its more clear to persist it in the onSuccess event method

with regards
Sven Homburg
Founder of the Chenille Kit Project
http://www.chenillekit.org




2009/9/11 Bruno Santos bitbet...@gmail.com

 Thanks for your answer, i learned a bit more of tapestry.

 Now i have one more problem, not exactly related but in the same area.

 I have

void onValidateForm() {
if (entity.getId().longValue() == 0l) {
league.setId(null);
}

System.out.println(OnValidateForm);
try {
_entityDAO.persist(entity);
} catch (RuntimeException ex) {
leagueForm.recordError(error); // EXCEPTION IS
 THROWN - THE TEST
 I'M DOING HITS THE UNIQUE CONSTRAINT
}

}

void onFailure() {
_entityDAO.abort();
System.out.println(onFailure);
}

 And this is working except it doesn't refresh the form with the errors
 i added on the onValidate

 When i use:

Object onFailure() {
_entityDAO.abort();
System.out.println(onFailure);
return this;
}

 The following exception is thrown:

 Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException:
 null id in pt.hi.asianconnect.entities.League entry (don't flush the
 Session after an exception occurs) [at
 classpath:pt/hi/asianconnect/components/generated/CreateUpdateLeague.tml,
 line 12]
at
 org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:62)
at
 org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl$1.read(InternalComponentResourcesImpl.java:510)
... 119 more
 Caused by: org.hibernate.AssertionFailure: null id in
 pt.hi.asianconnect.entities.League entry (don't flush the Session
 after an exception occurs)
at
 org.hibernate.event.def.DefaultFlushEntityEventListener.checkId(DefaultFlushEntityEventListener.java:78)
at
 org.hibernate.event.def.DefaultFlushEntityEventListener.getValues(DefaultFlushEntityEventListener.java:187)
at
 org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:143)
at
 org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:219)
at
 org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99)
at
 org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:58)
at
 org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:996)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1589)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
at DefaultHibernateDAO.findByCriteria(DefaultHibernateDAO.java:104)


 The abort method from DAO was an experiment of mine wich calls
 hibernatesessionmanager.abort(). From what i understand, what happens
 is when the page is to be renderered, the hibernatesessionmanager
 that's used has dirty data that's why it uses
 SessionImpl.autoFlushIfRequired when i'm fetching data to refill the
 page, hence my experiment on calling the abort from
 hibernatesessionmanger, still this doesn't do it and i don't know how
 to clean data from the sessionmanager.

 Ideas anyone?

 One importante note, the test i'm doing implies that the my method
 that saveOrUpdate the entity is hitting a unique constraint

 On Thu, Sep 10, 2009 at 11:20 PM, Kalle Korhonen
 kalle.o.korho...@gmail.com wrote:
  You should instead try storing it onValidate. If it fails, you should
  record an error and if it succeeds you should commit only in onSuccess
  (but the method body can be otherwise empty).
 
  Kalle
 
 
  On Thu, Sep 10, 2009 at 2:55 PM, Bruno Santos bitbet...@gmail.com
 wrote:
  Good evening,
 
  I have a form using a zone and i have @CommitAfter on the
  onSubmitFromEntityForm()
 
  t:form t:id=entityForm zone=entityZone
  input type=text t:type=textfield t:id=name
 t:value=entity.name /
  /t:form
 
  @CommitAfter
  Object onSubmitFromEntityForm() {
   
  try {
  entityDao.persist(entity);
  } catch (exception ex) {
   // handle exception
  }
  }
 
  altough i'm handling the exception the @CommitAfter creates a new
  exception since it tries to commit something that's not in transaction
  due to catched exception.
 
  How to deal with this? Is there a way to avoid the @CommitAfter to
  execute ... a handler i can use? I think i can remove the @CommitAfter
  but don't believe this should be first option.
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: 

Re: Exception handling after violation of unique constraint

2009-09-11 Thread Bruno Santos
Hello,

Well, the reason should be that with persist in validate() i validate
that the entity that's inserted doesn't conflict with any database
constraint like in this case and the onsucess isn't fired wich in the
case a constraint is violated it doesn't seem to make sense.

Anyway, even if i use the code on the onSucess method it comes down to
the same issue, the exception is thrown whenever i try to do any
operation that requires hibernate (problem should be in
hibernatesessionmanager, not being clean).

One way i guess it could solve the problem is discarding the current
hibernatesessionmanager, invalidate it somehow, but i don't know if
that's possible.

Thanks

On Fri, Sep 11, 2009 at 10:15 PM, Sven Homburg hombu...@googlemail.com wrote:
 what is your reason, that you want to persist the enity
 in the validation event?

 i think its more clear to persist it in the onSuccess event method

 with regards
 Sven Homburg
 Founder of the Chenille Kit Project
 http://www.chenillekit.org




 2009/9/11 Bruno Santos bitbet...@gmail.com

 Thanks for your answer, i learned a bit more of tapestry.

 Now i have one more problem, not exactly related but in the same area.

 I have

        void onValidateForm() {
                if (entity.getId().longValue() == 0l) {
                        league.setId(null);
                }

                System.out.println(OnValidateForm);
                try {
                _entityDAO.persist(entity);
                } catch (RuntimeException ex) {
                        leagueForm.recordError(error); // EXCEPTION IS
 THROWN - THE TEST
 I'M DOING HITS THE UNIQUE CONSTRAINT
                }

        }

        void onFailure() {
                _entityDAO.abort();
                System.out.println(onFailure);
        }

 And this is working except it doesn't refresh the form with the errors
 i added on the onValidate

 When i use:

        Object onFailure() {
                _entityDAO.abort();
                System.out.println(onFailure);
                return this;
        }

 The following exception is thrown:

 Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException:
 null id in pt.hi.asianconnect.entities.League entry (don't flush the
 Session after an exception occurs) [at
 classpath:pt/hi/asianconnect/components/generated/CreateUpdateLeague.tml,
 line 12]
        at
 org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:62)
        at
 org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl$1.read(InternalComponentResourcesImpl.java:510)
        ... 119 more
 Caused by: org.hibernate.AssertionFailure: null id in
 pt.hi.asianconnect.entities.League entry (don't flush the Session
 after an exception occurs)
        at
 org.hibernate.event.def.DefaultFlushEntityEventListener.checkId(DefaultFlushEntityEventListener.java:78)
        at
 org.hibernate.event.def.DefaultFlushEntityEventListener.getValues(DefaultFlushEntityEventListener.java:187)
        at
 org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:143)
        at
 org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:219)
        at
 org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99)
        at
 org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:58)
        at
 org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:996)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1589)
        at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
        at DefaultHibernateDAO.findByCriteria(DefaultHibernateDAO.java:104)


 The abort method from DAO was an experiment of mine wich calls
 hibernatesessionmanager.abort(). From what i understand, what happens
 is when the page is to be renderered, the hibernatesessionmanager
 that's used has dirty data that's why it uses
 SessionImpl.autoFlushIfRequired when i'm fetching data to refill the
 page, hence my experiment on calling the abort from
 hibernatesessionmanger, still this doesn't do it and i don't know how
 to clean data from the sessionmanager.

 Ideas anyone?

 One importante note, the test i'm doing implies that the my method
 that saveOrUpdate the entity is hitting a unique constraint

 On Thu, Sep 10, 2009 at 11:20 PM, Kalle Korhonen
 kalle.o.korho...@gmail.com wrote:
  You should instead try storing it onValidate. If it fails, you should
  record an error and if it succeeds you should commit only in onSuccess
  (but the method body can be otherwise empty).
 
  Kalle
 
 
  On Thu, Sep 10, 2009 at 2:55 PM, Bruno Santos bitbet...@gmail.com
 wrote:
  Good evening,
 
  I have a form using a zone and i have @CommitAfter on the
  onSubmitFromEntityForm()
 
  t:form t:id=entityForm zone=entityZone
  input type=text t:type=textfield t:id=name
                            

Re: Exception handling after violation of unique constraint

2009-09-11 Thread Thiago H. de Paula Figueiredo
Em Fri, 11 Sep 2009 18:30:34 -0300, Bruno Santos bitbet...@gmail.com  
escreveu:



Hello,


Hi!


Well, the reason should be that with persist in validate() i validate
that the entity that's inserted doesn't conflict with any database
constraint like in this case and the onsucess isn't fired wich in the
case a constraint is violated it doesn't seem to make sense.


IMHO, you have to write code to do that (query the database if needed)  
intead of sending data to the database and expect it to raise erros to you.

IMHO, you should never write to your datastore in onValidate().

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Fwd: Exception handling after violation of unique constraint

2009-09-11 Thread Bruno Santos
Hit wrong button i guess, sent message only to Sven. Sorry


-- Forwarded message --
From: Bruno Santos
Date: Fri, Sep 11, 2009 at 11:19 PM
Subject: Re: Exception handling after violation of unique constraint


First i like to thank you (both) for your patience and help.

Well, not the solution i was looking for but i guess it solves some
issues, totally agree with it and certainly will use it.

However, It doesn't solved non checked exceptions hibernate might
throw, like constraints that are forgotten, or other DML issues. And,
production wise, what happens is user just staring to the page waiting
for it to do something, giving some feedback and nothing happens.
Isn't there a catch all exception and present user some feedback
option? Or an option like don't use this hibernatesessionmanager
because it's invalid option?

Regards

On Fri, Sep 11, 2009 at 10:58 PM, Sven Homburg hombu...@googlemail.com wrote:
 i think a good way for prevent doublettes
 in you database is by using an Example-Query:
 http://docs.jboss.org/hibernate/stable/core/reference/en/html/querycriteria.html#querycriteria-examples


 with regards
 Sven Homburg
 Founder of the Chenille Kit Project
 http://www.chenillekit.org




 2009/9/11 Bruno Santos bitbet...@gmail.com

 Hello,

 Well, the reason should be that with persist in validate() i validate
 that the entity that's inserted doesn't conflict with any database
 constraint like in this case and the onsucess isn't fired wich in the
 case a constraint is violated it doesn't seem to make sense.

 Anyway, even if i use the code on the onSucess method it comes down to
 the same issue, the exception is thrown whenever i try to do any
 operation that requires hibernate (problem should be in
 hibernatesessionmanager, not being clean).

 One way i guess it could solve the problem is discarding the current
 hibernatesessionmanager, invalidate it somehow, but i don't know if
 that's possible.

 Thanks

 On Fri, Sep 11, 2009 at 10:15 PM, Sven Homburg hombu...@googlemail.com
 wrote:
  what is your reason, that you want to persist the enity
  in the validation event?
 
  i think its more clear to persist it in the onSuccess event method
 
  with regards
  Sven Homburg
  Founder of the Chenille Kit Project
  http://www.chenillekit.org
 
 
 
 
  2009/9/11 Bruno Santos bitbet...@gmail.com
 
  Thanks for your answer, i learned a bit more of tapestry.
 
  Now i have one more problem, not exactly related but in the same area.
 
  I have
 
         void onValidateForm() {
                 if (entity.getId().longValue() == 0l) {
                         league.setId(null);
                 }
 
                 System.out.println(OnValidateForm);
                 try {
                 _entityDAO.persist(entity);
                 } catch (RuntimeException ex) {
                         leagueForm.recordError(error); // EXCEPTION IS
  THROWN - THE TEST
  I'M DOING HITS THE UNIQUE CONSTRAINT
                 }
 
         }
 
         void onFailure() {
                 _entityDAO.abort();
                 System.out.println(onFailure);
         }
 
  And this is working except it doesn't refresh the form with the errors
  i added on the onValidate
 
  When i use:
 
         Object onFailure() {
                 _entityDAO.abort();
                 System.out.println(onFailure);
                 return this;
         }
 
  The following exception is thrown:
 
  Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException:
  null id in pt.hi.asianconnect.entities.League entry (don't flush the
  Session after an exception occurs) [at
 
  classpath:pt/hi/asianconnect/components/generated/CreateUpdateLeague.tml,
  line 12]
         at
 
  org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:62)
         at
 
  org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl$1.read(InternalComponentResourcesImpl.java:510)
         ... 119 more
  Caused by: org.hibernate.AssertionFailure: null id in
  pt.hi.asianconnect.entities.League entry (don't flush the Session
  after an exception occurs)
         at
 
  org.hibernate.event.def.DefaultFlushEntityEventListener.checkId(DefaultFlushEntityEventListener.java:78)
         at
 
  org.hibernate.event.def.DefaultFlushEntityEventListener.getValues(DefaultFlushEntityEventListener.java:187)
         at
 
  org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:143)
         at
 
  org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:219)
         at
 
  org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99)
         at
 
  org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:58)
         at
 
  org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:996)
         at 

Re: Problem with ZoneUpdater in a component

2009-09-11 Thread Geoff Callender

That's right. ZoneUpdater works fine in a page, but not in a component.

Here is ZoneUpdater in a page, working fine even when the field  
becomes empty or spaces::



http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/javascript/ajaxonevent

Here is ZoneUpdater in a component, not working when the field becomes  
empty or spaces:



http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/javascript/ajaxcomponents1

Does anyone know why?

Geoff


On 11/09/2009, at 1:02 PM, Kalle Korhonen wrote:


Yes, but I guess Geoff was asking why the same keyup event works fine
on the page, including non-printing chars.

Kalle


On Thu, Sep 10, 2009 at 6:17 PM, Thiago H. de Paula Figueiredo
thiag...@gmail.com wrote:
Playing with them a little, it seems to me that the keyup event  
ignores
non-printing chars. Try typing some spaces: nothing happens. Then  
type any
letter: the AJAX update is triggered. Have you tried the change  
event?


--
Thiago H. de Paula Figueiredo
Consultor, desenvolvedor e instrutor em Java
http://www.arsmachina.com.br/thiago

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




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




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



Re: Website preview - update 2 - WARNING to core committer

2009-09-11 Thread Sebastian Hennebrueder

Hello,

I have integrated some documentation files from the 
tapestry-project/src/site into the new documentation.
As a consequence, we need to take care that those files are not updated 
or changes are merged into the new docs.


I used revision r811842 to copy the tutorial, faq, deployment-notes for 
app servers, release-notes, upgrade-notes


Open content is
the user guide
contribution pages
and the pages from the website tasks

--
Best Regards / Viele Grüße

Sebastian Hennebrueder
-
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de




Sebastian Hennebrueder schrieb:

Hello,
I tried to limit the number of menu entries to 7. The magic number of 
items you can overlook.


I removed the 'Getting a first impression' area and moved the content 
into the 'About Tapestry' area. We can still make a block on the front 
page to help user.


The user guide requires a nested navigation. My first idea, was to move 
it to a Tapestry sub module, which has the advantage, that we can modify 
the menu (remove items). I tested a kind of pure documentation sub 
project. This approach wasn't very nice as you have menu items of the 
main level (about, support, download) which suddenly disappears. You can 
find this effect on the current website, if you visit tapestry modules 
like tapestry-ioc, the tutorial etc.
As a consequence, I reverted the change and moved the user guide as 
special item to the main area. This allows to have two sub levels in the 
user guide.


I merged the Tapestry modules and the page for external modules into a 
common menu area.


Furthermore, I moved the project information, which is a kind of default 
into 'About Tapestry'. I believe that finding the contained information 
(JIRA, Mailinglist, Subversion) is still intuitive. JIRA and Mailinglist 
can additionally found in the support area and the subversion is 
referenced in addition in the download area.


What do you think?







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



Re: Exception handling after violation of unique constraint

2009-09-11 Thread Kalle Korhonen
I'm using the plain hibernate Session (shadow) and the pattern works
great for me. But I think your problem is actually in (don't flush
the
Session after an exception occurs). You are doing something odd since
you need to nullify the id. For a new object, the id should normally
be null. Tapestry is already thinking it's a previously persisted
entity.

Kalle


On Fri, Sep 11, 2009 at 2:30 PM, Bruno Santos bitbet...@gmail.com wrote:
 Hello,

 Well, the reason should be that with persist in validate() i validate
 that the entity that's inserted doesn't conflict with any database
 constraint like in this case and the onsucess isn't fired wich in the
 case a constraint is violated it doesn't seem to make sense.

 Anyway, even if i use the code on the onSucess method it comes down to
 the same issue, the exception is thrown whenever i try to do any
 operation that requires hibernate (problem should be in
 hibernatesessionmanager, not being clean).

 One way i guess it could solve the problem is discarding the current
 hibernatesessionmanager, invalidate it somehow, but i don't know if
 that's possible.

 Thanks

 On Fri, Sep 11, 2009 at 10:15 PM, Sven Homburg hombu...@googlemail.com 
 wrote:
 what is your reason, that you want to persist the enity
 in the validation event?

 i think its more clear to persist it in the onSuccess event method

 with regards
 Sven Homburg
 Founder of the Chenille Kit Project
 http://www.chenillekit.org




 2009/9/11 Bruno Santos bitbet...@gmail.com

 Thanks for your answer, i learned a bit more of tapestry.

 Now i have one more problem, not exactly related but in the same area.

 I have

        void onValidateForm() {
                if (entity.getId().longValue() == 0l) {
                        league.setId(null);
                }

                System.out.println(OnValidateForm);
                try {
                _entityDAO.persist(entity);
                } catch (RuntimeException ex) {
                        leagueForm.recordError(error); // EXCEPTION IS
 THROWN - THE TEST
 I'M DOING HITS THE UNIQUE CONSTRAINT
                }

        }

        void onFailure() {
                _entityDAO.abort();
                System.out.println(onFailure);
        }

 And this is working except it doesn't refresh the form with the errors
 i added on the onValidate

 When i use:

        Object onFailure() {
                _entityDAO.abort();
                System.out.println(onFailure);
                return this;
        }

 The following exception is thrown:

 Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException:
 null id in pt.hi.asianconnect.entities.League entry (don't flush the
 Session after an exception occurs) [at
 classpath:pt/hi/asianconnect/components/generated/CreateUpdateLeague.tml,
 line 12]
        at
 org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:62)
        at
 org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl$1.read(InternalComponentResourcesImpl.java:510)
        ... 119 more
 Caused by: org.hibernate.AssertionFailure: null id in
 pt.hi.asianconnect.entities.League entry (don't flush the Session
 after an exception occurs)
        at
 org.hibernate.event.def.DefaultFlushEntityEventListener.checkId(DefaultFlushEntityEventListener.java:78)
        at
 org.hibernate.event.def.DefaultFlushEntityEventListener.getValues(DefaultFlushEntityEventListener.java:187)
        at
 org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:143)
        at
 org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:219)
        at
 org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99)
        at
 org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:58)
        at
 org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:996)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1589)
        at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
        at DefaultHibernateDAO.findByCriteria(DefaultHibernateDAO.java:104)


 The abort method from DAO was an experiment of mine wich calls
 hibernatesessionmanager.abort(). From what i understand, what happens
 is when the page is to be renderered, the hibernatesessionmanager
 that's used has dirty data that's why it uses
 SessionImpl.autoFlushIfRequired when i'm fetching data to refill the
 page, hence my experiment on calling the abort from
 hibernatesessionmanger, still this doesn't do it and i don't know how
 to clean data from the sessionmanager.

 Ideas anyone?

 One importante note, the test i'm doing implies that the my method
 that saveOrUpdate the entity is hitting a unique constraint

 On Thu, Sep 10, 2009 at 11:20 PM, Kalle Korhonen
 kalle.o.korho...@gmail.com wrote:
  You should instead try storing it onValidate. If 

Re: Exception handling after violation of unique constraint

2009-09-11 Thread Kalle Korhonen
On Fri, Sep 11, 2009 at 3:05 PM, Thiago H. de Paula Figueiredo
thiag...@gmail.com wrote:
 Em Fri, 11 Sep 2009 18:30:34 -0300, Bruno Santos bitbet...@gmail.com
 IMHO, you have to write code to do that (query the database if needed)

Well that doesn't do anything else except merely lowers the probability.

 intead of sending data to the database and expect it to raise erros to you.
 IMHO, you should never write to your datastore in onValidate().

Interesting - I happen to think it's a great pattern to follow. You
try to save and then roll back if it didn't work out - that's what the
transaction management is for and Tapestry gives you a very nice way
to accomplish this easily. If you only save in onSuccess you have to
decide yourself whether you want to commit or abort, especially if
multiple objects are involved and can't easily communicate back to the
user what the error was (if he was trying to submit a form). How would
you do this?

Kalle

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



Re: Exception handling after violation of unique constraint

2009-09-11 Thread Thiago H. de Paula Figueiredo
Em Fri, 11 Sep 2009 23:11:59 -0300, Kalle Korhonen  
kalle.o.korho...@gmail.com escreveu:



Interesting - I happen to think it's a great pattern to follow. You
try to save and then roll back if it didn't work out - that's what the
transaction management is for and Tapestry gives you a very nice way
to accomplish this easily.


I think onValidate() is for validation, the data store should only be  
changed (or attepted to be changed) when validation succeeds and  
controller classes (business rules tier) should deal with transactions,  
not Tapestry-related code (nor any UI code). I write code following the  
three-tiers architecture and the separation of concerns philosphy strictly.



If you only save in onSuccess you have to
decide yourself whether you want to commit or abort,especially if
multiple objects are involved and can't easily communicate back to the
user what the error was (if he was trying to submit a form). How would
you do this?


My approach is to write code to check any consistence error before sending  
data to the store. This way, the only errors left are not recoverable (not  
related to business logic)and a generic error message is shown. I love  
checks buit int the database, but I don't use them to do validation, just  
to make sure no inconsistent data is written.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: Exception handling after violation of unique constraint

2009-09-11 Thread Kalle Korhonen
On Fri, Sep 11, 2009 at 7:26 PM, Thiago H. de Paula Figueiredo
thiag...@gmail.com wrote:
 Em Fri, 11 Sep 2009 23:11:59 -0300, Kalle Korhonen
 kalle.o.korho...@gmail.com escreveu:
 I think onValidate() is for validation, the data store should only be
 changed (or attepted to be changed) when validation succeeds and controller
 classes (business rules tier) should deal with transactions, not
 Tapestry-related code (nor any UI code). I write code following the
 three-tiers architecture and the separation of concerns philosphy strictly.

Ok I see where you are coming from. I'm not a purist - I typically do
the least amount of work up front and try to avoid the extra layer of
indirection whenever possible. Tapestry offers a fairly clean
separation of logic and UI concerns straight-up and unless I need a
separate business layer (say if I had a completely different interface
to the same data), I don't add it in automatically. But I totally
understand your point of view - it's more in line of JEE/EJB
architecture and offers its own benefits.

Kalle

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