Re: Netbeans 6.7 tapestry 5 plugin support

2009-06-18 Thread Alex Kotchnev
iberck,
   very nice !!! Let me know if there is any areas/features that I can
contribute to. Feel free to contact me directly ( I noticed the project
mailing list has about 0 messages ).

Cheers,

Alex K

On Wed, Jun 17, 2009 at 2:29 AM, Ville Virtanen ville.virta...@cerion.fiwrote:


 Thanks!

 This is something that looks very nice on paper, so I'll test it as soon as
 possible.

  - Ville


 iberck wrote:
 
  Hi I'm developing a netbeans plugin for tapestry 5 tested on windows xp
  The supported features are:
 
  Initial features:
  * Support on Netbeans 6.5, 6.51, 6.7 Betas, Release candidates
  * Create pages/components from wizard
  * Code templates
  * Actions
  * tml files highlighting
  * Live class reloading
 
  Code templates
 
   For example, if you type [onaction + tab] in the java class template,
 the
  editor will insert the template of onaction method
 
  @OnEvent(component=ComponentName)
  Object onActionFromComponentName() {
  // TODO Add content
  return null;
  }
 
  * Supported java class code templates
o pagelifecycle
o onpageloaded
o onpageattached
o onpagedetached
o property
o aso
o injectpage
o log
o asset
o ontranslator
o rendercomponent
o setuprender
o beginrender
o beforerenderbody
o afterrenderbody
o afterrendertemplate
o afterrender
o cleanuprender
o formevents
o onsuccess
o onaction
o onexception
o includecss
o includejs
o component
o inject
o oncontext
o onactivate
o onpassivate
o onvalidate
o onevent
  * Supported tml code templates
o palette
o linksubmit
o linksubmithtml
o radiogroup
o radiogrouphtml
o passwordfield
o passwordfieldhtml
o errors
o errorshtml
o formfragment
o pagelink
o pagelinkhtml
o actionlink
o actionlinkhtml
o form
o formhtml
o submit
o submithtml
o select
o selecthtml
o tmlfile
o renderobject
o renderobjecthtml
o label
o labelhtml
o eventlink
o eventlinkhtml
o beandisplay
o beandisplayhtml
o textarea
o textareahtml
o if
o ifhtml
o ifelse
o datefield
o datefieldhtml
o output
o outputhtml
o beaneditform
o beaneditformhtml
o delegate
o loop
o loophtml
o grid
o gridhtml
o textfield
o textfieldhtml
o checkbox
o checkboxhtml
o radio
  * Supported properties code templates
 
  Actions
 
  * You can switch between template/class [Ctrl + Alt + S]
  * If you are in properties file you can switch to page [Ctrl + Alt +
  S]
  * As part of the Netbeans you can use [Ctrl + Shift + 1] to select
 the
  file in the project
  * You can go to properties file from page or component [Ctrl + Alt +
  P]
  * You can create the .properties file if it does not exists
  * Switch supports pages and components
  * Switch supports nested pages and components
 
  Live class reloading (Only on Netbeans  6.7RC1 )
 
  As a part of Alex Kotchnev's work you can follow the blog instructions:
 
 http://www.troymaxventures.com/2009/05/rad-w-tapestry-5-netbeans-67-maven-and.html
 
  The official web page of the project:
  https://nbtapestrysupport.dev.java.net/
 
  Feel free to download from:
 
 https://nbtapestrysupport.dev.java.net/servlets/ProjectDocumentList?folderID=11159expandFolder=11159folderID=0
 
  Regards
 
 

 --
 View this message in context:
 http://www.nabble.com/Netbeans-6.7-tapestry-5-plugin-support-tp24029691p24067704.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: ChenilleKit Mail -- How to Use? or Any Mailer?

2009-06-18 Thread Massimo Lusetti
On Thu, Jun 18, 2009 at 5:01 AM, newtonik newto...@gmail.com wrote:


 Can anyone give me an example on how to use this
 http://www.chenillekit.org/chenillekit-mail/SmtpService.html mailer . I am
 new to Tapestry and I have been trying some of their components. I decided
 to try the mailer today but I don't seem to know how to get it to work. I
 don't seem to know how to Inject the Service into my pages.

 Can someone point me in the right direction?

 How about what people use to mail? Does everyone basically use the Apache
 Commons EMail?

Which version of CK are you using?

--
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: ChenilleKit Mail -- How to Use? or Any Mailer?

2009-06-18 Thread P . Stavrinides
Does everyone basically use the Apache Commons EMail?
No, using IPWorks (political thing), but preferred using plain old Java Mail: 
http://java.sun.com/products/javamail/downloads/index.html

Peter

- Original Message -
From: Massimo Lusetti mluse...@gmail.com
To: Tapestry users users@tapestry.apache.org
Sent: Thursday, 18 June, 2009 10:22:49 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: ChenilleKit Mail -- How to Use? or Any Mailer?

On Thu, Jun 18, 2009 at 5:01 AM, newtonik newto...@gmail.com wrote:


 Can anyone give me an example on how to use this
 http://www.chenillekit.org/chenillekit-mail/SmtpService.html mailer . I am
 new to Tapestry and I have been trying some of their components. I decided
 to try the mailer today but I don't seem to know how to get it to work. I
 don't seem to know how to Inject the Service into my pages.

 Can someone point me in the right direction?

 How about what people use to mail? Does everyone basically use the Apache
 Commons EMail?

Which version of CK are you using?

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

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


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



Re: How to render a page as JSON-formatted AJAX response?

2009-06-18 Thread Stephen Cowx

I also have an interest in this.

I would like a way of pre-rendering a Block on the server (as if it  
was rendered by an Ajax request handler), storing the rendered block  
as a JS variable in the page HTML and then injecting it into the DOM  
client side when it suits me.  I don't want to have to make a new trip  
to the server to fetch the block via Ajax this is just a means of  
allowing a developer of parameterising his use of my overlay component.


As far as I can tell this requires two things:

1) a way of invoking the Ajax renderer programmatically on the server.
2) a way of invoking the Tapestry.init() function on the client with  
the pre-generated response which is stored in a javascript variable as  
an argument (similar to the updateFromUrl() function but with a client  
side variable instead).  This will ensure that the content gets loaded  
into the client properly.


Steve

On 17 Jun 2009, at 21:42, Renger Wilde busanalys...@yahoo.com wrote:



On my client, I have a tabview.

When the user navigates to one of the tabs on the tabview, I trigger  
an AJAX
request to obtain the content of that tab. The AJAX request is sent  
to a

Tapestry component event handler.

I want that event handler to invoke some other page or component,  
and cause

the rendered output of that other page/component to be captured into a
JSON-array, and sent back to the client as the reply to the AJAX  
request.


What is the best way to do this?

thanks.

Renger


--
View this message in context: 
http://www.nabble.com/How-to-render-a-page-as-JSON-formatted-AJAX-response--tp24081692p24081692.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: [Tapestry Central] Why chose Tapestry?

2009-06-18 Thread Ville Virtanen

Hi,

