Re: Help with using DWR with Tapestry

2009-12-30 Thread Ashwanth Kumar
Well, My use here is a typical example of User Registration and User
authentication! I'm trying to extend the entire app of Tapestry to be AJAX
driven, with all the pages served through AJAX.

Imagine u can use sought of AJAX capabilities with DWR and Tapestry!

 - Ashwanth Kumar

On Tue, Dec 29, 2009 at 10:34 PM, Vangel V. Ajanovski a...@ii.edu.mkwrote:

 I am a bit curious and never had such a scenario, so can you or anyone
 else elaborate a bit more or give an example of a use-case where this
 interaction between DWR and tapestry-hibernate is useful?
 Thanks

 On 29.12.2009 17:24, Ashwanth Kumar wrote:
  Hey, Thanks a lot!!
 
  I got the Tapestry Hibernate Working with DWR!! U made my life easy!!
 
 





RE: About T5 integration modules

2009-12-30 Thread Newham, Cameron

Interesting.

I'd hardly call myself even an advanced-intermediate Tapestry user (some
of the stuff you guys talk about is way over my head!) but really, is it
that difficult to create a Dispatcher and custom page annotations?!

I included simple security with roles very early on in my webapp by
going the page annotation route because it was a) understandable  and b)
simple to implement by following the examples I'd seen. I had even less
of an understanding of Tapestry than I do now.

I found it very easy to understand and code, and it works so well. I
shudder to think how long it would have taken ploughing through
documents on security solutions, like Spring Security, when all I wanted
was half a dozen roles and some way to mark my pages as general viewing
or requiring login under a certain role.

As I've said all along, I think the only thing lacking big time for
Tapestry is clear, easy to understand documentation with good simple
examples of each feature. That said - I had no troubles with the above
security stuff (and I didn't even have to look at Tapestry source code
;-)

Rather than providing large cumbersome bolt-ons for features that may
not even solve all problems, I'd rather see well-defined methods and
example solutions for particular problems which allows scope for people
to customise if they so wish. Isn't that an example of convention over
configuration? ;-) It would also be far quicker than developing modules
that try to be all things to all people - and perhaps lessen the
perceived gap between tech. like Wicket and Tapestry in a much shorter
time period.


-Original Message-
From: p...@sartini-its.com [mailto:p...@sartini-its.com] On Behalf Of Piero
Sartini
Sent: 24 December 2009 20:34
To: Tapestry users
Subject: Re: About T5 integration modules

...

Howard, I think people are looking for these kind of integrations
because there is no tapestry module allowing them to secure there
pages. Of course you may argument that it is easy to build a
Dispatcher and define some custom annotations. That's true if you
managed to understand how these things work. But if you've just
started with tapestry, in my experience this is not that easy. Then
you remember about Spring Security or any other solution you are used
to and try to make use of it in your new tapestry-world.

...

Piero

-
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



Passing object as paramters to component

2009-12-30 Thread Captain Cid

I want to pass an object to component. Components renders from data from this
object.

I tried doing an environment push of component but tapestry gives error
java.lang.ClassNotFoundException: caught an exception while obtaining a
class file .

It seems only component classes can be pushed into environment..and not
normal classes.
-- 
View this message in context: 
http://old.nabble.com/Passing-object-as-paramters-to-component-tp26966814p26966814.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: Passing object as paramters to component

2009-12-30 Thread Ville Virtanen

Hi,

define private YourObjectType param; variable to your component class and
use it. Annotate it with @Parameter annotation.

Then use your component like this: t:myComponent
t:param=prop:paramGetterSetterInPageClass /

Or read the documentation:
http://tapestry.apache.org/tapestry5/guide/parameters.html

 - Ville


Captain Cid wrote:
 
 I want to pass an object to component. Components renders from data from
 this object.
 
 I tried doing an environment push of component but tapestry gives error
 java.lang.ClassNotFoundException: caught an exception while obtaining a
 class file .
 
 It seems only component classes can be pushed into environment..and not
 normal classes.
 

-- 
View this message in context: 
http://old.nabble.com/Passing-object-as-paramters-to-component-tp26966814p26966920.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: Passing object as paramters to component

2009-12-30 Thread Thiago H. de Paula Figueiredo
Em Wed, 30 Dec 2009 10:17:14 -0200, Captain Cid  
captain_...@indiatimes.com escreveu:


I want to pass an object to component. Components renders from data from  
this object.


Just use @Component as Ville suggested.


I tried doing an environment push of component but tapestry gives error
java.lang.ClassNotFoundException: caught an exception while obtaining a
class file .


Why are you using the Environment for that?
Anyway, post the full stack trace so we can undestand it better.


It seems only component classes can be pushed into environment..and not
normal classes.


That's not correct. By the way, I've never seen a component instance being  
pushed in the environment.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.

http://www.arsmachina.com.br

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



demo aplication

2009-12-30 Thread Alfonso Quiroga
Hi! going back again to the idea of publishing demo aplication for
starters (always is easier to see something working and copy from
that, than building an app from scratch, looking for docs, etc).

Is there some idea of how the demo app should be? I'm NOT a T5 expert
but I can do it if it's simple.
a) The first question is... if we have a t5-starter-demo-app, where
will be hosted?
b) What does the app need? I was thinking in very basic, 2 o 3 pages,
using web-security with annotations, storing data in session... a
t:zone example.. and I don't know what else, any suggestions?

I think this idea contribute to new users adopting t5, maybe sounds
stupid, but when you start.. if you have almost nothing to see, a lot
of users can be discarding t5.
thanks

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



Re: demo aplication