First we used eclipse too, but ran in far too many problems with maven.
Today we use NetBeans, which seems to do most of the things that we expect
it to. At first there was _really_ much resistance to start using NetBeans
which was seen as toy and not as an IDE for professional developer, but in
my opinion if you want an environment that _just_ works, use NetBeans.
(Especially if your developers aren't that familiar with Eclipse.)

Maven also caused a lot of trouble for us at the beginning. Some devs didn't
have any problems, some had more. The more resistance the dev had, the more
problems he/she also had...

Anyway, today when new developer starts (s)he installs maven, svn tortoise,
netbeans and downloads the project and then starts the app with mvn
jetty:run - dev is ready to start coding. This process usually takes about
45 minutes, depending how long the machine downloads stuff and installs
java/netbeans. 

The start of new project does not take any longer than T4 project, but I
must admit that there is some learning curve when you come from T4 or some
other environments, after all, this is new and different system. However, it
is not black magic, and if you have experience with systems it shouldn't be
that hard.

The documentation is lacking, and is the next thing to be fixed (As Howard
has mentioned.). Also T5 should be as new-user-friendly as possible, which
clearly could be improved?

 - Ville


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

Re: [Tapestry Central] Why chose Tapestry?

2009-06-18 Thread Joel Halbert
I'm still not convinced that using Maven is a good thing.
It's fine for those people that use it day to day already, but for those 
people who have no need/interest in picking up another framework and who just 
want to get on with using Tapestry its a real bug bear.

I've always just downloaded the binaries for whatever project I'm using and 
dropped them into my project. I very rarely have versioning issues (if every 
at all in fact). I'd go so far as to say that this is preferable - you know 
exactly what code your using, and why, because you've put it there yourself 
rather than having some opaque system under the hood doing it for you. This 
would seem to give you a greater degree of control over whats in your 
environment - important when it comes to deploying.

On Wednesday 17 June 2009 22:15:23 Norman Franke wrote:
 I did, and that worked using jetty on the command line. Eventually,
 following the other instructions, I was able to even get that working
 in Eclipse. However, it is very basic: no hibernate, no security/
 authentication.

 I started following the instructions in the tutorial, which do not work.

 Norman Franke
 Answering Service for Directors, Inc.
 www.myasd.com

 On Jun 17, 2009, at 2:21 PM, Juan E. Maya wrote:
  did u follow the tapestry quickstart in
  http://tapestry.apache.org/tapestry5.1/quickstart/ ? I don't think it
  could get easier than this. U can even run it inside eclipse if u have
  the m2 plugin for maven.
 
  i do agree with u that the documentation could be better, however,
  reading your message somebody could believe that starting a new
  tapestry project is extremely difficult and it's totally the contrary.
 
  On Wed, Jun 17, 2009 at 7:21 PM, Norman Frankenor...@myasd.com
 
  wrote:
  I've been using T4/4.1 for several years and have been quite
  pleased with
  it. I've been using it with Hibernate, and while not perfect, it's
  worked
  pretty well. We've found it much faster to embed a web browser in
  our main
  app and do editing, queries and the like via Tapestry than writing
  native
  code.
 
  I have a new project to replace our aging billing system. I figured
  this
  would be a great way to learn T5. So, I'm migrating me, not an
  app. :-)
 
  I was pondering posting this, but this thread sort of pushed me
  over the
  top. Note that I don't disagree with anything Howard said. However,
  this
  almost became Why I almost dumped Tapestry entirely.
 
  I'm writing this in order to solicit feedback and maybe help
  others. I've
  been using Tomcat (now 6.0.20) and Eclipse (now 3.4.2) for quite
  time time,
  and I'm very productive developing use them (and T4.1) I think this
  is a
  pretty common development environment.
 
  To get started in T5 for a fresh new app, my first thought was to
  follow the
  tutorial at http://tapestry.apache.org/tapestry5.1/tutorial1/.
 
  Chapter 2 just plain didn't work for me. I think part of it is due
  to Maven
  generally being extremely fragile and working less than half of the
  time.
  However, even after working around that, you can't just import the
  project
  into Eclipse. At least not under Eclipse 3.4.2.
 
  No problem, I thought. Maven is annoying anyway. I'll just create a
  Dynamic
  Web project (like I do for T4.1) and download the T5.1 binary
  distribution.
  That's even worse. It comes with no README listing dependencies or
  anything
  useful, and includes tons of libraries that don't appear to be even
  needed.
  Tapestry failed to start up during initialization. Why have a
  binary distro
  that doesn't work?
 
  Back to Maven. After some googling, I found this article:
  http://tapestry.formos.com/wiki/display/T5IDEINT/Eclipse+(including+Mave
 n) Shouldn't
  this be included in the tutorial? Sadly, the tutorial is extremely
  basic,
  but at least it works. (And is the only way I've found to actually
  create a
  new project in Eclipse to date.)
 
  Next, I tried Tapestry Jumpstart. After hours of configuration and
  random
  errors (using Tomcat), it worked. However, it's so fragile and
  klugy that I
  just can't see using it in production. I don't care about OpenEJB.
  I want
  just plain T5.1 and Hibernate. Plus running in a remote tomcat
  sessions
  eliminates many of the developer productivity benefits of T5 in the
  first
  place. One thing I liked about T4 was that I could deploy a WAR to
  a stock
  Tomcat install, and it would just work. That won't happen with
  Jumpstart.
  Plus. it if takes 3 hours to just get a working developer
  environment, why
  even bother?
 
  Next up, AppFuse. It's only T4, but there is a Tapestry 5 add-on.
  Sadly,
  AppFuse's T4 support is now broken due to a dependancy on tapestry-
  flash
  that appears to be missing and following the instructions on the
  AppFuse
  Tapestry 5 page doesn't work anymore either, resulting in tons of
  missing
  resources.
 
  So, since T5 doesn't appear to provide much in the way of
  authentication /
  security (a very basic 

Re: [Tapestry Central] Why chose Tapestry?

2009-06-18 Thread P . Stavrinides
Hi Joel,

I understand your argument with Maven, most people at some point have 'felt the 
pain' but with or without maven the devil is in the details, getting started is 
not that hard really, but customizing Tapestry to your environment is very 
often the root cause or configuration constipation, a problem which extends 
from the world of Java where there are so many resources, libraries and tools 
that it can often be a pain to integrate and use all of them efficiently. Its 
widely acknowledged that Java has inherent flaws in versioning and dependancy 
management (if only I had a penny for every post I have seen relating back to 
classpath, and library versioning issues), and thats the problem Maven tries to 
solve. In a small operation you can get away with doing dependency management 
manually, but not for enterprise applications or any development of scale.

regards,
Peter

- Original Message -
From: Joel Halbert j...@su3analytics.com
To: users@tapestry.apache.org
Sent: Thursday, 18 June, 2009 11:37:34 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: [Tapestry Central] Why chose Tapestry?

I'm still not convinced that using Maven is a good thing.
It's fine for those people that use it day to day already, but for those 
people who have no need/interest in picking up another framework and who just 
want to get on with using Tapestry its a real bug bear.

I've always just downloaded the binaries for whatever project I'm using and 
dropped them into my project. I very rarely have versioning issues (if every 
at all in fact). I'd go so far as to say that this is preferable - you know 
exactly what code your using, and why, because you've put it there yourself 
rather than having some opaque system under the hood doing it for you. This 
would seem to give you a greater degree of control over whats in your 
environment - important when it comes to deploying.

On Wednesday 17 June 2009 22:15:23 Norman Franke wrote:
 I did, and that worked using jetty on the command line. Eventually,
 following the other instructions, I was able to even get that working
 in Eclipse. However, it is very basic: no hibernate, no security/
 authentication.

 I started following the instructions in the tutorial, which do not work.

 Norman Franke
 Answering Service for Directors, Inc.
 www.myasd.com

 On Jun 17, 2009, at 2:21 PM, Juan E. Maya wrote:
  did u follow the tapestry quickstart in
  http://tapestry.apache.org/tapestry5.1/quickstart/ ? I don't think it
  could get easier than this. U can even run it inside eclipse if u have
  the m2 plugin for maven.
 
  i do agree with u that the documentation could be better, however,
  reading your message somebody could believe that starting a new
  tapestry project is extremely difficult and it's totally the contrary.
 
  On Wed, Jun 17, 2009 at 7:21 PM, Norman Frankenor...@myasd.com
 
  wrote:
  I've been using T4/4.1 for several years and have been quite
  pleased with
  it. I've been using it with Hibernate, and while not perfect, it's
  worked
  pretty well. We've found it much faster to embed a web browser in
  our main
  app and do editing, queries and the like via Tapestry than writing
  native
  code.
 
  I have a new project to replace our aging billing system. I figured
  this
  would be a great way to learn T5. So, I'm migrating me, not an
  app. :-)
 
  I was pondering posting this, but this thread sort of pushed me
  over the
  top. Note that I don't disagree with anything Howard said. However,
  this
  almost became Why I almost dumped Tapestry entirely.
 
  I'm writing this in order to solicit feedback and maybe help
  others. I've
  been using Tomcat (now 6.0.20) and Eclipse (now 3.4.2) for quite
  time time,
  and I'm very productive developing use them (and T4.1) I think this
  is a
  pretty common development environment.
 
  To get started in T5 for a fresh new app, my first thought was to
  follow the
  tutorial at http://tapestry.apache.org/tapestry5.1/tutorial1/.
 
  Chapter 2 just plain didn't work for me. I think part of it is due
  to Maven
  generally being extremely fragile and working less than half of the
  time.
  However, even after working around that, you can't just import the
  project
  into Eclipse. At least not under Eclipse 3.4.2.
 
  No problem, I thought. Maven is annoying anyway. I'll just create a
  Dynamic
  Web project (like I do for T4.1) and download the T5.1 binary
  distribution.
  That's even worse. It comes with no README listing dependencies or
  anything
  useful, and includes tons of libraries that don't appear to be even
  needed.
  Tapestry failed to start up during initialization. Why have a
  binary distro
  that doesn't work?
 
  Back to Maven. After some googling, I found this article:
  http://tapestry.formos.com/wiki/display/T5IDEINT/Eclipse+(including+Mave
 n) Shouldn't
  this be included in the tutorial? Sadly, the tutorial is extremely
  basic,
  but at least it works. (And is the only way I've 

Re: [Tapestry Central] Why chose Tapestry?

2009-06-18 Thread Onno Scheffers
 In a small operation you can get away with doing dependency management
 manually, but not for enterprise applications or any development of scale.



For complex projects especially, I try to keep things simple by adding all
dependencies directly into the version-control system. New developers can
just check out the project, load the project-file up in IntelliJ and they
are ready to go.
I prefer wasting diskspace over wasting developer time.

Of course this cannot work for frameworks like Tapestry, since they are
bound to license-restrictions regarding distribution.


regards,

Onno


RE: [Tapestry Central] Why chose Tapestry?

2009-06-18 Thread Newham, Cameron
I have found Maven is great for starting a T5 project, but if you aren't
careful later on then it can become a nightmarish hell.

Having to remove and rebuild the repository a tool has created because
it has gone and messed it up doth not a good tool make.


-Original Message-
From: Joel Halbert [mailto:j...@su3analytics.com] 
Sent: 18 June 2009 09:38
To: users@tapestry.apache.org
Subject: Re: [Tapestry Central] Why chose Tapestry?

I'm still not convinced that using Maven is a good thing.
It's fine for those people that use it day to day already, but for those

people who have no need/interest in picking up another framework and who
just 
want to get on with using Tapestry its a real bug bear.

...

**
 
Experience the British Library online at www.bl.uk
 
The British Library's new interactive Annual Report and Accounts 2007/08 : 
www.bl.uk/knowledge
 
Help the British Library conserve the world's knowledge. Adopt a Book. 
www.bl.uk/adoptabook
 
The Library's St Pancras site is WiFi - enabled
 
*
 
The information contained in this e-mail is confidential and may be legally 
privileged. It is intended for the addressee(s) only. If you are not the 
intended recipient, please delete this e-mail and notify the postmas...@bl.uk : 
The contents of this e-mail must not be disclosed or copied without the 
sender's consent. 
 
The statements and opinions expressed in this message are those of the author 
and do not necessarily reflect those of the British Library. The British 
Library does not take any responsibility for the views of the author. 
 
*

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



Re: [Tapestry Central] Why chose Tapestry?

2009-06-18 Thread Massimo Lusetti
On Thu, Jun 18, 2009 at 12:37 PM, Onno Scheffers o...@piraya.nl wrote:


  In a small operation you can get away with doing dependency management
  manually, but not for enterprise applications or any development of scale.



 For complex projects especially, I try to keep things simple by adding all
 dependencies directly into the version-control system. New developers can
 just check out the project, load the project-file up in IntelliJ and they
 are ready to go.
 I prefer wasting diskspace over wasting developer time.

Having a maven's proxy let you achieve the same without wasting disk space.
Having a maven proxy is a must have facility if you really want to
work with maven.

Regards
--
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: [Tapestry Central] Why chose Tapestry?

2009-06-18 Thread Alex Shneyderman
Not even that is needed. You can pack your dependencies with your project.
You need to pack those jars in the form maven would recognize it as its
repository. Then you could specify local repo (the one that sits on the file
system) in your parent pom.

On Thu, Jun 18, 2009 at 12:54 PM, Massimo Lusetti mluse...@gmail.comwrote:

 On Thu, Jun 18, 2009 at 12:37 PM, Onno Scheffers o...@piraya.nl wrote:

 
   In a small operation you can get away with doing dependency management
   manually, but not for enterprise applications or any development of
 scale.
 
 
 
  For complex projects especially, I try to keep things simple by adding
 all
  dependencies directly into the version-control system. New developers can
  just check out the project, load the project-file up in IntelliJ and they
  are ready to go.
  I prefer wasting diskspace over wasting developer time.

 Having a maven's proxy let you achieve the same without wasting disk space.
 Having a maven proxy is a must have facility if you really want to
 work with maven.

 Regards
 --
 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.1] Locale - possible to revert to cookies?

2009-06-18 Thread immutability

Alright, for anyone who may need this, I did the following to re-enable the
cookie-based locale in Tapestry 5.1.0.5:

- provided a separate implementation of PersistentLocale service, copying
Tapestry 5.0.18 code, since this interface hasn't changed
- provided a separate implementation of LocalizationSetter service, but this
interface has changed in 5.1, but I only needed to edit one of the methods
in the original 5.1.0.5 code of the LocalizationSetterImpl (namely the
setLocaleFromLocaleName method)
- did the binding of the 2 services in my AppModule, and contributed alias
to ensure that Tapestry picks up my implementations rather than the built-in
ones using Automatic Dependency Resolution
- turned off SymbolConstants.ENCODE_LOCALE_INTO_PATH setting in
contributeApplicationDefaults - this will ensure that tapestry-generated
URLs will not have the locale part embedded

If anyone needs more detailed instructions on this, I can create a how-to.

Rado



immutability wrote:
 
 The new URL-based language switching is also causing issues with the way
 Tapestry-Acegi handles the redirect to the login page once a session
 expires. If a user switches to another language, let's say, Spanish,
 they'll end up on a page with es locale code embedded in the URL, e.g.
 /es/some/page. But if their session expires, Acegi will redirect them to
 the login page, ignoring the locale component of the URL, e.g. /index, and
 thus their language preference is lost. 
 
 I guess it's not possible to revert to cookies easily in T5.1 now? Anyone
 has a workaround for the Tapestry-Acegi issue?
 
 Thanks,
 Rado
 
 
 
 immutability wrote:
 
 Hi everyone, now that Tapestry 5.1.0.5 is encoding the selected locale in
 URL rather than using cookie for this purpose, is it still possible to
 somehow configure Tapestry to use cookies as in 5.0.x? This way worked
 better for our application (i.e. being hidden from the URL and more
 permanent with cookie expiration set to a few days). 
 
 Or is the only way to make it work this way putting together some custom
 code to do this (i.e. store the setting in a cookie, or perhaps even as
 some user-specific setting in a database)?
 
 Thanks,
 Rado
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-T5.1--Locale---possible-to-revert-to-cookies--tp23659027p24090806.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: How to render a page as JSON-formatted AJAX response?

2009-06-18 Thread Alfie Kirkpatrick
Hi Steve, I wrote an overlay component using JQuery which does just
that... in fact you can choose whether the block is rendered initially
or as a result of an AJAX request if you want to delay the evaluation of
what is in the overlay.

You don't need any JSON magic, you just render the block from the
component in a hidden div and expose it from Javascript in your event
handler.

Most of the work for my component was supporting both modes, but it goes
something like the below. If you omit the body parameter, you must
provide an event handler in your page which returns the block to render
on the AJAX call.

IMHO it's pretty elegant... and shows how easy it is to do clever
AJAX/rendering tricks in T5. I can't imagine a framework making it much
easier than this ;-)

Reading the original post am not sure this answers it, but does meet
your objective I think.

Hope it helps,
Alfie.

page.tml
t:overlay t:id=o body=popupClick Me/t:overlay

t:block id=popupThis is my overlay block/t:block

overlay.java
@Parameter
private Object body; // the block to render if immediate (non-AJAX)

@SetupRender
public void setup() {
// allocate the ids we will need
overlayClientId = renderSupport.allocateClientId(overlay);
linkClientId = renderSupport.allocateClientId(overlayLink);
}

@BeginRender
public Object begin(MarkupWriter writer) {
// we render in two phases... the first is the link and the
second
// is the overlay div itself
if (renderOverlayDivPhase) {
writer.element(div, class, overlay, id,
overlayClientId);
if ( body == null ) { // ajax style
String innerId =
renderSupport.allocateClientId(overlayInnerDiv);

// render an inner div where we'll attach the zone for
update
writer.element(div, id, innerId);
writer.end();
clientBehaviorSupport.addZone(innerId, show, show);

// create the dynamic update link
Link link =
resources.createEventLink(EventConstants.ACTION, context);
// ... and link the onclick to the zone via the update
link
clientBehaviorSupport.linkZone(linkClientId, innerId,
link);
return false; // do not render body
}
// a body is supplied so render it
return body;
} else { // just render the link
writer.element(a, href, #, id, linkClientId);
renderSupport.addInit(overlayLoad, overlayClientId,
linkClientId, expose ? exposeColour : none);
return null; // render the link text (component body)
}
}

@BeforeRenderBody
public boolean body() {
// only render the default body if it's the link phase
return !renderOverlayDivPhase;
}

@AfterRender
public boolean after(MarkupWriter writer) {
writer.end();
if ( !renderOverlayDivPhase) {
renderOverlayDivPhase=true;
return false;
}
return true;
}

overlay.js
Tapestry.Initializer.overlayLoad = function(overlayId, linkId,
exposeColour) {
var overlay=jQuery(document.getElementById(overlayId));
var link=jQuery(document.getElementById(linkId));
var expose=(exposeColour != 'none');

jQuery(function() {
overlay.overlay({
onBeforeLoad: function() {
if ( expose ) {
this.getBackgroundImage().expose({color:
exposeColour});
}
},

onClose: function() {
jQuery.expose.close();
},

speed: 'fast',
fadeInSpeed: 'fast'
});
link.click(function(event) {
overlay.overlay().load();
Event.stop(event);
});
});
};

-Original Message-
From: Stephen Cowx [mailto:steve.c...@gmail.com] 
Sent: 18 June 2009 09:20
To: Tapestry users
Cc: users@tapestry.apache.org
Subject: Re: How to render a page as JSON-formatted AJAX response?

I also have an interest in this.

I would like a way of pre-rendering a Block on the server (as if it  
was rendered by an Ajax request handler), storing the rendered block  
as a JS variable in the page HTML and then injecting it into the DOM  
client side when it suits me.  I don't want to have to make a new trip  
to the server to fetch the block via Ajax this is just a means of  
allowing a developer of parameterising his use of my overlay component.

As far as I can tell this requires two things:

1) a way of invoking the Ajax renderer programmatically on the server.
2) a way of invoking the Tapestry.init() function on the client with  
the pre-generated response which is stored in a javascript variable as  
an argument (similar to the updateFromUrl() function but with a client  
side variable instead).  This will ensure that the content gets loaded  
into the client properly.

Steve

On 17 Jun 2009, at 

Re: [Tapestry Central] Why chose Tapestry?

2009-06-18 Thread Thiago H. de Paula Figueiredo
On Thu, Jun 18, 2009 at 1:59 AM, Craig St. Jeancraigstj...@gmail.com wrote:
 Further, there have been too many places where Tapestry 5 does not work with
 X environment (i.e. JBoss 4 or 5 or Glassfish, without modifications) and it
 just gets brushed off as its not our problem, somethings wrong with X

Because, most of the time, these problems are not in Tapestry code and
aren't fixable in Tapestry itself. ;)

 Though I haven't seen anyone trying to import/export a WAR into Eclipse,
 that one kind of surprised me.  All of the Java developers I know (except
 for 1) won't touch Maven, and use project specific Ant scripts on a
 continuous integration server.  The only place where I've found Maven
 convenient is just for obtaining library dependencies.  I then copy them and
 throw Maven away.

You can use Maven 2 dependency features in Ant
(http://maven.apache.org/ant-tasks/index.html) without Maven itself.

-- 
Thiago

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



Re: [Tapestry Central] Why chose Tapestry?

2009-06-18 Thread Thiago H. de Paula Figueiredo
On Thu, Jun 18, 2009 at 7:37 AM, Onno Schefferso...@piraya.nl wrote:
 Of course this cannot work for frameworks like Tapestry, since they are
 bound to license-restrictions regarding distribution.

Tapestry's license is Apache version 2, so I don't think there's any
problem regarding its distribution.

-- 
Thiago

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



Re: [Tapestry Central] Why chose Tapestry?

2009-06-18 Thread Joel Halbert
I hear what your saying, I'm still not convinced :-)


On Thursday 18 June 2009 09:57:11 p.stavrini...@albourne.com wrote:
 Hi Joel,

 I understand your argument with Maven, most people at some point have 'felt
 the pain' but with or without maven the devil is in the details, getting
 started is not that hard really, but customizing Tapestry to your
 environment is very often the root cause or configuration constipation, a
 problem which extends from the world of Java where there are so many
 resources, libraries and tools that it can often be a pain to integrate and
 use all of them efficiently. Its widely acknowledged that Java has inherent
 flaws in versioning and dependancy management (if only I had a penny for
 every post I have seen relating back to classpath, and library versioning
 issues), and thats the problem Maven tries to solve. In a small operation
 you can get away with doing dependency management manually, but not for
 enterprise applications or any development of scale.

 regards,
 Peter

 - Original Message -
 From: Joel Halbert j...@su3analytics.com
 To: users@tapestry.apache.org
 Sent: Thursday, 18 June, 2009 11:37:34 GMT +02:00 Athens, Beirut,
 Bucharest, Istanbul Subject: Re: [Tapestry Central] Why chose Tapestry?

 I'm still not convinced that using Maven is a good thing.
 It's fine for those people that use it day to day already, but for those
 people who have no need/interest in picking up another framework and who
 just want to get on with using Tapestry its a real bug bear.

 I've always just downloaded the binaries for whatever project I'm using and
 dropped them into my project. I very rarely have versioning issues (if
 every at all in fact). I'd go so far as to say that this is preferable -
 you know exactly what code your using, and why, because you've put it there
 yourself rather than having some opaque system under the hood doing it for
 you. This would seem to give you a greater degree of control over whats in
 your environment - important when it comes to deploying.

 On Wednesday 17 June 2009 22:15:23 Norman Franke wrote:
  I did, and that worked using jetty on the command line. Eventually,
  following the other instructions, I was able to even get that working
  in Eclipse. However, it is very basic: no hibernate, no security/
  authentication.
 
  I started following the instructions in the tutorial, which do not work.
 
  Norman Franke
  Answering Service for Directors, Inc.
  www.myasd.com
 
  On Jun 17, 2009, at 2:21 PM, Juan E. Maya wrote:
   did u follow the tapestry quickstart in
   http://tapestry.apache.org/tapestry5.1/quickstart/ ? I don't think it
   could get easier than this. U can even run it inside eclipse if u have
   the m2 plugin for maven.
  
   i do agree with u that the documentation could be better, however,
   reading your message somebody could believe that starting a new
   tapestry project is extremely difficult and it's totally the contrary.
  
   On Wed, Jun 17, 2009 at 7:21 PM, Norman Frankenor...@myasd.com
  
   wrote:
   I've been using T4/4.1 for several years and have been quite
   pleased with
   it. I've been using it with Hibernate, and while not perfect, it's
   worked
   pretty well. We've found it much faster to embed a web browser in
   our main
   app and do editing, queries and the like via Tapestry than writing
   native
   code.
  
   I have a new project to replace our aging billing system. I figured
   this
   would be a great way to learn T5. So, I'm migrating me, not an
   app. :-)
  
   I was pondering posting this, but this thread sort of pushed me
   over the
   top. Note that I don't disagree with anything Howard said. However,
   this
   almost became Why I almost dumped Tapestry entirely.
  
   I'm writing this in order to solicit feedback and maybe help
   others. I've
   been using Tomcat (now 6.0.20) and Eclipse (now 3.4.2) for quite
   time time,
   and I'm very productive developing use them (and T4.1) I think this
   is a
   pretty common development environment.
  
   To get started in T5 for a fresh new app, my first thought was to
   follow the
   tutorial at http://tapestry.apache.org/tapestry5.1/tutorial1/.
  
   Chapter 2 just plain didn't work for me. I think part of it is due
   to Maven
   generally being extremely fragile and working less than half of the
   time.
   However, even after working around that, you can't just import the
   project
   into Eclipse. At least not under Eclipse 3.4.2.
  
   No problem, I thought. Maven is annoying anyway. I'll just create a
   Dynamic
   Web project (like I do for T4.1) and download the T5.1 binary
   distribution.
   That's even worse. It comes with no README listing dependencies or
   anything
   useful, and includes tons of libraries that don't appear to be even
   needed.
   Tapestry failed to start up during initialization. Why have a
   binary distro
   that doesn't work?
  
   Back to Maven. After some googling, I found this article:
   

Re: [Tapestry Central] Why chose Tapestry?

2009-06-18 Thread Massimo Lusetti
On Thu, Jun 18, 2009 at 1:02 PM, Alex Shneyderman
a.shneyder...@gmail.com wrote:


 Not even that is needed. You can pack your dependencies with your project.
 You need to pack those jars in the form maven would recognize it as its
 repository. Then you could specify local repo (the one that sits on the file
 system) in your parent pom.


Sure. The target of a maven proxy is not to have your dep in the repo
(like CVS or SVN source repo) but still have that available. Note I'm
not talking about the distribution but the development of a project.

--
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: How to render a page as JSON-formatted AJAX response?

2009-06-18 Thread Renger Wilde

DH-14:

Yes, I ended up using a block.

For those like me that don't know what a block is, it's an XML-tagged
section of your template, demarcated via block
id=yourIdentifierHere/block tags. The block can be injected into page
or component code using the @Inject annotation as an object of type Block,
with a variable name in the form of _yourIdentifierHere. The variable name
must match the ID used in the block tag - except for the leading
underscore, which is stripped by Tapestry. 

This Block object can be returned from the event handler, and is rendered
prior to being sent back, in JSON form, as the reply to the AJAX request. 

Surely some of you will ask Why was that not obvious at the outset,
Renger?. I can only say that it took me some several re-readings of the
documentation to identify the Block method as a potential solution, and a
few more to figure out how it worked. There is, to my knowledge, no section
of the documentation that sets out what Blocks are, how they work, and what
use-cases they pertain to, with the exception of this excerpt from the AJAX
section of the Tapestry reference:

For an Ajax request, the return value from an event handler method is
processed differently than for a traditional action request. In an normal
request, the return value is the normally name of a page (to redirect to),
or the Class of a page to redirect to, or an instance of a page to redirect
to.

For an Ajax request, a redirect is not sent: any response is rendered as
part of the same request and sent back immediately.

The possible return values are:

* A Block or Component to render as the response. The response will be a
JSON hash, with a content key whose value is the rendered markup. This is
the basis for updates with the Zone component.
* A JSONObject or JSONArray, which will be sent as the response.
* A StreamResponse, which will be sent as the response. 

I say that merely to justify the bandwidth I took up to ask my question. I
remain very appreciative of HLS' work, and I thank the responders for their
attention.

-- 
View this message in context: 
http://www.nabble.com/How-to-render-a-page-as-JSON-formatted-AJAX-response--tp24081692p24091906.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: [Tapestry Central] Why chose Tapestry?

2009-06-18 Thread Ivano Luberti
I'm a T4 user that is evaluating if to move to T5.
If I well understand Norman message, it is not possible to develop with
T5 using Eclipse3.4 with WTP like with T4?

I work in a small company: we use Eclipse 3.4 with WTP. We use SVN for
versioning and ANT to generate deployments.

To introduce Maven would be really time consuming and hence exepnsive.



Norman Franke ha scritto:
 I've been using T4/4.1 for several years and have been quite pleased
 with it. I've been using it with Hibernate, and while not perfect,
 it's worked pretty well. We've found it much faster to embed a web
 browser in our main app and do editing, queries and the like via
 Tapestry than writing native code.

 I have a new project to replace our aging billing system. I figured
 this would be a great way to learn T5. So, I'm migrating me, not an
 app. :-)

 I was pondering posting this, but this thread sort of pushed me over
 the top. Note that I don't disagree with anything Howard said.
 However, this almost became Why I almost dumped Tapestry entirely.

 I'm writing this in order to solicit feedback and maybe help others.
 I've been using Tomcat (now 6.0.20) and Eclipse (now 3.4.2) for quite
 time time, and I'm very productive developing use them (and T4.1) I
 think this is a pretty common development environment.

 To get started in T5 for a fresh new app, my first thought was to
 follow the tutorial at http://tapestry.apache.org/tapestry5.1/tutorial1/.

 Chapter 2 just plain didn't work for me. I think part of it is due to
 Maven generally being extremely fragile and working less than half of
 the time. However, even after working around that, you can't just
 import the project into Eclipse. At least not under Eclipse 3.4.2.

 No problem, I thought. Maven is annoying anyway. I'll just create a
 Dynamic Web project (like I do for T4.1) and download the T5.1 binary
 distribution. That's even worse. It comes with no README listing
 dependencies or anything useful, and includes tons of libraries that
 don't appear to be even needed. Tapestry failed to start up during
 initialization. Why have a binary distro that doesn't work?

 Back to Maven. After some googling, I found this article:
 http://tapestry.formos.com/wiki/display/T5IDEINT/Eclipse+(including+Maven) 
 Shouldn't
 this be included in the tutorial? Sadly, the tutorial is extremely
 basic, but at least it works. (And is the only way I've found to
 actually create a new project in Eclipse to date.)

 Next, I tried Tapestry Jumpstart. After hours of configuration and
 random errors (using Tomcat), it worked. However, it's so fragile and
 klugy that I just can't see using it in production. I don't care about
 OpenEJB. I want just plain T5.1 and Hibernate. Plus running in a
 remote tomcat sessions eliminates many of the developer productivity
 benefits of T5 in the first place. One thing I liked about T4 was that
 I could deploy a WAR to a stock Tomcat install, and it would just
 work. That won't happen with Jumpstart. Plus. it if takes 3 hours to
 just get a working developer environment, why even bother?

 Next up, AppFuse. It's only T4, but there is a Tapestry 5 add-on.
 Sadly, AppFuse's T4 support is now broken due to a dependancy on
 tapestry-flash that appears to be missing and following the
 instructions on the AppFuse Tapestry 5 page doesn't work anymore
 either, resulting in tons of missing resources.

 So, since T5 doesn't appear to provide much in the way of
 authentication / security (a very basic requirement for almost all
 webapps), I started down the tapestry5-acegi approach. Of course, that
 doesn't work with T5.1. I managed to get it working and then upgraded
 to tapestry-spring-security 2.1.0-SNAPSHOT. Still didn't work without
 augmentation. (Thanks to maven for not updating the packages when I
 switched to the snapshot, too. I had to delete the nu directory in
 my ~/.m2 directory. One more reason Maven blows. It just doesn't do
 what you want.)

 I'd love to see more people use Tapestry, but after attempting a new
 project, I'd feel embarrassed asking people to give Tapestry a look at
 this point. Heck, I'm thinking maybe sticking with T4.1 is the way to
 go, despite all the benefits of T5. But, I really do want to start in
 on T5 since I've loved using T4 for the last few years, and it does
 seem to be a step forward.

 I think its common to want to just get something working in order to
 get a feel for the framework. Doing so in Tapestry, at least for me,
 has been a waste of two days. I finally, on the third day, I have
 something that appears to allow the tutorial to work with basic
 security. I'm not sure if others have similar problems and just gave
 up without comment, making other frameworks seem more popular?

 Norman Franke
 Answering Service for Directors, Inc.
 www.myasd.com



 On Jun 16, 2009, at 7:20 PM, Howard wrote:

 I recently had an e-mail exchange with a Tapestry user; after
 congratulating me on creating Tapestry, he went on with the 