2009-12-30 Thread Ashwanth Kumar
Well, Do we need a Demo app?? I mean, we already've one: JumpStart(
http://jumpstart.doublenegative.com.au:8080/jumpstart/) hosted, so..

Do u wish to re-consider ur idea??

 - Ashwanth Kumar

On Wed, Dec 30, 2009 at 9:09 PM, Alfonso Quiroga alfonsose...@gmail.comwrote:

 Hi! going back again to the idea of publishing demo aplication for
 starters (always is easier to see something working and copy from
 that, than building an app from scratch, looking for docs, etc).

 Is there some idea of how the demo app should be? I'm NOT a T5 expert
 but I can do it if it's simple.
 a) The first question is... if we have a t5-starter-demo-app, where
 will be hosted?
 b) What does the app need? I was thinking in very basic, 2 o 3 pages,
 using web-security with annotations, storing data in session... a
 t:zone example.. and I don't know what else, any suggestions?

 I think this idea contribute to new users adopting t5, maybe sounds
 stupid, but when you start.. if you have almost nothing to see, a lot
 of users can be discarding t5.
 thanks

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




Re: Help with using DWR with Tapestry

2009-12-30 Thread Vangel V. Ajanovski
On 30.12.2009 11:06, Ashwanth Kumar wrote:
 Well, My use here is a typical example of User Registration and User
 authentication! I'm trying to extend the entire app of Tapestry to be AJAX
 driven, with all the pages served through AJAX.

 Imagine u can use sought of AJAX capabilities with DWR and Tapestry!
   
OK let me see if I get the point. If I build user registration for me
it's a simple form, username and email and such and for example I bind
javascript code on the username that will check if it already exists,
before I even fill the entire registration form and certainly before I
submit it. But if i did this, I wouldn't have calls to tapestry stuff at
all, i would directly call the dao methods.

I am probably missing something, that's why I asked for some specific
scenario  maybe something that can't be done (or wouldn't look good)
with just tapestry and what it offers from ajax components.
I expected an answer of the type: if you want to have 
on your tapestry generated page, then you can do that more user-friendly
or more secure or generally better with DWR and Tapestry interaction.

I am just curious and want to learn something new about this.
Thanks



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Help with using DWR with Tapestry

2009-12-30 Thread Thiago H. de Paula Figueiredo
Em Wed, 30 Dec 2009 14:14:12 -0200, Vangel V. Ajanovski a...@ii.edu.mk  
escreveu:



OK let me see if I get the point. If I build user registration for me
it's a simple form, username and email and such and for example I bind
javascript code on the username that will check if it already exists,
before I even fill the entire registration form and certainly before I
submit it.


I implemented this using Tapestry itself and JavaScript. Just a few lines  
of code. I'm curious too why Ashwanth is using DWR instead of Tapestry  
itself for AJAX things stuff.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.

http://www.arsmachina.com.br

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



Re: Help with using DWR with Tapestry

2009-12-30 Thread Ashwanth Kumar
Hello Guys,

Okay, i give up! I'm very new here! And i'm just a 2nd year college student!
I'm learning java only now! And more-over when i hunter the WWW for some
good framework to build my WebApp in J2EE. I had to keep my hands on many
things. Its during that, i actually got in Tapestry and DWR. Though i
stumbled on DWR first, i finally rested with Tapestry, as it actually made
my life simpler!

And using DWR (soley for 1 reason), i wanted to do, some live username
availability checking, (may be u can do it with a custom Component
from Scriptaculous, as i told u, i'm very very new here in java and
Tapestry, to DWR too).

I'm too young in experience to say advantages of DWR over Tapestry or the
vice versa. It just makes begineers like me, open my JAW fall.. ;)  Nothing
more..

No offense, just wanted to learn some things.. at a rapid pace.. thats it..
:)

 - Ashwanth Kumar

On Wed, Dec 30, 2009 at 9:48 PM, Thiago H. de Paula Figueiredo 
thiag...@gmail.com wrote:

 Em Wed, 30 Dec 2009 14:14:12 -0200, Vangel V. Ajanovski a...@ii.edu.mk
 escreveu:


  OK let me see if I get the point. If I build user registration for me
 it's a simple form, username and email and such and for example I bind
 javascript code on the username that will check if it already exists,
 before I even fill the entire registration form and certainly before I
 submit it.


 I implemented this using Tapestry itself and JavaScript. Just a few lines
 of code. I'm curious too why Ashwanth is using DWR instead of Tapestry
 itself for AJAX things stuff.


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

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




Re: Help with using DWR with Tapestry

2009-12-30 Thread Vangel V. Ajanovski
On 30.12.2009 17:27, Ashwanth Kumar wrote:
 No offense, just wanted to learn some things.. at a rapid pace.. thats it..
 :)
   
No offense taken, I was just curious because I had never heard about DWR
and was just curious where it fits.



smime.p7s
Description: S/MIME Cryptographic Signature


Re: demo aplication

2009-12-30 Thread Alfonso Quiroga
I know about jumpstart, but that's like different solutions for
specifics things, not a complete app.
I think it would be fine to have a complete demo app, maybe using
hibernate + hsqldb, some custom component, etc, for a begginer