Re: [Tapestry Central] Why chose Tapestry?

2009-06-18 Thread Thiago H. de Paula Figueiredo
On Thu, Jun 18, 2009 at 9:46 AM, Ivano Lubertilube...@archicoop.it wrote:
 I'm a T4 user that is evaluating if to move to T5.
 If I well understand Norman message, it is not possible to develop with
 T5 using Eclipse3.4 with WTP like with T4?

I've never used Tapestry with WTP, but I don't know why it wouldn't
work. By the way, I've used WTP before in other projects a couple
years ago and I hated it. I used Sysdeo's Tomcat Launcher and an
exploded WAR project structure. No deploying needed in development.

 I work in a small company: we use Eclipse 3.4 with WTP. We use SVN for
 versioning and ANT to generate deployments.

You don't need to use Maven to work with Tapestry. Just do the
dependency management yourself, like you already do with T4.

-- 
Thiago

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



Re: [Tapestry Central] Why chose Tapestry?

2009-06-18 Thread Brandon Atkinson
Maven by itself is not that big of a deal.  Almost any system using
declarative builds and dependency management would have worked to improve
Java builds.I've felt frustrated by Maven too. I've frequently complained
about the quality of some of the plugins... but...

In the shop I work in, historically every developer was a project manager,
developer, and 'salesman'.  This led to many projects, most using Ant to
build.  Each Ant build would perform fundamentally similar builds, but each
project's build code was different.  You couldn't efficiently work on
another developers project without reading the Ant build first, and you
certainly couldn't expect any certain goals to be defined.  This boils down
to a lack of developer discipline, which is what the Maven lifecycles
enforce.  Moving to maven made our builds consistent.  It took a bunch of
rogue coders and forced them to produce predictable builds; a HUGE
improvement.

That said, this isn't a consulting shop that creates stand alone
applications.  We must maintain anything we create, so creation efficiency
is less of a priority than long term maintainability.  If I were a
consultant and a customer said 'screw the long term' I would whip off an Ant
build.  It can be faster to create.  It also may secure my status as the
sole consultant, if I make my build really wacky ;-D

The real benefit of creating regular builds is that it gives you the ability
to use continuous integration and artifact management.  If you haven't set
up all the infrastructure and tried it, it may seem unneeded.  For our shop,
it has improved things greatly.  In the past, there had been several
occasions where a developer left the company without checking in source code
that was in production.  The developer's code worked for long enough for
their machine to be reformatted and given to someone else, then a bug
surfaced.  Oops... lost source code, with no developer.  Using a continuous
integration server with scheduled and automated deployments prevents any
project from going live without being in source control.  Problem gone.

I do understand that not everyone has these sorts of problems.  For those
that do, maven/continuum/archiva are great.




On Thu, Jun 18, 2009 at 4:37 AM, Joel Halbert j...@su3analytics.com wrote:

 I'm still not convinced that using Maven is a good thing.
 It's fine for those people that use it day to day already, but for those
 people who have no need/interest in picking up another framework and who
 just
 want to get on with using Tapestry its a real bug bear.

 I've always just downloaded the binaries for whatever project I'm using and
 dropped them into my project. I very rarely have versioning issues (if
 every
 at all in fact). I'd go so far as to say that this is preferable - you know
 exactly what code your using, and why, because you've put it there yourself
 rather than having some opaque system under the hood doing it for you. This
 would seem to give you a greater degree of control over whats in your
 environment - important when it comes to deploying.

 On Wednesday 17 June 2009 22:15:23 Norman Franke wrote:
  I did, and that worked using jetty on the command line. Eventually,
  following the other instructions, I was able to even get that working
  in Eclipse. However, it is very basic: no hibernate, no security/
  authentication.
 
  I started following the instructions in the tutorial, which do not work.
 
  Norman Franke
  Answering Service for Directors, Inc.
  www.myasd.com
 
  On Jun 17, 2009, at 2:21 PM, Juan E. Maya wrote:
   did u follow the tapestry quickstart in
   http://tapestry.apache.org/tapestry5.1/quickstart/ ? I don't think it
   could get easier than this. U can even run it inside eclipse if u have
   the m2 plugin for maven.
  
   i do agree with u that the documentation could be better, however,
   reading your message somebody could believe that starting a new
   tapestry project is extremely difficult and it's totally the contrary.
  
   On Wed, Jun 17, 2009 at 7:21 PM, Norman Frankenor...@myasd.com
  
   wrote:
   I've been using T4/4.1 for several years and have been quite
   pleased with
   it. I've been using it with Hibernate, and while not perfect, it's
   worked
   pretty well. We've found it much faster to embed a web browser in
   our main
   app and do editing, queries and the like via Tapestry than writing
   native
   code.
  
   I have a new project to replace our aging billing system. I figured
   this
   would be a great way to learn T5. So, I'm migrating me, not an
   app. :-)
  
   I was pondering posting this, but this thread sort of pushed me
   over the
   top. Note that I don't disagree with anything Howard said. However,
   this
   almost became Why I almost dumped Tapestry entirely.
  
   I'm writing this in order to solicit feedback and maybe help
   others. I've
   been using Tomcat (now 6.0.20) and Eclipse (now 3.4.2) for quite
   time time,
   and I'm very productive developing use them (and 

Re: [Tapestry Central] Why chose Tapestry?

2009-06-18 Thread Joel Halbert
Ivano - I use Eclipse 3.4 with the inbuilt server runtime environment - using 
tomcat  jetty. I don't use Maven, instead I just dropped the few tapestry 5 
jars i  needed into my projects. It should take no time at all to set up, and 
should work fine for you. 


On Thursday 18 June 2009 13:46:40 Ivano Luberti wrote:
 I'm a T4 user that is evaluating if to move to T5.
 If I well understand Norman message, it is not possible to develop with
 T5 using Eclipse3.4 with WTP like with T4?

 I work in a small company: we use Eclipse 3.4 with WTP. We use SVN for
 versioning and ANT to generate deployments.

 To introduce Maven would be really time consuming and hence exepnsive.

 Norman Franke ha scritto:
  I've been using T4/4.1 for several years and have been quite pleased
  with it. I've been using it with Hibernate, and while not perfect,
  it's worked pretty well. We've found it much faster to embed a web
  browser in our main app and do editing, queries and the like via
  Tapestry than writing native code.
 
  I have a new project to replace our aging billing system. I figured
  this would be a great way to learn T5. So, I'm migrating me, not an
  app. :-)
 
  I was pondering posting this, but this thread sort of pushed me over
  the top. Note that I don't disagree with anything Howard said.
  However, this almost became Why I almost dumped Tapestry entirely.
 
  I'm writing this in order to solicit feedback and maybe help others.
  I've been using Tomcat (now 6.0.20) and Eclipse (now 3.4.2) for quite
  time time, and I'm very productive developing use them (and T4.1) I
  think this is a pretty common development environment.
 
  To get started in T5 for a fresh new app, my first thought was to
  follow the tutorial at http://tapestry.apache.org/tapestry5.1/tutorial1/.
 
  Chapter 2 just plain didn't work for me. I think part of it is due to
  Maven generally being extremely fragile and working less than half of
  the time. However, even after working around that, you can't just
  import the project into Eclipse. At least not under Eclipse 3.4.2.
 
  No problem, I thought. Maven is annoying anyway. I'll just create a
  Dynamic Web project (like I do for T4.1) and download the T5.1 binary
  distribution. That's even worse. It comes with no README listing
  dependencies or anything useful, and includes tons of libraries that
  don't appear to be even needed. Tapestry failed to start up during
  initialization. Why have a binary distro that doesn't work?
 
  Back to Maven. After some googling, I found this article:
  http://tapestry.formos.com/wiki/display/T5IDEINT/Eclipse+(including+Maven
 ) Shouldn't this be included in the tutorial? Sadly, the tutorial is
  extremely basic, but at least it works. (And is the only way I've found
  to actually create a new project in Eclipse to date.)
 
  Next, I tried Tapestry Jumpstart. After hours of configuration and
  random errors (using Tomcat), it worked. However, it's so fragile and
  klugy that I just can't see using it in production. I don't care about
  OpenEJB. I want just plain T5.1 and Hibernate. Plus running in a
  remote tomcat sessions eliminates many of the developer productivity
  benefits of T5 in the first place. One thing I liked about T4 was that
  I could deploy a WAR to a stock Tomcat install, and it would just
  work. That won't happen with Jumpstart. Plus. it if takes 3 hours to
  just get a working developer environment, why even bother?
 
  Next up, AppFuse. It's only T4, but there is a Tapestry 5 add-on.
  Sadly, AppFuse's T4 support is now broken due to a dependancy on
  tapestry-flash that appears to be missing and following the
  instructions on the AppFuse Tapestry 5 page doesn't work anymore
  either, resulting in tons of missing resources.
 
  So, since T5 doesn't appear to provide much in the way of
  authentication / security (a very basic requirement for almost all
  webapps), I started down the tapestry5-acegi approach. Of course, that
  doesn't work with T5.1. I managed to get it working and then upgraded
  to tapestry-spring-security 2.1.0-SNAPSHOT. Still didn't work without
  augmentation. (Thanks to maven for not updating the packages when I
  switched to the snapshot, too. I had to delete the nu directory in
  my ~/.m2 directory. One more reason Maven blows. It just doesn't do
  what you want.)
 
  I'd love to see more people use Tapestry, but after attempting a new
  project, I'd feel embarrassed asking people to give Tapestry a look at
  this point. Heck, I'm thinking maybe sticking with T4.1 is the way to
  go, despite all the benefits of T5. But, I really do want to start in
  on T5 since I've loved using T4 for the last few years, and it does
  seem to be a step forward.
 
  I think its common to want to just get something working in order to
  get a feel for the framework. Doing so in Tapestry, at least for me,
  has been a waste of two days. I finally, on the third day, I have
  something that appears to allow the tutorial 

Re: [Tapestry Central] Why chose Tapestry?

2009-06-18 Thread Ivano Luberti
Well Thiago I would say that Eclipse 3.4 is a big step forward with
respect to 3.3 and even more with respect to 3.2 and 3.1.


Thiago H. de Paula Figueiredo ha scritto:

 I've never used Tapestry with WTP, but I don't know why it wouldn't
 work. By the way, I've used WTP before in other projects a couple
 years ago and I hated it. I used Sysdeo's Tomcat Launcher and an
 exploded WAR project structure. No deploying needed in development.

   
neither in Eclise3.4


 I work in a small company: we use Eclipse 3.4 with WTP. We use SVN for
 versioning and ANT to generate deployments.
 

 You don't need to use Maven to work with Tapestry. Just do the
 dependency management yourself, like you already do with T4.

   
Ok , great

-- 
==
dott. Ivano Mario Luberti
Archimede Informatica societa' cooperativa a r. l.
Sede Operativa
Via Gereschi 36 - 56126- Pisa
tel.: +39-050- 580959
tel/fax: +39-050-9711344
web: www.archicoop.it
==


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



[T:5.1.0.5] Ajax form submit

2009-06-18 Thread kace

I have the following situation 

I have a page with a number of components:

the first component is a list of elements - if I click on any element it it
fires off an ajax request and returns a block that has another component in
it (where i can view further details of that element) - in this component 
there is an edit link which fires off an ajax request and displays the
editable version in another block.  

Now I have a form that is in a block that I am looking to edit and then
save/update via a submit button.  If the edit form is in its own page and
not enclosed in a block I can save/update no problem.  However, when the
situation is like the one described above then I get the following error in
firebug when clicking the submit button: 

e is null
var t = e._tapestry;  (Tapestry.js - line 1783).

Thats the only error I see - anyone any ideas on how to figure this out?

Appreciate any help.

Thanks, 

..kace 

 
-- 
View this message in context: 
http://www.nabble.com/-T%3A5.1.0.5--Ajax-form-submit-tp24094076p24094076.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



@AfterRender in AJAX requests

2009-06-18 Thread Thiago H. de Paula Figueiredo
Hi!

I'm trying to execute some Javascript code to hook up some events to
some TextFields in a page. Thus, I need their clientIds. When in an
AJAX request, the TextFields are rendered again with other clientIds,
so I need to generate the Javascript event hooking again.I created a
method annotated with @AfterRender and use RenderSupport to generate
the event hooking code. In a full page request, my method is called
and everything is fine.  But, in an AJAX request, my @AfterRender
method is not invoked and my @BeginRender is invoked (it returns
void). I cannot use @BeginRender in this case because the fields
client ids are only defined during rendering.