On Wed, Dec 30, 2009 at 12:42 PM, Ashwanth Kumar
ashwanth.ku...@gmail.com wrote:
 Well, Do we need a Demo app?? I mean, we already've one: JumpStart(
 http://jumpstart.doublenegative.com.au:8080/jumpstart/) hosted, so..

 Do u wish to re-consider ur idea??

  - Ashwanth Kumar

 On Wed, Dec 30, 2009 at 9:09 PM, Alfonso Quiroga 
 alfonsose...@gmail.comwrote:

 Hi! going back again to the idea of publishing demo aplication for
 starters (always is easier to see something working and copy from
 that, than building an app from scratch, looking for docs, etc).

 Is there some idea of how the demo app should be? I'm NOT a T5 expert
 but I can do it if it's simple.
 a) The first question is... if we have a t5-starter-demo-app, where
 will be hosted?
 b) What does the app need? I was thinking in very basic, 2 o 3 pages,
 using web-security with annotations, storing data in session... a
 t:zone example.. and I don't know what else, any suggestions?

 I think this idea contribute to new users adopting t5, maybe sounds
 stupid, but when you start.. if you have almost nothing to see, a lot
 of users can be discarding t5.
 thanks

 -
 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



T4: including javascript in a component

2009-12-30 Thread Ivano Luberti
Hello, I'm trying to include some simple javascript in a component in my
T4 application.
I want my only textfield to  get focus when is displayed.
I'm following the instructions provided at:

http://tapestry.apache.org/tapestry4.1/components/general/script.html

The template of the page including the component has @Shell and @Body
specified.
My component looks like this:

html
head
titleMET Online/title
meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1
link href=css/stile_palmare.css rel=stylesheet type=text/css
/head
body
 span jwcid=@Script
script=/it/archimede/met/metgestioneingressi/tapestry/scripts/FormFocus.script
component=ognl:components.barCode/

div id=box_operazione
h1Lettura BarCode/h1   
br /
  h2passare il barcode sotto il lettore ottico/h2
form method=post action= jwcid=barCodeForm
  input type=text jwcid=barCode class=text_box value= /
  br /br /
input type=submit name=Submit value=Submit class=bottone
  /form
   /div   
   
/body
/html

The Script template file is the last one provides at:

http://tapestry.apache.org/tapestry4.1/components/general/script.html

the one without CDATA

When I try to display the page I get:

[ +/- ] Exception: Unable to read OGNL expression 'parsed OGNL
expression' of
{component=$textfield_...@81eb97c1[homeloggeduser/barCodeForm.barCode]}:
source is null for getProperty(null, name)

I have already tried putting a bad component name in the @Script span
and the error changes, so it seem the name is right. I have put a bad
path to the script file and the error changes , then the path is correct.

Can someone point me in the right direction?



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



Unit testing components with @Parameter annotation

2009-12-30 Thread Stephan Schwab

Is there any recommended way of unit testing components that have @Parameter
annotations?

Of course I can add a setter to provide the parameter in my test but that
kind of defeats the purpose of @Parameter(required=true). I can call the
setter or not do it. If I don't call the setter, the test should fail.

Thanks for your thoughts.

Stephan


-
--
http://www.caimito.net - Caimito One Team - Agile Collaboration and Planning
tool
http://www.stephan-schwab.com - Personal blog
http://code.google.com/p/tapestry-sesame - Authentication extension for
Tapestry 5

-- 
View this message in context: 
http://old.nabble.com/Unit-testing-components-with-%40Parameter-annotation-tp26971514p26971514.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: demo aplication

2009-12-30 Thread based2

http://github.com/jhulten/autoblog
http://appfuse.org/display/APF/AppFuse+QuickStart
http://code.google.com/p/shams/downloads/list
http://wiki.apache.org/tapestry/TapestryTutorials

ref:http://thread.gmane.org/gmane.comp.java.tapestry.user/77265/focus=77447


Alfonso Quiroga wrote:
 
 I know about jumpstart, but that's like different solutions for
 specifics things, not a complete app.
 I think it would be fine to have a complete demo app, maybe using
 hibernate + hsqldb, some custom component, etc, for a begginer
 
 On Wed, Dec 30, 2009 at 12:42 PM, Ashwanth Kumar
 ashwanth.ku...@gmail.com wrote:
 Well, Do we need a Demo app?? I mean, we already've one: JumpStart(
 http://jumpstart.doublenegative.com.au:8080/jumpstart/) hosted, so..

 Do u wish to re-consider ur idea??

  - Ashwanth Kumar

 On Wed, Dec 30, 2009 at 9:09 PM, Alfonso Quiroga
 alfonsose...@gmail.comwrote:

 Hi! going back again to the idea of publishing demo aplication for
 starters (always is easier to see something working and copy from
 that, than building an app from scratch, looking for docs, etc).

 Is there some idea of how the demo app should be? I'm NOT a T5 expert
 but I can do it if it's simple.
 a) The first question is... if we have a t5-starter-demo-app, where
 will be hosted?
 b) What does the app need? I was thinking in very basic, 2 o 3 pages,
 using web-security with annotations, storing data in session... a
 t:zone example.. and I don't know what else, any suggestions?

 I think this idea contribute to new users adopting t5, maybe sounds
 stupid, but when you start.. if you have almost nothing to see, a lot
 of users can be discarding t5.
 thanks

 -
 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
 
 
 

-- 
View this message in context: 
http://old.nabble.com/demo-aplication-tp26968724p26971532.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: demo aplication

2009-12-30 Thread based2

a) You may improve and contribute to
 http://tapestry.apache.org/tapestry5.1/quickstart/

b) 
B1 - You may have to focus on more demo-ing service data easy integration
(Tapestry-hibernate).

B2 - Authentication and Role management (Application goal)

(B3 - Suggestion: A demo for each component, like it was in 3.0
But Jumpstart seems already doing it successfully.)