What am I missing?

-- 
Thiago

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



Re: ChenilleKit Mail -- How to Use? or Any Mailer?

2009-06-18 Thread newtonik


P.Stavrinides wrote:
 
 
 Which version of CK are you using?
 
 --
 Massimo
 http://meridio.blogspot.com
 

I am using 1.0.2
I compared the two versions I saw, the only difference I could see was they
were the properties where retrieved. 



Thanks everyone, I will try the suggestions tonight and I am sure one will
work. 
-- 
View this message in context: 
http://www.nabble.com/ChenilleKit-MailHow-to-Use--or-Any-Mailer--tp24085676p24094796.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



Where did all the components come from?

2009-06-18 Thread Erick Erickson
An utter Tapestry newbie here, although I was at some recent training Howard
gave.

My question is, Given a page composed of components, is there an easy,
visual
way to analyze the structure in terms of custom components *from the browser
*?.
The problem I'm trying to address is the most efficient way to bring someone
new
(me, in this case G) up to speed on a project.

A person can use some of the browser tools to examine the HTML, but that
doesn't relate very well back to the raw files (components) they came from.

I hacked together a script that inserts an img tag in all my local copies
of
the .tml files, with a title attribute of the file path that .tml came from.
Now,
when I'm viewing prior art I can hover over the icons I've inserted and see
the
full file path that the  .tml came from.

This allows me to figure out that component X contains component Y which
in turn contains component Z in a *visual* way, which makes it *much* easier

to understand the relationships between components,  as well as know  what
the visual result of using a component is. Of course  there's no way I'd
consider
checking this in, it's strictly for local usage. This is more
proof-of-concept, but
even in this crude form I'm finding it very helpful.

Now when presented with another page to implement, I have a better chance of
saying Look, page X does something similar, and uses components Y and Z.
I wonder if those components are a good place to start?.

Of course, this messes with the formatting of the page, things move around,
etc,
but that's not important for me now.

My question for the list is Is anything similar already built into Tapestry
but
I just haven't found it yet?. Or are there any best practices others have
used?

Best
Erick


Re: [Tapestry Central] Why chose Tapestry?

2009-06-18 Thread Norman Franke
It does work, after some fiddling. On the wiki there were some good  
notes on getting control-space completion to work with Tapestry using  
the JSP editor. I was also quite used to working with WTP, but I did  
get it working. Follow this:


http://tapestry.formos.com/wiki/display/T5IDEINT/Eclipse+(including+Maven)

Then: http://wiki.apache.org/tapestry/Tapestry5JSPEditorEclipse
(Which needs to be updated for the 5.1 XTD, btw.)

Now I can develop using WTP.

Norman Franke
Answering Service for Directors, Inc.
www.myasd.com



On Jun 18, 2009, at 8:46 AM, Ivano Luberti wrote:


I'm a T4 user that is evaluating if to move to T5.
If I well understand Norman message, it is not possible to develop  
with

T5 using Eclipse3.4 with WTP like with T4?

I work in a small company: we use Eclipse 3.4 with WTP. We use SVN for
versioning and ANT to generate deployments.

To introduce Maven would be really time consuming and hence exepnsive.



Norman Franke ha scritto:

I've been using T4/4.1 for several years and have been quite pleased
with it. I've been using it with Hibernate, and while not perfect,
it's worked pretty well. We've found it much faster to embed a web
browser in our main app and do editing, queries and the like via
Tapestry than writing native code.

I have a new project to replace our aging billing system. I figured
this would be a great way to learn T5. So, I'm migrating me, not an
app. :-)

I was pondering posting this, but this thread sort of pushed me over
the top. Note that I don't disagree with anything Howard said.
However, this almost became Why I almost dumped Tapestry entirely.

I'm writing this in order to solicit feedback and maybe help others.
I've been using Tomcat (now 6.0.20) and Eclipse (now 3.4.2) for quite
time time, and I'm very productive developing use them (and T4.1) I
think this is a pretty common development environment.

To get started in T5 for a fresh new app, my first thought was to
follow the tutorial at http://tapestry.apache.org/tapestry5.1/tutorial1/ 
.


Chapter 2 just plain didn't work for me. I think part of it is due to
Maven generally being extremely fragile and working less than half of
the time. However, even after working around that, you can't just
import the project into Eclipse. At least not under Eclipse 3.4.2.

No problem, I thought. Maven is annoying anyway. I'll just create a
Dynamic Web project (like I do for T4.1) and download the T5.1 binary
distribution. That's even worse. It comes with no README listing
dependencies or anything useful, and includes tons of libraries that
don't appear to be even needed. Tapestry failed to start up during
initialization. Why have a binary distro that doesn't work?

Back to Maven. After some googling, I found this article:
http://tapestry.formos.com/wiki/display/T5IDEINT/Eclipse+(including+Maven) 
 Shouldn't

this be included in the tutorial? Sadly, the tutorial is extremely
basic, but at least it works. (And is the only way I've found to
actually create a new project in Eclipse to date.)

Next, I tried Tapestry Jumpstart. After hours of configuration and
random errors (using Tomcat), it worked. However, it's so fragile and
klugy that I just can't see using it in production. I don't care  
about

OpenEJB. I want just plain T5.1 and Hibernate. Plus running in a
remote tomcat sessions eliminates many of the developer productivity
benefits of T5 in the first place. One thing I liked about T4 was  
that

I could deploy a WAR to a stock Tomcat install, and it would just
work. That won't happen with Jumpstart. Plus. it if takes 3 hours to
just get a working developer environment, why even bother?

Next up, AppFuse. It's only T4, but there is a Tapestry 5 add-on.
Sadly, AppFuse's T4 support is now broken due to a dependancy on
tapestry-flash that appears to be missing and following the
instructions on the AppFuse Tapestry 5 page doesn't work anymore
either, resulting in tons of missing resources.

So, since T5 doesn't appear to provide much in the way of
authentication / security (a very basic requirement for almost all
webapps), I started down the tapestry5-acegi approach. Of course,  
that

doesn't work with T5.1. I managed to get it working and then upgraded
to tapestry-spring-security 2.1.0-SNAPSHOT. Still didn't work without
augmentation. (Thanks to maven for not updating the packages when I
switched to the snapshot, too. I had to delete the nu directory in
my ~/.m2 directory. One more reason Maven blows. It just doesn't do
what you want.)

I'd love to see more people use Tapestry, but after attempting a new
project, I'd feel embarrassed asking people to give Tapestry a look  
at

this point. Heck, I'm thinking maybe sticking with T4.1 is the way to
go, despite all the benefits of T5. But, I really do want to start in
on T5 since I've loved using T4 for the last few years, and it does
seem to be a step forward.

I think its common to want to just get something working in order to
get a feel for the framework. Doing so 

Re: [Tapestry Central] Why chose Tapestry?

2009-06-18 Thread Norman Franke
That's precisely what I was used to. I had to learn much more about  
Maven that I wanted to just get started with a trivial T5 app until I  
found the secret instructions on a blog post from Howard. I haven't  
even tried deploying anything non-trivial yet.


Norman Franke
Answering Service for Directors, Inc.
www.myasd.com



On Jun 18, 2009, at 4:37 AM, Joel Halbert wrote:


I'm still not convinced that using Maven is a good thing.
It's fine for those people that use it day to day already, but for  
those
people who have no need/interest in picking up another framework and  
who just

want to get on with using Tapestry its a real bug bear.

I've always just downloaded the binaries for whatever project I'm  
using and
dropped them into my project. I very rarely have versioning issues  
(if every
at all in fact). I'd go so far as to say that this is preferable -  
you know
exactly what code your using, and why, because you've put it there  
yourself
rather than having some opaque system under the hood doing it for  
you. This

would seem to give you a greater degree of control over whats in your
environment - important when it comes to deploying.

On Wednesday 17 June 2009 22:15:23 Norman Franke wrote:

I did, and that worked using jetty on the command line. Eventually,
following the other instructions, I was able to even get that working
in Eclipse. However, it is very basic: no hibernate, no security/
authentication.

I started following the instructions in the tutorial, which do not  
work.


Norman Franke
Answering Service for Directors, Inc.
www.myasd.com

On Jun 17, 2009, at 2:21 PM, Juan E. Maya wrote:

did u follow the tapestry quickstart in
http://tapestry.apache.org/tapestry5.1/quickstart/ ? I don't think  
it
could get easier than this. U can even run it inside eclipse if u  
have

the m2 plugin for maven.

i do agree with u that the documentation could be better, however,
reading your message somebody could believe that starting a new
tapestry project is extremely difficult and it's totally the  
contrary.


On Wed, Jun 17, 2009 at 7:21 PM, Norman Frankenor...@myasd.com

wrote:

I've been using T4/4.1 for several years and have been quite
pleased with
it. I've been using it with Hibernate, and while not perfect, it's
worked
pretty well. We've found it much faster to embed a web browser in
our main
app and do editing, queries and the like via Tapestry than writing
native
code.

I have a new project to replace our aging billing system. I figured
this
would be a great way to learn T5. So, I'm migrating me, not an
app. :-)

I was pondering posting this, but this thread sort of pushed me
over the
top. Note that I don't disagree with anything Howard said. However,
this
almost became Why I almost dumped Tapestry entirely.

I'm writing this in order to solicit feedback and maybe help
others. I've
been using Tomcat (now 6.0.20) and Eclipse (now 3.4.2) for quite
time time,
and I'm very productive developing use them (and T4.1) I think this
is a
pretty common development environment.

To get started in T5 for a fresh new app, my first thought was to
follow the
tutorial at http://tapestry.apache.org/tapestry5.1/tutorial1/.

Chapter 2 just plain didn't work for me. I think part of it is due
to Maven
generally being extremely fragile and working less than half of the
time.
However, even after working around that, you can't just import the
project
into Eclipse. At least not under Eclipse 3.4.2.

No problem, I thought. Maven is annoying anyway. I'll just create a
Dynamic
Web project (like I do for T4.1) and download the T5.1 binary
distribution.
That's even worse. It comes with no README listing dependencies or
anything
useful, and includes tons of libraries that don't appear to be even
needed.
Tapestry failed to start up during initialization. Why have a
binary distro
that doesn't work?

Back to Maven. After some googling, I found this article:
http://tapestry.formos.com/wiki/display/T5IDEINT/Eclipse+(including+Mave
n) Shouldn't
this be included in the tutorial? Sadly, the tutorial is extremely
basic,
but at least it works. (And is the only way I've found to actually
create a
new project in Eclipse to date.)

Next, I tried Tapestry Jumpstart. After hours of configuration and
random
errors (using Tomcat), it worked. However, it's so fragile and
klugy that I
just can't see using it in production. I don't care about OpenEJB.
I want
just plain T5.1 and Hibernate. Plus running in a remote tomcat
sessions
eliminates many of the developer productivity benefits of T5 in the
first
place. One thing I liked about T4 was that I could deploy a WAR to
a stock
Tomcat install, and it would just work. That won't happen with
Jumpstart.
Plus. it if takes 3 hours to just get a working developer
environment, why
even bother?

Next up, AppFuse. It's only T4, but there is a Tapestry 5 add-on.
Sadly,
AppFuse's T4 support is now broken due to a dependancy on tapestry-
flash
that appears to be missing and following the instructions 

Re: tapestry-spring-security update

2009-06-18 Thread Norman Franke
Do others have this working without a  
contributeComponentClassTransformWorker? I'd like to have it working  
normally, if possible.


Norman Franke
Answering Service for Directors, Inc.
www.myasd.com



On Jun 17, 2009, at 1:08 PM, Norman Franke wrote:

It does not appear to solve the @Secured issue for me under  
T5.1.0.5. I still need to add the:  
contributeComponentClassTransformWorker method in my  
AppModules.java. Otherwise, @Secured is ignored.


Norman Franke
Answering Service for Directors, Inc.
www.myasd.com



On May 29, 2009, at 5:32 PM, Thiago H. de Paula Figueiredo wrote:

On Fri, May 29, 2009 at 3:34 PM, Robin Helgelin lob...@gmail.com  
wrote:



Hi,


Hi!


I've just uploaded a 2.1.0-SNAPSHOT release of
tapestry-spring-security with support for Tapestry 5.1.
We're releasing this as a SNAPSHOT so that we can see that it  
actually

works for everybody before we make the final release.


Thank you! Does it solve the @Secured annotation handling? It is
broken in 2.0 when used with T5.1.

--
Thiago

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







Re: [Tapestry Central] Why chose Tapestry?

2009-06-18 Thread Kalle Korhonen
This is a funny thread. Maybe it'd be better to spend all this energy
in learning the tools rather than complaining. Whatever the tool is,
understand that the dependencies are yours to manage. The truth is
that today's applications written in Java are so complex and comprised
of so many little libraries that maintaining it all manually is
painstakingly slow and error-prone. I take automatic transitive
dependency management any day even though it sometimes means I need to
resort to long list of excludes and at times explicitly *decide* and
declare which version of a particular library I actually want to use
in my application in case of conflicts. In return, I get an
environment that is easy to maintain by myself only and other people
in my group don't have to go through the same trouble of setting
everything up one library at a time. My designers are happily running
mvn jetty:run and editing the templates on-the-fly with their little
Dreamweavers, BlueFishes and Notepads or whatever the heck they want
to use without ever having to know that such a thing as compilation or
dependency resolution is happening all automatically for them.