Alfonso Quiroga wrote:
 
 Hi! going back again to the idea of publishing demo aplication for
 starters (always is easier to see something working and copy from
 that, than building an app from scratch, looking for docs, etc).
 
 Is there some idea of how the demo app should be? I'm NOT a T5 expert
 but I can do it if it's simple.
 a) The first question is... if we have a t5-starter-demo-app, where
 will be hosted?
 b) What does the app need? I was thinking in very basic, 2 o 3 pages,
 using web-security with annotations, storing data in session... a
 t:zone example.. and I don't know what else, any suggestions?
 
 I think this idea contribute to new users adopting t5, maybe sounds
 stupid, but when you start.. if you have almost nothing to see, a lot
 of users can be discarding t5.
 thanks
 
 -
 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://old.nabble.com/demo-aplication-tp26968724p26971653.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: T4: including javascript in a component

2009-12-30 Thread Andreas Andreou
Hi,
The error message says that something.getName() is trying to get evaluated but
something is null

Finding where exactly the error is thrown will show you which object is null...

On Wed, Dec 30, 2009 at 20:51, Ivano Luberti lube...@archicoop.it wrote:
 Hello, I'm trying to include some simple javascript in a component in my
 T4 application.
 I want my only textfield to  get focus when is displayed.
 I'm following the instructions provided at:

 http://tapestry.apache.org/tapestry4.1/components/general/script.html

 The template of the page including the component has @Shell and @Body
 specified.
 My component looks like this:

 html
 head
 titleMET Online/title
 meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1
 link href=css/stile_palmare.css rel=stylesheet type=text/css
 /head
 body
  span jwcid=@Script
 script=/it/archimede/met/metgestioneingressi/tapestry/scripts/FormFocus.script
 component=ognl:components.barCode/

    div id=box_operazione
    h1Lettura BarCode/h1
        br /
          h2passare il barcode sotto il lettore ottico/h2
    form method=post action= jwcid=barCodeForm
          input type=text jwcid=barCode class=text_box value= /
          br /br /
        input type=submit name=Submit value=Submit class=bottone
      /form
   /div

 /body
 /html

 The Script template file is the last one provides at:

 http://tapestry.apache.org/tapestry4.1/components/general/script.html

 the one without CDATA

 When I try to display the page I get:

 [ +/- ] Exception: Unable to read OGNL expression 'parsed OGNL
 expression' of
 {component=$textfield_...@81eb97c1[homeloggeduser/barCodeForm.barCode]}:
 source is null for getProperty(null, name)

 I have already tried putting a bad component name in the @Script span
 and the error changes, so it seem the name is right. I have put a bad
 path to the script file and the error changes , then the path is correct.

 Can someone point me in the right direction?



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





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

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



Re: Unit testing components with @Parameter annotation

2009-12-30 Thread Howard Lewis Ship
My thoughts are that @Parameter annotation represents an integration
between the component and its immediate container or other part of the
system.  @Parameter(required=true) failures will show up in
integration tests.

In the rare event that I unit test an individual component, I just use
the facilities of TestBase to push values into private fields. Most of
my testing is done at the integration level (PageTester or Selenium).

On Wed, Dec 30, 2009 at 11:53 AM, Stephan Schwab s...@caimito.net wrote:

 Is there any recommended way of unit testing components that have @Parameter
 annotations?

 Of course I can add a setter to provide the parameter in my test but that
 kind of defeats the purpose of @Parameter(required=true). I can call the
 setter or not do it. If I don't call the setter, the test should fail.

 Thanks for your thoughts.

 Stephan


 -
 --
 http://www.caimito.net - Caimito One Team - Agile Collaboration and Planning
 tool
 http://www.stephan-schwab.com - Personal blog
 http://code.google.com/p/tapestry-sesame - Authentication extension for
 Tapestry 5

 --
 View this message in context: 
 http://old.nabble.com/Unit-testing-components-with-%40Parameter-annotation-tp26971514p26971514.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.


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





-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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



Re: T4: including javascript in a component

2009-12-30 Thread Ivano Luberti
Thanks Andreas , the problem is that everything works until I insert the
javascript.
In fact the exception is thrown inside the Script implementation. Down
here you'll find the init part of the srtack trace.
I was wondering if not using the @Body in the component html template is
correct, given the fact that it is used in the html template of the page
that call the component.




* ognl.OgnlRuntime.getProperty(OgnlRuntime.java:2203)
* ognl.ASTProperty.getValueBody(ASTProperty.java:114)
* ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
* ognl.SimpleNode.getValue(SimpleNode.java:258)
* ognl.ASTChain.getValueBody(ASTChain.java:141)
* ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
* ognl.SimpleNode.getValue(SimpleNode.java:258)
* ognl.Ognl.getValue(Ognl.java:494)
* ognl.Ognl.getValue(Ognl.java:458)
* 
org.apache.tapestry.services.impl.ExpressionEvaluatorImpl.readCompiled(ExpressionEvaluatorImpl.java:123)

* 
org.apache.tapestry.services.impl.ExpressionEvaluatorImpl.read(ExpressionEvaluatorImpl.java:112)

* 
$ExpressionEvaluator_125e178e557.read($ExpressionEvaluator_125e178e557.java)

* 
org.apache.tapestry.script.ScriptSessionImpl.evaluate(ScriptSessionImpl.java:86)

* org.apache.tapestry.script.AbstractToken.evaluate(AbstractToken.java:84)

* org.apache.tapestry.script.InsertToken.write(InsertToken.java:48)
* 
org.apache.tapestry.script.AbstractToken.writeChildren(AbstractToken.java:71)