Kalle


On Thu, Jun 18, 2009 at 9:37 AM, Norman Frankenor...@myasd.com wrote:
 That's precisely what I was used to. I had to learn much more about Maven
 that I wanted to just get started with a trivial T5 app until I found the
 secret instructions on a blog post from Howard. I haven't even tried
 deploying anything non-trivial yet.

 Norman Franke
 Answering Service for Directors, Inc.
 www.myasd.com



 On Jun 18, 2009, at 4:37 AM, Joel Halbert wrote:

 I'm still not convinced that using Maven is a good thing.
 It's fine for those people that use it day to day already, but for those
 people who have no need/interest in picking up another framework and who
 just
 want to get on with using Tapestry its a real bug bear.

 I've always just downloaded the binaries for whatever project I'm using
 and
 dropped them into my project. I very rarely have versioning issues (if
 every
 at all in fact). I'd go so far as to say that this is preferable - you
 know
 exactly what code your using, and why, because you've put it there
 yourself
 rather than having some opaque system under the hood doing it for you.
 This
 would seem to give you a greater degree of control over whats in your
 environment - important when it comes to deploying.

 On Wednesday 17 June 2009 22:15:23 Norman Franke wrote:

 I did, and that worked using jetty on the command line. Eventually,
 following the other instructions, I was able to even get that working
 in Eclipse. However, it is very basic: no hibernate, no security/
 authentication.

 I started following the instructions in the tutorial, which do not work.

 Norman Franke
 Answering Service for Directors, Inc.
 www.myasd.com

 On Jun 17, 2009, at 2:21 PM, Juan E. Maya wrote:

 did u follow the tapestry quickstart in
 http://tapestry.apache.org/tapestry5.1/quickstart/ ? I don't think it
 could get easier than this. U can even run it inside eclipse if u have
 the m2 plugin for maven.

 i do agree with u that the documentation could be better, however,
 reading your message somebody could believe that starting a new
 tapestry project is extremely difficult and it's totally the contrary.

 On Wed, Jun 17, 2009 at 7:21 PM, Norman Frankenor...@myasd.com

 wrote:

 I've been using T4/4.1 for several years and have been quite
 pleased with
 it. I've been using it with Hibernate, and while not perfect, it's
 worked
 pretty well. We've found it much faster to embed a web browser in
 our main
 app and do editing, queries and the like via Tapestry than writing
 native
 code.

 I have a new project to replace our aging billing system. I figured
 this
 would be a great way to learn T5. So, I'm migrating me, not an
 app. :-)

 I was pondering posting this, but this thread sort of pushed me
 over the
 top. Note that I don't disagree with anything Howard said. However,
 this
 almost became Why I almost dumped Tapestry entirely.

 I'm writing this in order to solicit feedback and maybe help
 others. I've
 been using Tomcat (now 6.0.20) and Eclipse (now 3.4.2) for quite
 time time,
 and I'm very productive developing use them (and T4.1) I think this
 is a
 pretty common development environment.

 To get started in T5 for a fresh new app, my first thought was to
 follow the
 tutorial at http://tapestry.apache.org/tapestry5.1/tutorial1/.

 Chapter 2 just plain didn't work for me. I think part of it is due
 to Maven
 generally being extremely fragile and working less than half of the
 time.
 However, even after working around that, you can't just import the
 project
 into Eclipse. At least not under Eclipse 3.4.2.

 No problem, I thought. Maven is annoying anyway. I'll just create a
 Dynamic
 Web project (like I do for T4.1) and download the T5.1 binary
 distribution.
 That's even worse. It comes with no README listing dependencies or
 anything
 useful, and includes tons of 

Re: Where did all the components come from?

2009-06-18 Thread Thiago H. de Paula Figueiredo
Em Thu, 18 Jun 2009 13:29:29 -0300, Erick Erickson  
erickerick...@gmail.com escreveu:


An utter Tapestry newbie here, although I was at some recent training  
Howard gave.


Welcome to the Tapestry mailing list and community!


My question is, Given a page composed of components, is there an easy,
visual way to analyze the structure in terms of custom components *from  
the browser *?.
The problem I'm trying to address is the most efficient way to bring  
someone new (me, in this case G) up to speed on a project.


Howard thought of something like that, but in the form of comments, but  
hasn't implemented it yet: https://issues.apache.org/jira/browse/TAP5-742.  
Your proposition can also be a debugging tool. :) By the way, Tapestry's  
JIRA is the place to post bugs and requests for enhancements.


Tapestry is very configurable, so I guess it is possible to do  
something like that with a ComponentClassTransformWorker or decorating  
some Tapestry service I don't have the time to find out which one now.


Now, when I'm viewing prior art I can hover over the icons I've inserted  
and


This mention to prior art reminded me of software patent discussions in  
Slashdot . . . hehehe


--
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: tapestry-spring-security update

2009-06-18 Thread Thiago H. de Paula Figueiredo
Em Thu, 18 Jun 2009 13:40:30 -0300, Norman Franke nor...@myasd.com  
escreveu:



Do others have this working without a
contributeComponentClassTransformWorker? I'd like to have it working
normally, if possible.


It's working for me out of the box.

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



Tapestry and org.restlet ?

2009-06-18 Thread jose luis sanchez

Hello all.
I'm developing a restlet based application, based on org.restlet 
framework 1.1.5 ( latest stable ), BUT would like to add a web-interface 
for similar stuff in the same deployment.
Being tapestry 5.1.0.5 a restful?less? framework, how could this be 
achieved ?


Can i mix both ? does tapestry allow the handling of 'restlets' resource 
using get/post/delete/put commands ?


Thanks in advance.


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



Re: Where did all the components come from?

2009-06-18 Thread Howard Lewis Ship
I'm focusing on documentation for the moment, so code enhancements are going
to be deferred.

Tapestry 3 had the Inspector a way of digging down through the structure
of the page. I've floated the idea of a special development-mode-only query
parameter that would display the structure of the page rather then render it
normally. Another option was another query parameter to enable comments that
would trace what components were responsible (i.e., a comment at the start
and end of each component's render).

On Thu, Jun 18, 2009 at 9:29 AM, Erick Erickson erickerick...@gmail.comwrote:

 An utter Tapestry newbie here, although I was at some recent training
 Howard
 gave.

 My question is, Given a page composed of components, is there an easy,
 visual
 way to analyze the structure in terms of custom components *from the
 browser
 *?.
 The problem I'm trying to address is the most efficient way to bring
 someone
 new
 (me, in this case G) up to speed on a project.

 A person can use some of the browser tools to examine the HTML, but that
 doesn't relate very well back to the raw files (components) they came from.

 I hacked together a script that inserts an img tag in all my local copies
 of
 the .tml files, with a title attribute of the file path that .tml came
 from.
 Now,
 when I'm viewing prior art I can hover over the icons I've inserted and see
 the
 full file path that the  .tml came from.

 This allows me to figure out that component X contains component Y which
 in turn contains component Z in a *visual* way, which makes it *much*
 easier

 to understand the relationships between components,  as well as know  what
 the visual result of using a component is. Of course  there's no way I'd
 consider
 checking this in, it's strictly for local usage. This is more
 proof-of-concept, but
 even in this crude form I'm finding it very helpful.

 Now when presented with another page to implement, I have a better chance
 of
 saying Look, page X does something similar, and uses components Y and Z.
 I wonder if those components are a good place to start?.

 Of course, this messes with the formatting of the page, things move around,
 etc,
 but that's not important for me now.

 My question for the list is Is anything similar already built into
 Tapestry
 but
 I just haven't found it yet?. Or are there any best practices others have
 used?

 Best
 Erick




-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos


Re: tapestry-spring-security update

2009-06-18 Thread Norman Franke
I checked my .plugins, and a 2.0.0 copy of the plugin was still there.  
It wouldn't deleted it, so I had to stop the server, manually delete,  
then restart. Now it works great. Thanks!


Norman Franke
Answering Service for Directors, Inc.
www.myasd.com



On Jun 18, 2009, at 1:01 PM, Thiago H. de Paula Figueiredo wrote:

Em Thu, 18 Jun 2009 13:40:30 -0300, Norman Franke nor...@myasd.com  
escreveu:



Do others have this working without a
contributeComponentClassTransformWorker? I'd like to have it working
normally, if possible.


It's working for me out of the box.

--
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: [Tapestry Central] Why chose Tapestry?

2009-06-18 Thread Onno Scheffers
  Of course this cannot work for frameworks like Tapestry, since they are
  bound to license-restrictions regarding distribution.

 Tapestry's license is Apache version 2, so I don't think there's any
 problem regarding its distribution.



I know, I actually meant the other way around  :o)
I don't have a problem, but Tapesty may get into trouble if it included
everything in the SVN repository like I said, since 3rd party libraries
might place more restrictions on redistribution (GPL license for example).

Then again IANAL.

regards,

Onno


RE: [Tapestry Central] Why chose Tapestry?

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

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

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

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

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

Re: Tapestry and org.restlet ?

2009-06-18 Thread Thiago H. de Paula Figueiredo
Em Thu, 18 Jun 2009 14:08:36 -0300, jose luis sanchez josete...@yahoo.es  
escreveu:



Hello all.


Hi!

I'm developing a restlet based application, based on org.restlet  
framework 1.1.5 ( latest stable ), BUT would like to add a web-interface  
for similar stuff in the same deployment.
Being tapestry 5.1.0.5 a restful?less? framework, how could this be  
achieved ?
Can i mix both ? does tapestry allow the handling of 'restlets' resource  
using get/post/delete/put commands ?


There is already an implementation of RESTful services in Tapestry by Bill  
Holloway:  
http://www.nabble.com/T5%3A-RESTful-web-services-module-td21124513s302.html#a21124513  
It should give you some insights.


--
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: Switch from Prototype to jQuery?

2009-06-18 Thread ice

That sounds a real way forward to me. Take the minimum set of required
features (and even better if done by the author of jQuery), and use it as
your javascript abstraction layer. 

keep up with the great work Onno!


Onno Scheffers wrote:
 
 Sizzle. It's created by John Resig, the author of jQuery.
 It will be (or maybe already is?) the new selector engine for jQuery. It
 might indeed be a very nice solution for supporting frameworks that
 haven't
 got a CSS selector implemented yet. It would make life a lot easier :o)
 



-- 
View this message in context: 
http://n2.nabble.com/Switch-from-Prototype-to-jQuery--tp2245624p3115375.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



Re: Where did all the components come from?

2009-06-18 Thread César Lesc
By the way Smalltalk Seaside framework has a special mode called
Halos, when this mode is enabled all the components have an enclosed
div with a toolbar, and you can inspect his state and  the html that
this component is generating, would be great to have something like
that in tapestry :)

here is the link http://www.seaside.st/about/examples/halos

César.

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



Re: Where did all the components come from?

2009-06-18 Thread Piero Sartini
Am Donnerstag, 18. Juni 2009 22:24:39 schrieb César Lesc:
 By the way Smalltalk Seaside framework has a special mode called
 Halos, when this mode is enabled all the components have an enclosed
 div with a toolbar, and you can inspect his state and  the html that
 this component is generating, would be great to have something like
 that in tapestry :)

Yeah... I really love this feature. Not only inspect the state and html - you 
are able to change the code on the fly! Seaside is so beautiful in so many 
ways, but most of that is because of the very dynamic nature of smalltalk.

From a productivity point of view this can hardly be beaten by any other web 
framework I have seen so far. It's plain fun to work with.

That said - we all have hard times to explain to people why we want to use 
tapestry instead of JSF or Struts... I don't want to test how people react to 
seaside and smalltalk :D

Piero





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



Re: Exception constructing service 'Alias' with Tapestry-spring-security

2009-06-18 Thread Juan E. Maya
I finally make it worked by using @InjectService

It works but i don't get why :S

On Thu, Jun 18, 2009 at 9:17 PM, Juan E. Mayamaya.j...@gmail.com wrote:
 I have been struggling with this one for quiet a while:

 When i include the tapestry-spring-security.jar (ver: 2.1.0-SNAPSHOT)
 i am having a problem when
 i tried to contribute the ApplicationDefaults.

 It's pretty strange. The following code doesn't work: (The exception
 is attachaed at the end)


        public static void
 contributeApplicationDefaults(MappedConfigurationString, String
 configuration, ConfigurationService c) {
        ...
        }

 If i remove the tapestry-spring-security.jar the applications starts
 without problems. Also it works without problems if  leave the
 security module in the classpath and  change the code to:
        public static void
 contributeApplicationDefaults(MappedConfigurationString, String
 configuration) {
        ...
        }


 I checked already that my contributions (Actually all my methods )
 inside the module were static and made sure my classpath is clean
 without conflicts.
 am i missing something here?



 Exception:
        [ERROR] TapestryModule.ServletApplicationInitializer Construction of
 service ServletApplicationInitializer failed: Unable to instantiate
 class org.apache.tapestry5.services.TapestryModule as a module:
 Exception constructing service 'Alias': Error invoking service builder
 method org.apache.tapestry5.services.TapestryModule.buildAlias(Logger,
 String, AliasManager, Collection) (at TapestryModule.java:325) (for
 service 'Alias'): Error invoking service contribution method
 nu.localhost.tapestry5.springsecurity.services.SecurityModule.contributeAlias(SaltSourceService,
 AuthenticationProcessingFilter, Configuration): Error building service
 proxy for service 'RealAuthenticationProcessingFilter' (at
 nu.localhost.tapestry5.springsecurity.services.SecurityModule.buildRealAuthenticationProcessingFilter(AuthenticationManager,
 RememberMeServices, String, String, String) (at
 SecurityModule.java:247)): Error invoking service builder method
 nu.localhost.tapestry5.springsecurity.services.SecurityModule.buildRealAuthenticationProcessingFilter(AuthenticationManager,
 RememberMeServices, String, String, String) (at
 SecurityModule.java:247) (for service
 'RealAuthenticationProcessingFilter'): Exception constructing service
 'ApplicationDefaults': Error invoking constructor
 org.apache.tapestry5.ioc.internal.services.MapSymbolProvider(Map) (at
 MapSymbolProvider.java:30) via
 org.apache.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder)
 (at TapestryIOCModule.java:43) (for service 'ApplicationDefaults'):
 Error invoking service contribution method
 com.rinco.misacas.web.services.MisacasModule.contributeApplicationDefaults(MappedConfiguration,
 ConfigurationService): Exception constructing service 'Alias':
 Construction of service 'Alias' has failed due to recursion: the
 service depends on itself in some way. Please check
 org.apache.tapestry5.services.TapestryModule.buildAlias(Logger,
 String, AliasManager, Collection) (at TapestryModule.java:325) for
 references to another service that is itself dependent on service
 'Alias'.
 java.lang.RuntimeException: Unable to instantiate class
 org.apache.tapestry5.services.TapestryModule as a module: Exception
 constructing service 'Alias': Error invoking service builder method
 org.apache.tapestry5.services.TapestryModule.buildAlias(Logger,
 String, AliasManager, Collection) (at TapestryModule.java:325) (for
 service 'Alias'): Error invoking service contribution method
 nu.localhost.tapestry5.springsecurity.services.SecurityModule.contributeAlias(SaltSourceService,
 AuthenticationProcessingFilter, Configuration): Error building service
 proxy for service 'RealAuthenticationProcessingFilter' (at
 nu.localhost.tapestry5.springsecurity.services.SecurityModule.buildRealAuthenticationProcessingFilter(AuthenticationManager,
 RememberMeServices, String, String, String) (at
 SecurityModule.java:247)): Error invoking service builder method
 nu.localhost.tapestry5.springsecurity.services.SecurityModule.buildRealAuthenticationProcessingFilter(AuthenticationManager,
 RememberMeServices, String, String, String) (at
 SecurityModule.java:247) (for service
 'RealAuthenticationProcessingFilter'): Exception constructing service
 'ApplicationDefaults': Error invoking constructor
 org.apache.tapestry5.ioc.internal.services.MapSymbolProvider(Map) (at
 MapSymbolProvider.java:30) via
 org.apache.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder)
 (at TapestryIOCModule.java:43) (for service 'ApplicationDefaults'):
 Error invoking service contribution method
 com.rinco.misacas.web.services.MisacasModule.contributeApplicationDefaults(MappedConfiguration,
 ConfigurationService): Exception constructing service 'Alias':
 Construction of service 'Alias' has failed due to recursion: the
 service depends on itself in some way. Please check
 

T5 + Hibernate + Hibernate Tools

2009-06-18 Thread Norman Franke
We have an existing database schema that's rather large. I've used  
Hibernate Tools to generate the .java entity files, complete with  
@Entity annotations so Hibernate picks them up automatically. That  
works very well.


Next, I want to use BeanEditForm to edit the tables. I can't really  
add @Id, @NonVisual, or @Validate to the classes, since they'll be  
overwritten every time I re-generate the classes when I add or modify  
a table.


What's the best way to do this? Is there some way to do this in  
a .properties file? Some fancy dynamic class augmentation scheme? I  
have over 100 tables, so something with minimal maintenance would be  
best.


Norman Franke
Answering Service for Directors, Inc.
www.myasd.com





Re: T5 + Hibernate + Hibernate Tools

2009-06-18 Thread Thiago H. de Paula Figueiredo
Em Thu, 18 Jun 2009 18:29:37 -0300, Norman Franke nor...@myasd.com  
escreveu:



Next, I want to use BeanEditForm to edit the tables. I can't really
add @Id, @NonVisual, or @Validate to the classes, since they'll be
overwritten every time I re-generate the classes when I add or modify
a table.


Take a look at  
http://tapestry.apache.org/tapestry5.1/guide/beaneditform.html, section  
Customizing the BeanModel.
To add validation without touching entity class sources, take a look at  
the ValidationConstraintsGenerator interface.


--
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: Page event after activation?

2009-06-18 Thread Thiago H. de Paula Figueiredo
Em Thu, 18 Jun 2009 18:29:30 -0300, Piero Sartini li...@pierosartini.de  
escreveu:



AbstractPage - MyPage

Now, in AbstractPage there is also some common logic that is equal for  
all pages. For example I need to change the included stylesheet based on  
some

conditions.


For this purpose I created an abstract method that my pages need to  
provide. (getUser() for example). This all works perfect - BUT my pages  
should be able to use different activation contexts and use this  
information to provide their implementation of getUser().


Each class can have as many onActivate() methods as you want. But I would  
have a single onActivate(EventContext context) method and let the  
subclasses override it. Or define a method like process(EventContext  
context) and call it from a final onActivate(EventContext) method.


--
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 + Hibernate + Hibernate Tools

2009-06-18 Thread Norman Franke

Thanks!

The ValidationConstraintGenerator may work. Being new to T5 and all, I  
assume it's possible to @Inject the current page into my  
ValidationConstraintGenerator? Actually, I'd want the classpath to  
the .tml so I can get the .properties.


Norman Franke
Answering Service for Directors, Inc.
www.myasd.com



On Jun 18, 2009, at 5:40 PM, Thiago H. de Paula Figueiredo wrote:

Em Thu, 18 Jun 2009 18:29:37 -0300, Norman Franke nor...@myasd.com  
escreveu:



Next, I want to use BeanEditForm to edit the tables. I can't really
add @Id, @NonVisual, or @Validate to the classes, since they'll be
overwritten every time I re-generate the classes when I add or modify
a table.


Take a look at http://tapestry.apache.org/tapestry5.1/guide/beaneditform.html 
, section Customizing the BeanModel.
To add validation without touching entity class sources, take a look  
at the ValidationConstraintsGenerator interface.


--
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: How to render a page as JSON-formatted AJAX response?

2009-06-18 Thread Steve Cowx
Hi Alfie

It looks like we are doing very similar things.  I have chosen to implement
Tapestry versions on the YUi components to I am creating ca component which
will drop out a YUI overlay.

I have done exactly the same as you in that my component accepts a block as
a parameter with the intention of using the block as the overlay body.

Working within the restrictions of the YUI Overlay API I have two options
for rendering.
a) Use Tapestry to render the block into a hidden div in the HTML ()
equivalent to your and then pass the contents of the DIV to YUI at the
appropriate time for rendering as an overlay.
b)

On Thu, Jun 18, 2009 at 12:31 PM, Alfie Kirkpatrick 
alfie.kirkpatr...@ioko.com wrote:

 Hi Steve, I wrote an overlay component using JQuery which does just
 that... in fact you can choose whether the block is rendered initially
 or as a result of an AJAX request if you want to delay the evaluation of
 what is in the overlay.

 You don't need any JSON magic, you just render the block from the
 component in a hidden div and expose it from Javascript in your event
 handler.

 Most of the work for my component was supporting both modes, but it goes
 something like the below. If you omit the body parameter, you must
 provide an event handler in your page which returns the block to render
 on the AJAX call.

 IMHO it's pretty elegant... and shows how easy it is to do clever
 AJAX/rendering tricks in T5. I can't imagine a framework making it much
 easier than this ;-)

 Reading the original post am not sure this answers it, but does meet
 your objective I think.

 Hope it helps,
 Alfie.

 page.tml
t:overlay t:id=o body=popupClick Me/t:overlay

t:block id=popupThis is my overlay block/t:block

 overlay.java
@Parameter
private Object body; // the block to render if immediate (non-AJAX)

@SetupRender
public void setup() {
// allocate the ids we will need
overlayClientId = renderSupport.allocateClientId(overlay);
linkClientId = renderSupport.allocateClientId(overlayLink);
}

@BeginRender
public Object begin(MarkupWriter writer) {
// we render in two phases... the first is the link and the
 second
// is the overlay div itself
if (renderOverlayDivPhase) {
writer.element(div, class, overlay, id,
 overlayClientId);
if ( body == null ) { // ajax style
String innerId =
 renderSupport.allocateClientId(overlayInnerDiv);

// render an inner div where we'll attach the zone for
 update
writer.element(div, id, innerId);
writer.end();
clientBehaviorSupport.addZone(innerId, show, show);

// create the dynamic update link
Link link =
 resources.createEventLink(EventConstants.ACTION, context);
// ... and link the onclick to the zone via the update
 link
clientBehaviorSupport.linkZone(linkClientId, innerId,
 link);
return false; // do not render body
}
// a body is supplied so render it
return body;
} else { // just render the link
writer.element(a, href, #, id, linkClientId);
renderSupport.addInit(overlayLoad, overlayClientId,
 linkClientId, expose ? exposeColour : none);
return null; // render the link text (component body)
}
}

@BeforeRenderBody
public boolean body() {
// only render the default body if it's the link phase
return !renderOverlayDivPhase;
}

@AfterRender
public boolean after(MarkupWriter writer) {
writer.end();
if ( !renderOverlayDivPhase) {
renderOverlayDivPhase=true;
return false;
}
return true;
}

 overlay.js
 Tapestry.Initializer.overlayLoad = function(overlayId, linkId,
 exposeColour) {
var overlay=jQuery(document.getElementById(overlayId));
var link=jQuery(document.getElementById(linkId));
var expose=(exposeColour != 'none');

jQuery(function() {
overlay.overlay({
onBeforeLoad: function() {
if ( expose ) {
this.getBackgroundImage().expose({color:
 exposeColour});
}
},

onClose: function() {
jQuery.expose.close();
},

speed: 'fast',
fadeInSpeed: 'fast'
});
link.click(function(event) {
overlay.overlay().load();
Event.stop(event);
});
});
 };

 -Original Message-
 From: Stephen Cowx [mailto:steve.c...@gmail.com]
 Sent: 18 June 2009 09:20
 To: Tapestry users
 Cc: users@tapestry.apache.org
 Subject: Re: How to render a page as JSON-formatted AJAX response?

 I also have an interest in this.

 I would like a way of pre-rendering a Block on the server (as if it
 was rendered by an Ajax request handler), storing the rendered block
 as 

Re: Page event after activation?

2009-06-18 Thread Piero Sartini
 Each class can have as many onActivate() methods as you want. But I would
 have a single onActivate(EventContext context) method and let the
 subclasses override it. Or define a method like process(EventContext
 context) and call it from a final onActivate(EventContext) method.

If I overwrite the onActivate() method and put my code there, this code that 
needs to be executed on every page gets overwritten as well (and I have to 
duplicate it on every page).

One solution would be to create an initialize() method that needs to be called 
by every page at the end of their onActivate(). But I hoped for a cleaner 
solution :-)

Example:
I hoped for an automatic way to call the initialize() method. In onActivate it 
doesnt make sense because maybe MyPage2 wont use the username as activation 
context but something else. And if any page overwrites the activation context 
I am getting problems as well.

BasePage.java:
-
abstract class BasePage() {

@Property private String statusmessage;

initialize() {
this.statusmessage = getUser().getStatusMessage();
}

abstract User getUser();
}

}
--
class MyPage() extends BasePage {
private User user;
onActivate(String username) {
 user = repository.findByUsername(username);
}

User getUser() {
return user;
}
--


Piero


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



[Announce] Tapestry Testify project

2009-06-18 Thread Paul Field
I'd like to announce that the Tapestry Testify project is now available as a
Snapshot release at Tapestry 360:
https://tapestry.formos.com/nightly/tapestry-testify/

Tapestry Testify is an extension to Tapestry that allows you to write page
and component tests very easily and have them run very efficiently.


** Features **

  Integration with JUnit3 , JUnit4 and TestNG 

  Per-test scope - define services that are re-created for each test

  Inject services into tests with the @Inject annotation

  Inject objects from the test into components with the @ForComponent
annotation