* org.apache.tapestry.script.LetToken.write(LetToken.java:53)
* 
org.apache.tapestry.script.AbstractToken.writeChildren(AbstractToken.java:71)

* org.apache.tapestry.script.ParsedScript.execute(ParsedScript.java:82)
* org.apache.tapestry.html.Script.renderComponent(Script.java:159)
* org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)

* 
org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)

* org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)

* org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)

* 
org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)

* 
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)

* org.apache.tapestry.html.Body.renderComponent(Body.java:38)


Andreas Andreou ha scritto:
 Hi,
 The error message says that something.getName() is trying to get evaluated but
 something is null

 Finding where exactly the error is thrown will show you which object is 
 null...

 On Wed, Dec 30, 2009 at 20:51, Ivano Luberti lube...@archicoop.it wrote:
   
 Hello, I'm trying to include some simple javascript in a component in my
 T4 application.
 I want my only textfield to  get focus when is displayed.
 I'm following the instructions provided at:

 http://tapestry.apache.org/tapestry4.1/components/general/script.html

 The template of the page including the component has @Shell and @Body
 specified.
 My component looks like this:

 html
 head
 titleMET Online/title
 meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1
 link href=css/stile_palmare.css rel=stylesheet type=text/css
 /head
 body
  span jwcid=@Script
 script=/it/archimede/met/metgestioneingressi/tapestry/scripts/FormFocus.script
 component=ognl:components.barCode/

div id=box_operazione
h1Lettura BarCode/h1
br /
  h2passare il barcode sotto il lettore ottico/h2
form method=post action= jwcid=barCodeForm
  input type=text jwcid=barCode class=text_box value= /
  br /br /
input type=submit name=Submit value=Submit class=bottone
  /form
   /div

 /body
 /html

 The Script template file is the last one provides at:

 http://tapestry.apache.org/tapestry4.1/components/general/script.html

 the one without CDATA

 When I try to display the page I get:

 [ +/- ] Exception: Unable to read OGNL expression 'parsed OGNL
 expression' of
 {component=$textfield_...@81eb97c1[homeloggeduser/barCodeForm.barCode]}:
 source is null for getProperty(null, name)

 I have already tried putting a bad component name in the @Script span
 and the error changes, so it seem the name is right. I have put a bad
 path to the script file and the error changes , then the path is correct.

 Can someone point me in the right direction?



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


 



   

-- 
==
dott. Ivano Mario 

Re: T4: including javascript in a component

2009-12-30 Thread Andreas Andreou
You don't specify which object you've found to be null... but anyway, let
me try...

looking at the FormFocus.script code from
http://tapestry.apache.org/tapestry4.1/components/general/script.html
i see ${component.form.name} and ${component.name}, so either
component or component.form is null (according to the error message)

Looking at the javadocs for AbstractFormComponent
http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/form/AbstractFormComponent.html
I read
getForm() : returns the IForm which contains the component, or null if
the component is
not contained by a form, or if the containing Form is not currently rendering.

Finally, looking at your code I see that @Script is outside the @Form,
so according
to the javadocs, getForm() should indeed return null !

The cure? move the @Script inside @Form - or rewrite the script so that it
doesn't use getForm() perhaps...

On Wed, Dec 30, 2009 at 23:35, Ivano Luberti lube...@archicoop.it wrote:
 Thanks Andreas , the problem is that everything works until I insert the
 javascript.
 In fact the exception is thrown inside the Script implementation. Down
 here you'll find the init part of the srtack trace.
 I was wondering if not using the @Body in the component html template is
 correct, given the fact that it is used in the html template of the page
 that call the component.




    * ognl.OgnlRuntime.getProperty(OgnlRuntime.java:2203)
    * ognl.ASTProperty.getValueBody(ASTProperty.java:114)
    * ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
    * ognl.SimpleNode.getValue(SimpleNode.java:258)
    * ognl.ASTChain.getValueBody(ASTChain.java:141)
    * ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
    * ognl.SimpleNode.getValue(SimpleNode.java:258)
    * ognl.Ognl.getValue(Ognl.java:494)
    * ognl.Ognl.getValue(Ognl.java:458)
    * 
 org.apache.tapestry.services.impl.ExpressionEvaluatorImpl.readCompiled(ExpressionEvaluatorImpl.java:123)

    * 
 org.apache.tapestry.services.impl.ExpressionEvaluatorImpl.read(ExpressionEvaluatorImpl.java:112)

    * 
 $ExpressionEvaluator_125e178e557.read($ExpressionEvaluator_125e178e557.java)

    * 
 org.apache.tapestry.script.ScriptSessionImpl.evaluate(ScriptSessionImpl.java:86)

    * org.apache.tapestry.script.AbstractToken.evaluate(AbstractToken.java:84)

    * org.apache.tapestry.script.InsertToken.write(InsertToken.java:48)
    * 
 org.apache.tapestry.script.AbstractToken.writeChildren(AbstractToken.java:71)

    * org.apache.tapestry.script.LetToken.write(LetToken.java:53)
    * 
 org.apache.tapestry.script.AbstractToken.writeChildren(AbstractToken.java:71)

    * org.apache.tapestry.script.ParsedScript.execute(ParsedScript.java:82)
    * org.apache.tapestry.html.Script.renderComponent(Script.java:159)
    * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)

    * 
 org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)

    * org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)

    * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)

    * 
 org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)

    * 
 org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)

    * org.apache.tapestry.html.Body.renderComponent(Body.java:38)


 Andreas Andreou ha scritto:
 Hi,
 The error message says that something.getName() is trying to get evaluated 
 but
 something is null

 Finding where exactly the error is thrown will show you which object is 
 null...

 On Wed, Dec 30, 2009 at 20:51, Ivano Luberti lube...@archicoop.it wrote:

 Hello, I'm trying to include some simple javascript in a component in my
 T4 application.
 I want my only textfield to  get focus when is displayed.
 I'm following the instructions provided at:

 http://tapestry.apache.org/tapestry4.1/components/general/script.html

 The template of the page including the component has @Shell and @Body
 specified.
 My component looks like this:

 html
 head
 titleMET Online/title
 meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1
 link href=css/stile_palmare.css rel=stylesheet type=text/css
 /head
 body
  span jwcid=@Script
 script=/it/archimede/met/metgestioneingressi/tapestry/scripts/FormFocus.script
 component=ognl:components.barCode/

    div id=box_operazione
    h1Lettura BarCode/h1
        br /
          h2passare il barcode sotto il lettore ottico/h2
    form method=post action= jwcid=barCodeForm
          input type=text jwcid=barCode class=text_box value= /
          br /br /
        input type=submit name=Submit value=Submit class=bottone
      /form
   /div

 /body
 /html

 The Script template file is the last one provides at:

 http://tapestry.apache.org/tapestry4.1/components/general/script.html

 the one without CDATA

 When I try to display the page I get:

 [ +/- ] Exception: Unable to read OGNL expression 'parsed OGNL
 