  Very efficient - allows a single PageTester to be used by all tests


Fedback is very welcome!

- Paul

---
Paul Field
http://creakingcogs.blogspot.com/


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



Re: T5 + Hibernate + Hibernate Tools

2009-06-18 Thread Norman Franke

I think I figured it out:

@InjectService(PageRenderQueue)
private PageRenderQueue pageRenderQueue;

Then in buildConstraints:

Page page = pageRenderQueue.getRenderingPage();
	Messages msgs =  
page.getRootComponent().getComponentResources().getMessages();

String myValue = msgs.get(myValue);

From there, you get the Environment and  
peek(PropertyEditContext.class) to get the PropertyEditContext from  
which you can: getPropertyId().


This appears to work. Very cool!

Norman Franke
Answering Service for Directors, Inc.
www.myasd.com



On Jun 18, 2009, at 6:45 PM, Norman Franke wrote:


Thanks!

The ValidationConstraintGenerator may work. Being new to T5 and all,  
I assume it's possible to @Inject the current page into my  
ValidationConstraintGenerator? Actually, I'd want the classpath to  
the .tml so I can get the .properties.


Norman Franke
Answering Service for Directors, Inc.
www.myasd.com



On Jun 18, 2009, at 5:40 PM, Thiago H. de Paula Figueiredo wrote:

Em Thu, 18 Jun 2009 18:29:37 -0300, Norman Franke  
nor...@myasd.com escreveu:



Next, I want to use BeanEditForm to edit the tables. I can't really
add @Id, @NonVisual, or @Validate to the classes, since they'll be
overwritten every time I re-generate the classes when I add or  
modify

a table.


Take a look at http://tapestry.apache.org/tapestry5.1/guide/beaneditform.html 
, section Customizing the BeanModel.
To add validation without touching entity class sources, take a  
look at the ValidationConstraintsGenerator interface.


--
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 + Hibernate + Hibernate Tools

2009-06-18 Thread Thiago H. de Paula Figueiredo
Em Thu, 18 Jun 2009 19:45:54 -0300, Norman Franke nor...@myasd.com  
escreveu:



Thanks!


You're welcome!


The ValidationConstraintGenerator may work. Being new to T5 and all, I
assume it's possible to @Inject the current page into my
ValidationConstraintGenerator? Actually, I'd want the classpath to
the .tml so I can get the .properties.


By any chance are you trying to get the validation from the app.properties?
I don't know how you would inject the page in a service. I'm trying to  
remeber some way to get access to the app.properties file, but I can't now.


Not tested workaround suggestion: inject the ComponentSource service. Use  
its getPage(Class pageClass), using any page class as parameter, to  
retrievee a Component instance. Then invoke  
component.getComponentResources().getMessages() to get a Messages instance.


If there isn't any better way to do it nor a JIRA about it, let's file one.

--
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: How to render a page as JSON-formatted AJAX response?

2009-06-18 Thread Steve Cowx
Oops, please ignore previous email...premature post.

Hi Alfie

Awesome to hear from you, thanks for your reply.

In case you are busy, the short response is, you are on the right track
about what I am looking for but I need to go one step further.  If you have
a few spare minutes and are curious then read on, I am pretty sure you will
have some ideas to offer.

It looks like we are doing very similar things although I have chosen to
implement Tapestry versions of certain YUI components (instead of JQuery).
Liek you I am creating a component which will drop out a YUI overlay. -
(Please don't be tempted to stray into the JS library choice conversation
just yet)

I have done exactly the same as you in that my component accepts a block as
a parameter with the intention of using the block as the overlay body.  I
have also added a second option and that is to provide a Link as a parameter
instead.  The link is used to fetch the contents of the overlay via AJAx
when the overlay is shown.

Working with these parameters and with the YUI Overlay object I have two
options for rendering.
a) Use Tapestry to render the block into a hidden div in the HTML
(equivalent to your body is supplied mode).  When the overlay is shown,
pass the contents of the DIV to YUI which puts it into the overlay
contents.  This works well for simple content but is not able to support
tapestry components which require the Tapestry.init() function to run on
them such as a zone update(discussed later).
b) Alternatively the component will fetch the block of the Overlay via
Tapestry AJAX using the link provided as a parameter.  It does the fetch
after the overlay is shown.  I have custom code which creates a zone on the
fly and gets the ZoneManager to update it.  A temporary loading image is
shown while it loads.  This method can support any sort of content as the
Tapestry ZoneManager invokes the init() for any new content just fetched
from the server.  This method requires a trip to the server to render the
overlay :(

Neither of these solutions is ideal and both of them are in fact workarounds
for the main issue, which is the following:

When YUI creates an overlay, it recreates the overlay DOM elements from
scratch in a place of its own choosing in the document (at the very top I
think).  In order to establish Tapestry onclick(and other) behaviours for
all the content of the overlay you need to run the Tapestry init() function
for that new portion of the DOM.  The only way that I can see that this is
possible in the version of Tapestry I have (5.0.18) is to hook into the
Tapestry.js partial page rendering functions (Zonemanager).  These call the
init() function appropriately once they have fetched the response from the
server.   They appear to use metadata coded into the AJAX response (in JSON
format I think) in order to know what to do with the content in the
response.

Ideally, what I would like to do is render the block passed in to my
component as a complete Tapestry Ajax response but in string form  I will
then embed this in my page (probably as a js var) so that I can pass them
into the Tapestry.js partial page rendering functions when the overlay is
shown.  From there on Tapestry.js will behave as if the content had just
come from the server.

My Show overlay sequence will look as follows:

1) Block is passed in to component.
2) Component renders block in correct format (lets call it AJAX Response
Format) and stores it as a text string in the rendered page (probably by
using renderSupport.addScript().
3) User page is rendered and then they click the button to open the dialog
4) Dialog is rendered and a new Zone is created on the fly
4) AJAX Response Format text string (declared as a variable in the document)
is passed into the ZoneManager and tapestry updates the new Zone with the
content from the block.

Hey presto, perfectly initialised Tapestry overlay all done client side with
no trip to the server.

I have found the AjaxPartialResponseRenderer in the Tapestry codebase and I
had hoped that this would help me but for the life of me I cannot work out
how or when to call it or even where it fits in to the Tapestry request
pipeline.  Frankly I just don't know enough about Tapestry.

If you or anyone has any ideas on how I can achieve this I would appreciate
it.  Despite my earlier comments, I will entertain feedback about different
Javascript libraries and I am more than happy to accept ideas out of the
left field.

Regards

Steve



On Thu, Jun 18, 2009 at 11:56 PM, Steve Cowx steve.c...@gmail.com wrote:



On Thu, Jun 18, 2009 at 12:31 PM, Alfie Kirkpatrick 
alfie.kirkpatr...@ioko.com wrote:

Hi Steve, I wrote an overlay component using JQuery which does just
that... in fact you can choose whether the block is rendered
initially
or as a result of an AJAX request if you want to delay the
evaluation of
what is in the overlay.

You don't need any JSON magic, you just render the block from the

Re: T5 + Hibernate + Hibernate Tools

2009-06-18 Thread Thiago H. de Paula Figueiredo
Em Thu, 18 Jun 2009 20:45:39 -0300, Norman Franke nor...@myasd.com  
escreveu:



I think I figured it out:

@InjectService(PageRenderQueue)
private PageRenderQueue pageRenderQueue;


By the way, very clever way to do it. :) Two comments:

You could just @Inject private PageRenderQueue pageRenderQueue;  
@InjectService is meant to be used when there is more than one service  
instance for a given type.


In addition, it is not advisable to use anything inside  
org.apache.tapestry5.internal, because it was created by Howard  
specifically to hold anything that Tapestry won't guarantee backward  
compatibility. Some internal classes were even removed between releases,  
but not a single not internal one. ;)


--
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: Page event after activation?

2009-06-18 Thread Thiago H. de Paula Figueiredo
Em Thu, 18 Jun 2009 20:22:53 -0300, Piero Sartini li...@pierosartini.de  
escreveu:


If I overwrite the onActivate() method and put my code there, this code  
that needs to be executed on every page gets overwritten as well (and I  
have to duplicate it on every page).
One solution would be to create an initialize() method that needs to be  
called by every page at the end of their onActivate(). But I hoped for a  
cleaner

solution :-)


As far as I can see, this is not a matter of Tapestry events, but of  
implementing a Template design pattern. ;)


abstract class BasePage() {

@Property private String statusmessage;

protected abstract User getUser();

final Object onActivate(EventContext context) {
...
initialize(context);
...
}

protected void initialize(EventContext context) {
this.statusmessage = getUser().getStatusMessage();
}

}

class MyPage() extends BasePage {
private User user;
public void initialize(EventContext context) {
user = repository.findByUsername(context.get(String.class, 0));
}

protected User getUser() {
return user;
}
}

--
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: ChenilleKit Mail -- How to Use? or Any Mailer?

2009-06-18 Thread newtonik


bbcooper wrote:
 
 Hope that helps. The above example also uses ConfigurationService (
 http://www.chenillekit.org/chenillekit-core/configuration.html) to read
 properties from file.
 
 Cheers,
 Borut
 
 2009/6/18 newtonik newto...@gmail.com
 

 Can anyone give me an example on how to use this
 http://www.chenillekit.org/chenillekit-mail/SmtpService.html mailer . I
 am
 new to Tapestry and I have been trying some of their components. I
 decided
 to try the mailer today but I don't seem to know how to get it to work. I
 don't seem to know how to Inject the Service into my pages.

 Can someone point me in the right direction?

 How about what people use to mail? Does everyone basically use the Apache
 Commons EMail?
 --
 View this message in context:
 http://www.nabble.com/ChenilleKit-MailHow-to-Use--or-Any-Mailer--tp24085676p24085676.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


 
 

Thanks I decided to try yours. I ended up getting as close as I got using
one of my previous trial and error. I get this exception when I try to
inject the service. 

Exception constructing service 'EmailService': Error invoking constructor
com.team.web.services.EmailServiceImpl(SmtpService, ConfigurationService)
(at EmailServiceImpl.java:19) via
com.team.web.services.AppModule.bind(ServiceBinder) (at AppModule.java:68)
(for service 'EmailService'): Error building service proxy for service
'SimpleSmtpService' (at
org.chenillekit.mail.services.impl.SimpleSmtpServiceImpl(Logger,
ConfigurationService, Map) (at SimpleSmtpServiceImpl.java:49) via
org.chenillekit.mail.ChenilleKitMailModule.bind(ServiceBinder) (at
ChenilleKitMailModule.java:28)): Error invoking constructor
org.chenillekit.mail.services.impl.SimpleSmtpServiceImpl(Logger,
ConfigurationService, Map) (at SimpleSmtpServiceImpl.java:49) via
org.chenillekit.mail.ChenilleKitMailModule.bind(ServiceBinder) (at
ChenilleKitMailModule.java:28) (for service 'SimpleSmtpService'): 'null'
does not exists!

Looking at the code, they do a bind by id with
bind.bind(SmtpService.class).byId(SimpleSmtpService). I am not sure where
the null can be fixed
-- 
View this message in context: 
http://www.nabble.com/ChenilleKit-MailHow-to-Use--or-Any-Mailer--tp24085676p24104038.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: @AfterRender in AJAX requests

2009-06-18 Thread DH
Hi, Thiago

Not sure about how special your case is, but I can confirm that @AfterRender is 
invoked in my ajax request.
Maybe share more about the code and let us help you kind man.

DH
http://www.gaonline.com.cn

- Original Message - 
From: Thiago H. de Paula Figueiredo thiag...@gmail.com
To: Tapestry users users@tapestry.apache.org
Sent: Thursday, June 18, 2009 10:50 PM
Subject: @AfterRender in AJAX requests


 Hi!
 
 I'm trying to execute some Javascript code to hook up some events to
 some TextFields in a page. Thus, I need their clientIds. When in an
 AJAX request, the TextFields are rendered again with other clientIds,
 so I need to generate the Javascript event hooking again.I created a
 method annotated with @AfterRender and use RenderSupport to generate
 the event hooking code. In a full page request, my method is called
 and everything is fine.  But, in an AJAX request, my @AfterRender
 method is not invoked and my @BeginRender is invoked (it returns
 void). I cannot use @BeginRender in this case because the fields
 client ids are only defined during rendering.
 
 What am I missing?
 
 -- 
 Thiago
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 


Re: [Announce] Tapestry Testify project

2009-06-18 Thread Angelo Chen

definately a good addition, I tested only services now, I gave up the
PageTester, it's not practical to use it, and yet to learn that Integrated
test, I have been looking for a way to test pages and components, will give
your Testify, hope it will not be like PageTester:)


Paul Field-3 wrote:
 
 I'd like to announce that the Tapestry Testify project is now available as
 a
 Snapshot release at Tapestry 360:
 https://tapestry.formos.com/nightly/tapestry-testify/
 
 Tapestry Testify is an extension to Tapestry that allows you to write page
 and component tests very easily and have them run very efficiently.
 
 
 ** Features **
 
   Integration with JUnit3 , JUnit4 and TestNG 
 
   Per-test scope - define services that are re-created for each test
 
   Inject services into tests with the @Inject annotation
 
   Inject objects from the test into components with the @ForComponent
 annotation
 
   Very efficient - allows a single PageTester to be used by all tests
 
 
 Fedback is very welcome!
 
 - Paul
 
 ---
 Paul Field
 http://creakingcogs.blogspot.com/
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-Announce--Tapestry-Testify-project-tp24102834p24105144.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



Loop elements in forms, onvalidate called multiple times?

2009-06-18 Thread daniel joyce
I am building a form with variable number of rolls by using a loop. The
problem is that upon submit, it appears that onValidate is called n times,
where n is the number of rows. The loop pulls its values from, and writes
into list of n elements.

Am I doing something wrong?