T4: including javascript in a component (solved)

2009-12-30 Thread Ivano Luberti
Actually the error was in the html template of the component:
The @Script refers to the text field component barCode but it is written
before the the component itself. Hence when the file is parsed the the
text field component doesn't exist yet.
I have put the Scrtp declaration after the /form tag and it works.


html
head
titleMET Online/title
meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1
link href=css/stile_palmare.css rel=stylesheet type=text/css
/head
body
 span jwcid=@Script
script=/it/archimede/met/metgestioneingressi/tapestry/scripts/FormFocus.script
component=ognl:components.barCode/

div id=box_operazione
h1Lettura BarCode/h1
br /
  h2passare il barcode sotto il lettore ottico/h2
form method=post action= jwcid=barCodeForm
  input type=text jwcid=barCode class=text_box value= /
  br /br /
input type=submit name=Submit value=Submit class=bottone
  /form
   /div

/body
/html




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



Re: T4: including javascript in a component

2009-12-30 Thread Ivano Luberti
I have wrote the solution I have found before reading this.
Actually It was enough to put it after the form.
The null component was the text field component not the Form.
You almost got it because sure the position of @Script matters.

It seems that getForm returns something even if the form has already
been rendered.

Andreas Andreou ha scritto:
 You don't specify which object you've found to be null... but anyway, let
 me try...

 looking at the FormFocus.script code from
 http://tapestry.apache.org/tapestry4.1/components/general/script.html
 i see ${component.form.name} and ${component.name}, so either
 component or component.form is null (according to the error message)

 Looking at the javadocs for AbstractFormComponent
 http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/form/AbstractFormComponent.html
 I read
 getForm() : returns the IForm which contains the component, or null if
 the component is
 not contained by a form, or if the containing Form is not currently rendering.

 Finally, looking at your code I see that @Script is outside the @Form,
 so according
 to the javadocs, getForm() should indeed return null !

 The cure? move the @Script inside @Form - or rewrite the script so that it
 doesn't use getForm() perhaps...

 On Wed, Dec 30, 2009 at 23:35, Ivano Luberti lube...@archicoop.it wrote:
   
 Thanks Andreas , the problem is that everything works until I insert the
 javascript.
 In fact the exception is thrown inside the Script implementation. Down
 here you'll find the init part of the srtack trace.
 I was wondering if not using the @Body in the component html template is
 correct, given the fact that it is used in the html template of the page
 that call the component.




* ognl.OgnlRuntime.getProperty(OgnlRuntime.java:2203)
* ognl.ASTProperty.getValueBody(ASTProperty.java:114)
* ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
* ognl.SimpleNode.getValue(SimpleNode.java:258)
* ognl.ASTChain.getValueBody(ASTChain.java:141)
* ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
* ognl.SimpleNode.getValue(SimpleNode.java:258)
* ognl.Ognl.getValue(Ognl.java:494)
* ognl.Ognl.getValue(Ognl.java:458)
* 
 org.apache.tapestry.services.impl.ExpressionEvaluatorImpl.readCompiled(ExpressionEvaluatorImpl.java:123)

* 
 org.apache.tapestry.services.impl.ExpressionEvaluatorImpl.read(ExpressionEvaluatorImpl.java:112)

* 
 $ExpressionEvaluator_125e178e557.read($ExpressionEvaluator_125e178e557.java)

* 
 org.apache.tapestry.script.ScriptSessionImpl.evaluate(ScriptSessionImpl.java:86)

* org.apache.tapestry.script.AbstractToken.evaluate(AbstractToken.java:84)

* org.apache.tapestry.script.InsertToken.write(InsertToken.java:48)
* 
 org.apache.tapestry.script.AbstractToken.writeChildren(AbstractToken.java:71)

* org.apache.tapestry.script.LetToken.write(LetToken.java:53)
* 
 org.apache.tapestry.script.AbstractToken.writeChildren(AbstractToken.java:71)

* org.apache.tapestry.script.ParsedScript.execute(ParsedScript.java:82)
* org.apache.tapestry.html.Script.renderComponent(Script.java:159)
* org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)

* 
 org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)

* 
 org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)

* org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)

* 
 org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)

* 
 org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)

* org.apache.tapestry.html.Body.renderComponent(Body.java:38)


 Andreas Andreou ha scritto:
 
 Hi,
 The error message says that something.getName() is trying to get evaluated 
 but
 something is null

 Finding where exactly the error is thrown will show you which object is 
 null...

 On Wed, Dec 30, 2009 at 20:51, Ivano Luberti lube...@archicoop.it wrote:

   
 Hello, I'm trying to include some simple javascript in a component in my
 T4 application.
 I want my only textfield to  get focus when is displayed.
 I'm following the instructions provided at:

 http://tapestry.apache.org/tapestry4.1/components/general/script.html

 The template of the page including the component has @Shell and @Body
 specified.
 My component looks like this:

 html
 head
 titleMET Online/title
 meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1
 link href=css/stile_palmare.css rel=stylesheet type=text/css
 /head
 body
  span jwcid=@Script
 script=/it/archimede/met/metgestioneingressi/tapestry/scripts/FormFocus.script
 component=ognl:components.barCode/

div id=box_operazione
h1Lettura BarCode/h1
br /
  h2passare il barcode sotto il lettore ottico/h2
form method=post action= jwcid=barCodeForm
  input type=text jwcid=barCode class=text_box value= 

Re: T4: including javascript in a component

2009-12-30 Thread Ivano Luberti
Correction: putting the @Script solved the null pointer but the
generated javascript was incorrect.
I had to put it before the end of the Form.
You were right Andreas

Ivano Luberti ha scritto:
 I have wrote the solution I have found before reading this.
 Actually It was enough to put it after the form.
 The null component was the text field component not the Form.
 You almost got it because sure the position of @Script matters.

 It seems that getForm returns something even if the form has already
 been rendered.

 Andreas Andreou ha scritto:
   
 You don't specify which object you've found to be null... but anyway, let
 me try...

 looking at the FormFocus.script code from
 http://tapestry.apache.org/tapestry4.1/components/general/script.html
 i see ${component.form.name} and ${component.name}, so either
 component or component.form is null (according to the error message)

 Looking at the javadocs for AbstractFormComponent
 http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/form/AbstractFormComponent.html
 I read
 getForm() : returns the IForm which contains the component, or null if
 the component is
 not contained by a form, or if the containing Form is not currently 
 rendering.

 Finally, looking at your code I see that @Script is outside the @Form,
 so according
 to the javadocs, getForm() should indeed return null !

 The cure? move the @Script inside @Form - or rewrite the script so that it
 doesn't use getForm() perhaps...

 On Wed, Dec 30, 2009 at 23:35, Ivano Luberti lube...@archicoop.it wrote:
   
 
 Thanks Andreas , the problem is that everything works until I insert the
 javascript.
 In fact the exception is thrown inside the Script implementation. Down
 here you'll find the init part of the srtack trace.
 I was wondering if not using the @Body in the component html template is
 correct, given the fact that it is used in the html template of the page
 that call the component.




* ognl.OgnlRuntime.getProperty(OgnlRuntime.java:2203)
* ognl.ASTProperty.getValueBody(ASTProperty.java:114)
* ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
* ognl.SimpleNode.getValue(SimpleNode.java:258)
* ognl.ASTChain.getValueBody(ASTChain.java:141)
* ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
* ognl.SimpleNode.getValue(SimpleNode.java:258)
* ognl.Ognl.getValue(Ognl.java:494)
* ognl.Ognl.getValue(Ognl.java:458)
* 
 org.apache.tapestry.services.impl.ExpressionEvaluatorImpl.readCompiled(ExpressionEvaluatorImpl.java:123)

* 
 org.apache.tapestry.services.impl.ExpressionEvaluatorImpl.read(ExpressionEvaluatorImpl.java:112)

* 
 $ExpressionEvaluator_125e178e557.read($ExpressionEvaluator_125e178e557.java)

* 
 org.apache.tapestry.script.ScriptSessionImpl.evaluate(ScriptSessionImpl.java:86)

* 
 org.apache.tapestry.script.AbstractToken.evaluate(AbstractToken.java:84)

* org.apache.tapestry.script.InsertToken.write(InsertToken.java:48)
* 
 org.apache.tapestry.script.AbstractToken.writeChildren(AbstractToken.java:71)

* org.apache.tapestry.script.LetToken.write(LetToken.java:53)
* 
 org.apache.tapestry.script.AbstractToken.writeChildren(AbstractToken.java:71)

* org.apache.tapestry.script.ParsedScript.execute(ParsedScript.java:82)
* org.apache.tapestry.html.Script.renderComponent(Script.java:159)
* 
 org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)

* 
 org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)

* 
 org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)

* 
 org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)

* 
 org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187)

* 
 org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538)

* org.apache.tapestry.html.Body.renderComponent(Body.java:38)


 Andreas Andreou ha scritto:
 
   
 Hi,
 The error message says that something.getName() is trying to get evaluated 
 but
 something is null

 Finding where exactly the error is thrown will show you which object is 
 null...

 On Wed, Dec 30, 2009 at 20:51, Ivano Luberti lube...@archicoop.it wrote:

   
 
 Hello, I'm trying to include some simple javascript in a component in my
 T4 application.
 I want my only textfield to  get focus when is displayed.
 I'm following the instructions provided at:

 http://tapestry.apache.org/tapestry4.1/components/general/script.html

 The template of the page including the component has @Shell and @Body
 specified.
 My component looks like this:

 html
 head
 titleMET Online/title
 meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1
 link href=css/stile_palmare.css rel=stylesheet type=text/css
 /head
 body
  span jwcid=@Script
 script=/it/archimede/met/metgestioneingressi/tapestry/scripts/FormFocus.script
 

Re: Best server for development and for production?

2009-12-30 Thread Alex Kotchnev
Juan,


If you use the latest NetBeans (6.8) it support compile-on-save/copy-on-save
for both standard and maven based projects, which works perfectly
(equivalent and better than the deploy on save w/ other app servers) w/
Jetty and T5's live class reloading.

For Tomcat  Glassfish NetBeans support deploy-on-save ; however, that is
slower and somewhat more intrusive .

I remember that there were some hurdles w/ getting T5 apps to work w/
Glassfish in the past due to xml parser conflicts, so there were a few
things to do.

So, to answer the question directly, for me it goes like this : Jetty,
Tomcat, Glassfish

Cheers,

Alex K

On Thu, Nov 19, 2009 at 9:30 AM, Toby Hobson toby.hob...@googlemail.comwrote:

 For development I use jetty along with JRebel. Jetty, JRebel and T5's
 dynamic class reloading make a perfect combination ... I can change pages,
 components, model objects, even spring beans on the fly. For production I
 used to deploy on Tomcat or Weblogic although I've recently moved across to
 Glassfish and have been very happy so far. Incidentally we don't bother
 with
 the various appserver plugin's for IDEs ... running weblogic/glassfish on a
 development machine seems crazy to me ... that's what the staging/test
 environment is for!

 Toby

 2009/11/18 Juan E. Maya maya.j...@gmail.com

  I use tomcat with the sysdeo plugin
  (http://www.eclipsetotale.com/tomcatPlugin.html), although as pointed
  out by Tiago tapestry reduces the need of deploy-on-change, still the
  code in the business layer of the application requires a redeploy.
  Sysdeo although not perfect, reduces the deploys to changes Hibernate
  mappings or when u add new methods to ur classes (Non-Managed by
  tapestry)
 
  I have never used glassfish so i couldn;t say how they compare
 
  U could also check JRebel (http://www.zeroturnaround.com/jrebel/) for
  a more robust solution
 
 
  On Wed, Nov 18, 2009 at 7:04 PM, Thiago H. de Paula Figueiredo
  thiag...@gmail.com wrote:
   Em Wed, 18 Nov 2009 15:54:04 -0200, Alessandro Bottoni
   alexbott...@gmail.com escreveu:
  
   Hi All,
  
   Hi!
  
   in your opinion, which is the best server (servlet container,
 actually)
   for Tapestry?
  
   Definitely, Jetty, at least for development, maybe also for production.
   Small, easy to configure, fast. That's what I use for development and
   production.
  
   It seems that Glassfish has an advantage over other solutions in the
   development environment because of the deploy-on-change feature
 supplied
   by NetBeans and Eclipse plug-ins but...
  
   I have a bad experience about it: deploys on change failed seemingly
   randomly. I just run Jetty over an exploded WAR. Works like a charm.
   By the way, deploy-on-change doesn't make any sense when used with
   Tapestry's live class realoading.
  
   --
   Thiago H. de Paula Figueiredo
   Independent Java, Apache Tapestry 5 and Hibernate consultant,
 developer,
  and
   instructor
   Owner, software architect and developer, Ars Machina Tecnologia da
   Informação Ltda.
   http://www.arsmachina.com.br
  
   -
   To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
   For additional commands, e-mail: users-h...@tapestry.apache.org
  
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: users-h...@tapestry.apache.org
 
 



GAE T5 : Passing a request to the T5 pipeline from a servlet

2009-12-30 Thread Alex Kotchnev
I've been struggling a bit w/ getting the GAE blobstore API to upload files
into a GAE T5 based app. All of the examples include using the blobstore
service to create a URL to which the file is uploaded, after which the
blobstore passes the control to a URL provided by user, e.g. :

url = blobstoreService.createUploadUrl(/upload)   // after the upload is
done, GAE was supposed to post to this URL

My initial take was to use the T5 component resources to create an event
handling URL and pass it into the blobstore service, with the expectation
that GAE will then post to my event URL at which point I'd post-process the
upload.

The problem is that it seems that GAE doesn't initiate a new POST request to
the given URL, but just forwards the request to it. As a result, because
the request is initially initiated to a non T5 URL, the whole T5 magic
doesn't kick in and my event handler isn't called. However, if I create a
simple servlet, mapped to , say '/upload', it does get called properly.

So, the idea I have is this : create a very simple servlet mapped to
/upload, and whenever it's called, I'll just pipe in the request into the
T5 infrastructure so that my events get called as I want them to. The
question here is : if I did that, what entrypoint in the API should I use ?

Alternatively, I could certainly look up the T5 registry from the servlet (
I think I know how to do that) and invoke some service in it to post
process the uploads.

Can anyone point me where I should be looking at for the entrypoint into the
T5 processing pipeline that I can invoke from the servlet ?

Thanks in advance,

Alex K


Re: Unit testing components with @Parameter annotation

2009-12-30 Thread Stephan Schwab

Thanks for mentioning TestBase. I like the set() method to push values into
private fields.

You are certainly right about that @Parameter is about the interaction with
the container of the component and should be tested via an integration test.

Thanks again.

Stephan


-
--
http://www.caimito.net - Caimito One Team - Agile Collaboration and Planning
tool
http://www.stephan-schwab.com - Personal blog
http://code.google.com/p/tapestry-sesame - Authentication extension for
Tapestry 5

-- 
View this message in context: 
http://old.nabble.com/Unit-testing-components-with-%40Parameter-annotation-tp26971514p26973941.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