T5: Equivalent to reserved parameters ?

2008-01-10 Thread Hugo Palma
Is there any equivalent to T4 reserved parameters in T5 ?

What T5 is doing is just ignore the passed parameters that are also
generated by the component itself.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: T5: Equivalent to reserved parameters ?

2008-01-10 Thread Yeeswara Nadapana (HCL Financial Services)

Hi,

Please suggest me a simple way to show my ArrayList of string objects as
a drop down combo box.

Thanks
Yees.



-Original Message-
From: Hugo Palma [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 10, 2008 4:11 PM
To: Tapestry users
Subject: T5: Equivalent to reserved parameters ?

Is there any equivalent to T4 reserved parameters in T5 ?

What T5 is doing is just ignore the passed parameters that are also
generated by the component itself.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


DISCLAIMER:
---

The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only. 
It shall not attach any liability on the originator or HCL or its affiliates. 
Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the 
opinions of HCL or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is 
strictly prohibited. If you have 
received this email in error please delete it and notify the sender 
immediately. Before opening any mail and 
attachments please check them for viruses and defect.

---

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to make drop down box from ArrayList

2008-01-10 Thread Yeeswara Nadapana (HCL Financial Services)

Hi,

 

 Please suggest me a simple way to show my ArrayList of string objects 

 as a drop down combo box.

 

Thanks

Yees.



DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only. 
It shall not attach any liability on the originator or HCL or its affiliates. 
Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the 
opinions of HCL or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is 
strictly prohibited. If you have 
received this email in error please delete it and notify the sender 
immediately. Before opening any mail and 
attachments please check them for viruses and defect.
---

Re: T5: Equivalent to reserved parameters ?

2008-01-10 Thread Hugo Palma
Please start a new thread with an appropriate subject for your question.

Yeeswara Nadapana (HCL Financial Services) wrote:
 Hi,

 Please suggest me a simple way to show my ArrayList of string objects as
 a drop down combo box.

 Thanks
 Yees.



 -Original Message-
 From: Hugo Palma [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, January 10, 2008 4:11 PM
 To: Tapestry users
 Subject: T5: Equivalent to reserved parameters ?

 Is there any equivalent to T4 reserved parameters in T5 ?

 What T5 is doing is just ignore the passed parameters that are also
 generated by the component itself.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 DISCLAIMER:
 ---

 The contents of this e-mail and any attachment(s) are confidential and 
 intended for the named recipient(s) only. 
 It shall not attach any liability on the originator or HCL or its affiliates. 
 Any views or opinions presented in 
 this email are solely those of the author and may not necessarily reflect the 
 opinions of HCL or its affiliates. 
 Any form of reproduction, dissemination, copying, disclosure, modification, 
 distribution and / or publication of 
 this message without the prior written consent of the author of this e-mail 
 is strictly prohibited. If you have 
 received this email in error please delete it and notify the sender 
 immediately. Before opening any mail and 
 attachments please check them for viruses and defect.

 ---

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to make drop down box from ArrayList

2008-01-10 Thread Yeeswara Nadapana (HCL Financial Services)
Hi Ulrich,

I am using Tapestry 5. I have made a drop down box using the ArrayList. I want 
to fire an onChange event on my Page class and get some data relevant to the 
selected option and display on another TextArea. Please check my code snippet 
and let me know a way to that.

select t:id=importConditions onChange=javascript:filterOnChange();
t:loop source=filterList value=currentFilter
option value=${currentFilter}
${currentFilter}
/option
/t:loop
/select

Thanks,
Yees


-Original Message-
From: Ulrich Stärk [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 10, 2008 6:39 PM
To: Tapestry users
Subject: Re: How to make drop down box from ArrayList

It would be better to inform us about the Tapestry version you are using 
instead of sending us a disclaimer that is longer than the rest of your 
mail.

Uli

Yeeswara Nadapana (HCL Financial Services) schrieb:
 Hi,
 
  
 
  Please suggest me a simple way to show my ArrayList of string objects 
 
  as a drop down combo box.
 
  
 
 Thanks
 
 Yees.
 
 
 
 DISCLAIMER:
 ---
 The contents of this e-mail and any attachment(s) are confidential and 
 intended for the named recipient(s) only. 
 It shall not attach any liability on the originator or HCL or its affiliates. 
 Any views or opinions presented in 
 this email are solely those of the author and may not necessarily reflect the 
 opinions of HCL or its affiliates. 
 Any form of reproduction, dissemination, copying, disclosure, modification, 
 distribution and / or publication of 
 this message without the prior written consent of the author of this e-mail 
 is strictly prohibited. If you have 
 received this email in error please delete it and notify the sender 
 immediately. Before opening any mail and 
 attachments please check them for viruses and defect.
 ---


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to make drop down box from ArrayList

2008-01-10 Thread Ulrich Stärk
It would be better to inform us about the Tapestry version you are using 
instead of sending us a disclaimer that is longer than the rest of your 
mail.


Uli

Yeeswara Nadapana (HCL Financial Services) schrieb:

Hi,

 

 Please suggest me a simple way to show my ArrayList of string objects 


 as a drop down combo box.

 


Thanks

Yees.



DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. 
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have 
received this email in error please delete it and notify the sender immediately. Before opening any mail and 
attachments please check them for viruses and defect.

---



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Newbie needs help with display of values on page

2008-01-10 Thread Mark Horn
Dave,

The Tapestry 5 Wiki help me a lot.  It can be found at:

http://wiki.apache.org/tapestry/#head-fa893a125e25b4c453eaab4fc08b8fb5d00ca04a

Also, There are some nice tutorials/examples available at:

http://code.google.com/p/shams/

-Mark

On 1/10/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Things are kind of slow here at the office, so I'm taking advantage of that
 to finally get a look at Tapestry. Though I'm a newbie to Tapestry, I'm not
 a newbie to web development; I've worked with JSP, JSF, Struts, and even
 XMLC. Thought I might as well dive into Tap5 since that's the future, even
 though that seems to mean that the book I have (Kent Tong's) is of no value
 to me (this is not a complaint; I know others have complained about the
 lack of backward compatibility, but I realize that sometimes you just have
 to drop that baggage in order to make any real progress forward). But I'm
 having a tough time finding any documentation on page templates; how to
 build them or display values.

 I've started with the tutorial app, using v5.0.7,  and am gradually
 extending it. I've gotten the Spring integration working, which was very
 simple once I began to understand what I had done wrong. So I'm able to
 leverage my existing knowledge, and get data from a database. I do intend
 to look at the Tapestry IOC way of doing things, but I'm starting with
 little steps; that will come later.

 So what I've got at this point is a Jobs.tml that I can access from the
 Start.tml. Jobs.java gets a ServiceDao injected by Spring, and uses that to
 retrieve a list of JobStatus for display. A JobStatus consists of a String
 jobId, a String projectNumber, and a MapString,Status stages. A Status is
 an enum, and the stages Map maps various job stages to the status of that
 stage. I access the Status of a job stage by calling getStatus(String
 stage) on the JobStatus object.

 In Jobs.tml I have:

   table
   thead
 tr
   thJob ID/th
   thProject Number/th
   thOutput Status/th
   thShipment Info Posting/th
   thBureau Code Posting/th
   thInquiry Posting/th
 /tr
   /thead
   tbody
   tr t:type=loop source=jobs value=jobStatus 
 td${jobStatus.jobId}/td
 td${jobStatus.projectNumber}/td
 td${outputStatus}/td
 
   /tr
 /tbody
   /table

 There are a couple of things about this that bother me. It seems that
 Jobs.java is required to have a jobStatus property (with getter/setter) to
 support the iteration (and for no other reason). I can get the output
 status with ${outputStatus} by adding a getOutputStatus() method to
 Jobs.java, which then invokes the getStatus(Output) method on the
 required JobStatus property. But to me that smells (to use XP
 terminology). It seems that a temp variable could be created to support the
 iteration (ala JSF), and I would rather access the output status by
 something like ${jobStatus.getStatus(Output)}, without requiring an
 artificial method in Jobs.java, especially since it appears that I'll have
 to add a number of other, similar, artificial methods for the other
 statuses.

 I realize that I may have a *lot* wrong above, and my hope is that someone
 will (gently) point those errors out to me. Better yet would be to (again
 gently) point me to documentation that will explain the above.

 Thanks,
 Dave

 We must begin not just to act, but to think, for there is no better slave
 than the one who believes his slavery to be freedom, and we are in
 no greater peril than when we cannot see the chains on our minds
 because there are yet no chains on our feet.
 -- Michael Reid


 This message contains information from Equifax Inc. which may be
 confidential and privileged.  If you are not an intended recipient, please
 refrain from any disclosure, copying, distribution or use of this
 information and note that such actions are prohibited.  If you have
 received this transmission in error, please notify by e-mail
 [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Newbie needs help with display of values on page

2008-01-10 Thread Shing Hing Man
I think the new binding var (available from Tapestry
0.8 snapshot)  is what you are looking for.
Document is available at the following.

http://tapestry.formos.com/nightly/tapestry5/tapestry-core/guide/parameters.html

There is also a post on this last week.

Shing

--- [EMAIL PROTECTED] wrote:

 
 Things are kind of slow here at the office, so I'm
 taking advantage of that
 to finally get a look at Tapestry. Though I'm a
 newbie to Tapestry, I'm not
 a newbie to web development; I've worked with JSP,
 JSF, Struts, and even
 XMLC. Thought I might as well dive into Tap5 since
 that's the future, even
 though that seems to mean that the book I have (Kent
 Tong's) is of no value
 to me (this is not a complaint; I know others have
 complained about the
 lack of backward compatibility, but I realize that
 sometimes you just have
 to drop that baggage in order to make any real
 progress forward). But I'm
 having a tough time finding any documentation on
 page templates; how to
 build them or display values.
 
 I've started with the tutorial app, using v5.0.7, 
 and am gradually
 extending it. I've gotten the Spring integration
 working, which was very
 simple once I began to understand what I had done
 wrong. So I'm able to
 leverage my existing knowledge, and get data from a
 database. I do intend
 to look at the Tapestry IOC way of doing things, but
 I'm starting with
 little steps; that will come later.
 
 So what I've got at this point is a Jobs.tml that I
 can access from the
 Start.tml. Jobs.java gets a ServiceDao injected by
 Spring, and uses that to
 retrieve a list of JobStatus for display. A
 JobStatus consists of a String
 jobId, a String projectNumber, and a
 MapString,Status stages. A Status is
 an enum, and the stages Map maps various job stages
 to the status of that
 stage. I access the Status of a job stage by calling
 getStatus(String
 stage) on the JobStatus object.
 
 In Jobs.tml I have:
 
   table
   thead
 tr
   thJob ID/th
   thProject Number/th
   thOutput Status/th
   thShipment Info Posting/th
   thBureau Code Posting/th
   thInquiry Posting/th
 /tr
   /thead
   tbody
   tr t:type=loop source=jobs
 value=jobStatus 
 td${jobStatus.jobId}/td
 td${jobStatus.projectNumber}/td
 td${outputStatus}/td
 
   /tr
 /tbody
   /table
 
 There are a couple of things about this that bother
 me. It seems that
 Jobs.java is required to have a jobStatus property
 (with getter/setter) to
 support the iteration (and for no other reason). I
 can get the output
 status with ${outputStatus} by adding a
 getOutputStatus() method to
 Jobs.java, which then invokes the
 getStatus(Output) method on the
 required JobStatus property. But to me that smells
 (to use XP
 terminology). It seems that a temp variable could be
 created to support the
 iteration (ala JSF), and I would rather access the
 output status by
 something like ${jobStatus.getStatus(Output)},
 without requiring an
 artificial method in Jobs.java, especially since it
 appears that I'll have
 to add a number of other, similar, artificial
 methods for the other
 statuses.
 
 I realize that I may have a *lot* wrong above, and
 my hope is that someone
 will (gently) point those errors out to me. Better
 yet would be to (again
 gently) point me to documentation that will explain
 the above.
 
 Thanks,
 Dave
 
 We must begin not just to act, but to think, for
 there is no better slave
 than the one who believes his slavery to be freedom,
 and we are in
 no greater peril than when we cannot see the chains
 on our minds
 because there are yet no chains on our feet.
 -- Michael Reid
 
 
 This message contains information from Equifax Inc.
 which may be
 confidential and privileged.  If you are not an
 intended recipient, please
 refrain from any disclosure, copying, distribution
 or use of this
 information and note that such actions are
 prohibited.  If you have
 received this transmission in error, please notify
 by e-mail
 [EMAIL PROTECTED]
 
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 


Home page : http://www.lombok.demon.co.uk/



  __
Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Newbie needs help with display of values on page

2008-01-10 Thread Davor Hrg
5.0.8-SNAPSHOT has new var: binding prefix
but it is only for simple values, without expression evaluation.
for example to display loop index.


Davor Hrg


On Jan 10, 2008 2:52 PM,  [EMAIL PROTECTED] wrote:

 Things are kind of slow here at the office, so I'm taking advantage of that
 to finally get a look at Tapestry. Though I'm a newbie to Tapestry, I'm not
 a newbie to web development; I've worked with JSP, JSF, Struts, and even
 XMLC. Thought I might as well dive into Tap5 since that's the future, even
 though that seems to mean that the book I have (Kent Tong's) is of no value
 to me (this is not a complaint; I know others have complained about the
 lack of backward compatibility, but I realize that sometimes you just have
 to drop that baggage in order to make any real progress forward). But I'm
 having a tough time finding any documentation on page templates; how to
 build them or display values.

 I've started with the tutorial app, using v5.0.7,  and am gradually
 extending it. I've gotten the Spring integration working, which was very
 simple once I began to understand what I had done wrong. So I'm able to
 leverage my existing knowledge, and get data from a database. I do intend
 to look at the Tapestry IOC way of doing things, but I'm starting with
 little steps; that will come later.

 So what I've got at this point is a Jobs.tml that I can access from the
 Start.tml. Jobs.java gets a ServiceDao injected by Spring, and uses that to
 retrieve a list of JobStatus for display. A JobStatus consists of a String
 jobId, a String projectNumber, and a MapString,Status stages. A Status is
 an enum, and the stages Map maps various job stages to the status of that
 stage. I access the Status of a job stage by calling getStatus(String
 stage) on the JobStatus object.

 In Jobs.tml I have:

   table
   thead
 tr
   thJob ID/th
   thProject Number/th
   thOutput Status/th
   thShipment Info Posting/th
   thBureau Code Posting/th
   thInquiry Posting/th
 /tr
   /thead
   tbody
   tr t:type=loop source=jobs value=jobStatus 
 td${jobStatus.jobId}/td
 td${jobStatus.projectNumber}/td
 td${outputStatus}/td
 
   /tr
 /tbody
   /table

 There are a couple of things about this that bother me. It seems that
 Jobs.java is required to have a jobStatus property (with getter/setter) to
 support the iteration (and for no other reason). I can get the output
 status with ${outputStatus} by adding a getOutputStatus() method to
 Jobs.java, which then invokes the getStatus(Output) method on the
 required JobStatus property. But to me that smells (to use XP
 terminology). It seems that a temp variable could be created to support the
 iteration (ala JSF), and I would rather access the output status by
 something like ${jobStatus.getStatus(Output)}, without requiring an
 artificial method in Jobs.java, especially since it appears that I'll have
 to add a number of other, similar, artificial methods for the other
 statuses.

 I realize that I may have a *lot* wrong above, and my hope is that someone
 will (gently) point those errors out to me. Better yet would be to (again
 gently) point me to documentation that will explain the above.

 Thanks,
 Dave

 We must begin not just to act, but to think, for there is no better slave
 than the one who believes his slavery to be freedom, and we are in
 no greater peril than when we cannot see the chains on our minds
 because there are yet no chains on our feet.
 -- Michael Reid


 This message contains information from Equifax Inc. which may be
 confidential and privileged.  If you are not an intended recipient, please
 refrain from any disclosure, copying, distribution or use of this
 information and note that such actions are prohibited.  If you have
 received this transmission in error, please notify by e-mail
 [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Torna-te um pioneiro do Portal Emprego.pt.

2008-01-10 Thread hugo . m . palma
To view the message, please use an HTML compatible email viewer!



Re: Torna-te um pioneiro do Portal Emprego.pt.

2008-01-10 Thread Hugo Palma
Sorry about this.
This new service here in Portugal got to all my gmail contacts and sent
this email to everyone of them.

[EMAIL PROTECTED] wrote:
 To view the message, please use an HTML compatible email viewer!


   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



PropertySelection request

2008-01-10 Thread Tobias Marx
A quick but useful feature suggestion for the default PropertySelection:

optional=true/false

Which would automatically add an empty item ad the beginning, for the
case it is an optional PropertySelection.

Thanks!

Tobias

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PropertySelection request

2008-01-10 Thread Andreas Andreou
http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/form/IPropertySelectionModel.html
and
http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/form/LabeledPropertySelectionModel.html

On Jan 10, 2008 5:25 PM, Tobias Marx [EMAIL PROTECTED] wrote:
 A quick but useful feature suggestion for the default PropertySelection:

 optional=true/false

 Which would automatically add an empty item ad the beginning, for the
 case it is an optional PropertySelection.

 Thanks!

 Tobias

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



PageTester and UploadedFile

2008-01-10 Thread Foror
As upload the file through the form when is used the PageTester?

This not worked:

MapString, String fieldValues = new HashMapString, String();

FileInputStream in = new FileInputStream(file);
byte[] data = new byte[(int) file.length()];
in.read(data);

fieldValues.put(avatar, new String(data));

PageTester tester = new PageTester(appPackage, appName, Filler.CONTEXT_PATH);
tester.submitForm(form, fieldValues);



public class MyPage {
   ...
   private UploadedFile avatar;
   ...
}



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T4: Newbie's questions

2008-01-10 Thread Zheng, Xiahong
Hi, 

I am exploring Tapestry (currently looking at 4.1.4 snapshot). So far,
the experience has been very positive. I was able to convert a Struts
based application to Tapestry4 in just a couple days. However, I still
need answer to the following questions,

1) Layout management: I couldn't find a documented solution to replace
tiles used by the old application.

2) Dynamic attribute value generation: Something like the following you
can do with JSP

input type=submit value=${button. value}/

   How do I achieve this in Tapestry? Is there a component I can use to
generate dynamic content as value for any arbitrary attribute of an HTML
element?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T4: Newbie's questions

2008-01-10 Thread Norman Franke

On Jan 10, 2008, at 2:05 PM, Zheng, Xiahong wrote:


1) Layout management: I couldn't find a documented solution to replace
tiles used by the old application.


Not sure on that one, I don't believe there really is anything  
dealing with layout other than a table.


2) Dynamic attribute value generation: Something like the following  
you

can do with JSP

input type=submit value=${button. value}/

   How do I achieve this in Tapestry? Is there a component I can  
use to
generate dynamic content as value for any arbitrary attribute of an  
HTML

element?


The Any component is what you want, I believe:

input jwcid=@Any type=submit value=ognl:value/

-Norman



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T4: Newbie's questions

2008-01-10 Thread Ulrich Stärk

Zheng, Xiahong schrieb:
Hi, 


I am exploring Tapestry (currently looking at 4.1.4 snapshot). So far,
the experience has been very positive. I was able to convert a Struts
based application to Tapestry4 in just a couple days. However, I still
need answer to the following questions,

1) Layout management: I couldn't find a documented solution to replace
tiles used by the old application.


I'm no Struts expert but AFAICR tiles are just some kind of reusable 
templates. In Tapestry every component you write can be compared with a 
tile. Just write your component (with or without a template) and reuse 
it anywhere in your projects.
To manage a common layout on all pages you write a so called Border 
component which contains layout common to all pages and that contains 
the RenderBody component. If you then wrap your page's components within 
 your Border component, the content of your Border component is 
rendered around them. Look here for an example: 
http://tapestry.apache.org/tapestry4.1/components/general/renderbody.html




2) Dynamic attribute value generation: Something like the following you
can do with JSP

input type=submit value=${button. value}/

   How do I achieve this in Tapestry? Is there a component I can use to
generate dynamic content as value for any arbitrary attribute of an HTML
element?


In Tapestry you do that with some OGNL expression. Your example would be 
something like input jwcid=@Submit value=ognl:pageProperty / which 
would label your button according to a call of getPageProperty() on your 
page class.


Cheers,

Uli

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T4: Newbie's questions

2008-01-10 Thread Marcus
Hi Zheng,

Since you are newbie, I think you should try T5. I'm a Tapestry user since
T3. T5 is more intuitive and easy to learn, in my opinion.

Marcus


Re: T4: Newbie's questions

2008-01-10 Thread Kalle Korhonen
On 1/10/08, Ulrich Stärk [EMAIL PROTECTED] wrote:

 Zheng, Xiahong schrieb:
  1) Layout management: I couldn't find a documented solution to replace
  tiles used by the old application.
 I'm no Struts expert but AFAICR tiles are just some kind of reusable
 templates. In Tapestry every component you write can be compared with a
 tile. Just write your component (with or without a template) and reuse
 it anywhere in your projects.
 To manage a common layout on all pages you write a so called Border
 component which contains layout common to all pages and that contains
 the RenderBody component. If you then wrap your page's components within
   your Border component, the content of your Border component is
 rendered around them. Look here for an example:
 http://tapestry.apache.org/tapestry4.1/components/general/renderbody.html


One thing that may be complicating things for people with Tiles experience
is to wrap their heads around the fact that you really aren't managing page
snippets, but complete page templates in Tapestry, in other words a Tapestry
page template combines both a Tiles definition and an individiual Tiles page
snippet into one; an approach similar to Facelets. So a Tapestry page
typically always starts with a Border component of your choice (equal to a
Tiles layout definition), containing the body of the page, which the Border
component (template) then injects to an appropriate place with the help of a
Body component to produce the rendered page. What you loose compared to
Tiles is that you have to declare a Border for each page, but you get it
back with the additional flexibility of being able to easily use and switch
to different Borders and the page itself documenting which layout it's
currently using.

Kalle


  2) Dynamic attribute value generation: Something like the following you
  can do with JSP
 
input type=submit value=${button. value}/
 
 How do I achieve this in Tapestry? Is there a component I can use to
  generate dynamic content as value for any arbitrary attribute of an HTML
  element?

 In Tapestry you do that with some OGNL expression. Your example would be
 something like input jwcid=@Submit value=ognl:pageProperty / which
 would label your button according to a call of getPageProperty() on your
 page class.

 Cheers,

 Uli

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




RE: T4: Newbie's questions

2008-01-10 Thread Zheng, Xiahong
Thanks Norman and Ulrich for your quick response. Now I am getting
closer. In my scenario, I want to append a dynamic content to the
onclick attribute, not to replace it entirely. See below,

input jwcid=@Any
onclick=document.getElementById('positionId').value= type=submit / 

How can I append OGNL expression to the onclick attribute?


-Original Message-
From: Norman Franke [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 10, 2008 2:15 PM
To: Tapestry users
Subject: Re: T4: Newbie's questions

On Jan 10, 2008, at 2:05 PM, Zheng, Xiahong wrote:

 1) Layout management: I couldn't find a documented solution to replace
 tiles used by the old application.

Not sure on that one, I don't believe there really is anything  
dealing with layout other than a table.

 2) Dynamic attribute value generation: Something like the following  
 you
 can do with JSP

   input type=submit value=${button. value}/

How do I achieve this in Tapestry? Is there a component I can  
 use to
 generate dynamic content as value for any arbitrary attribute of an  
 HTML
 element?

The Any component is what you want, I believe:

input jwcid=@Any type=submit value=ognl:value/

-Norman



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T4: Newbie's questions

2008-01-10 Thread Norman Franke

On Jan 10, 2008, at 3:04 PM, Zheng, Xiahong wrote:


Thanks Norman and Ulrich for your quick response. Now I am getting
closer. In my scenario, I want to append a dynamic content to the
onclick attribute, not to replace it entirely. See below,

input jwcid=@Any
onclick=document.getElementById('positionId').value=  
type=submit /


How can I append OGNL expression to the onclick attribute?


You can have a page method return the entire string, or read up on  
OGNL. It can do string concatenation.


-Norman




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: T4: Newbie's questions

2008-01-10 Thread Zheng, Xiahong
I will try to read OGNL. For now, I did just as you suggested; created a
page method to return the entire string. The down side is: I have
JavaScript in my Page class which is vulnerable to UI changes (form
element id changes, i.e.). 

-Original Message-
From: Norman Franke [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 10, 2008 3:38 PM
To: Tapestry users
Subject: Re: T4: Newbie's questions

On Jan 10, 2008, at 3:04 PM, Zheng, Xiahong wrote:

 Thanks Norman and Ulrich for your quick response. Now I am getting
 closer. In my scenario, I want to append a dynamic content to the
 onclick attribute, not to replace it entirely. See below,

 input jwcid=@Any
 onclick=document.getElementById('positionId').value=  
 type=submit /

 How can I append OGNL expression to the onclick attribute?

You can have a page method return the entire string, or read up on  
OGNL. It can do string concatenation.

-Norman




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[T5] NPE in PageRenderQueueImpl

2008-01-10 Thread Moritz Gmelin

Hi,

I have a rather big application with hibernate integration that I am  
trying to deploy on a tomcat Server. After first deployment, I get the  
following error message almost for every page I go to. If I then just  
hit reload, the page loads correctly. I must touch every page maybe  
2 or 3 time for the problem to dissappear. Then it won't re-appear  
anymore until I stop and start the server again.

Anyone seen this before?

Regards

Moritz
java.lang.NullPointerException
Stack trace
org 
.apache 
.tapestry 
.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java: 
52)
org.apache.tapestry.internal.services.MarkupRendererPipelineImpl 
$1.renderMarkup(MarkupRendererPipelineImpl.java:39)
org.apache.tapestry.services.TapestryModule 
$20.renderMarkup(TapestryModule.java:1349)
org.apache.tapestry.services.TapestryModule 
$19.renderMarkup(TapestryModule.java:1330)
org.apache.tapestry.services.TapestryModule 
$18.renderMarkup(TapestryModule.java:1312)
org.apache.tapestry.services.TapestryModule 
$17.renderMarkup(TapestryModule.java:1294)
org 
.apache 
.tapestry 
.internal 
.services 
.MarkupRendererPipelineImpl 
.renderMarkup(MarkupRendererPipelineImpl.java:48)
org 
.apache 
.tapestry 
.internal 
.services 
.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:55)
org 
.apache 
.tapestry 
.internal 
.services 
.PageResponseRendererImpl 
.renderPageResponse(PageResponseRendererImpl.java:56)
org 
.apache 
.tapestry 
.internal 
.services 
.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java: 
87)
org 
.apache 
.tapestry 
.internal 
.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:66)
org.apache.tapestry.services.TapestryModule 
$12.service(TapestryModule.java:905)
de.avetana.patientenakte.services.AppModule$2.service(AppModule.java: 
110)

de.avetana.patientenakte.services.AppModule$1.service(AppModule.java:59)
org 
.apache 
.tapestry 
.internal.services.LocalizationFilter.service(LocalizationFilter.java: 
43)
org.apache.tapestry.services.TapestryModule 
$2.service(TapestryModule.java:487)
org 
.apache 
.tapestry 
.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79)
org.apache.tapestry.internal.services.CheckForUpdatesFilter 
$2.invoke(CheckForUpdatesFilter.java:94)
org.apache.tapestry.internal.services.CheckForUpdatesFilter 
$2.invoke(CheckForUpdatesFilter.java:85)
org 
.apache 
.tapestry 
.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)
org 
.apache 
.tapestry 
.internal 
.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:107)
org.apache.tapestry.services.TapestryModule 
$11.service(TapestryModule.java:888)

org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:164)
org 
.apache 
.catalina 
.core 
.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 
235)
org 
.apache 
.catalina 
.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org 
.apache 
.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 
233)
org 
.apache 
.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 
175)
org 
.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java: 
128)
org 
.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java: 
102)
org 
.apache 
.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java: 
263)

org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
org 
.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java: 
697)
org.apache.jk.common.ChannelSocket 
$SocketConnection.runIt(ChannelSocket.java:889)
org.apache.tomcat.util.threads.ThreadPool 
$ControlRunnable.run(ThreadPool.java:690)

java.lang.Thread.run(Thread.java:595)

Re: T4: Newbie's questions

2008-01-10 Thread Jesse Kuhnert
input jwcid=@Any stringValue=ognl:'myStringValue' + page.user.name /

On Jan 10, 2008 3:52 PM, Zheng, Xiahong [EMAIL PROTECTED] wrote:
 I will try to read OGNL. For now, I did just as you suggested; created a
 page method to return the entire string. The down side is: I have
 JavaScript in my Page class which is vulnerable to UI changes (form
 element id changes, i.e.).

 -Original Message-
 From: Norman Franke [mailto:[EMAIL PROTECTED]
 Sent: Thursday, January 10, 2008 3:38 PM
 To: Tapestry users
 Subject: Re: T4: Newbie's questions


 On Jan 10, 2008, at 3:04 PM, Zheng, Xiahong wrote:

  Thanks Norman and Ulrich for your quick response. Now I am getting
  closer. In my scenario, I want to append a dynamic content to the
  onclick attribute, not to replace it entirely. See below,
 
  input jwcid=@Any
  onclick=document.getElementById('positionId').value=
  type=submit /
 
  How can I append OGNL expression to the onclick attribute?

 You can have a page method return the entire string, or read up on
 OGNL. It can do string concatenation.

 -Norman




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Jesse Kuhnert
Tapestry / OGNL / Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: T4: Newbie's questions

2008-01-10 Thread Zheng, Xiahong
How to escape single quote inside my string constant? 

-Original Message-
From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 10, 2008 4:19 PM
To: Tapestry users
Subject: Re: T4: Newbie's questions

input jwcid=@Any stringValue=ognl:'myStringValue' + page.user.name
/

On Jan 10, 2008 3:52 PM, Zheng, Xiahong [EMAIL PROTECTED] wrote:
 I will try to read OGNL. For now, I did just as you suggested; created
a
 page method to return the entire string. The down side is: I have
 JavaScript in my Page class which is vulnerable to UI changes (form
 element id changes, i.e.).

 -Original Message-
 From: Norman Franke [mailto:[EMAIL PROTECTED]
 Sent: Thursday, January 10, 2008 3:38 PM
 To: Tapestry users
 Subject: Re: T4: Newbie's questions


 On Jan 10, 2008, at 3:04 PM, Zheng, Xiahong wrote:

  Thanks Norman and Ulrich for your quick response. Now I am getting
  closer. In my scenario, I want to append a dynamic content to the
  onclick attribute, not to replace it entirely. See below,
 
  input jwcid=@Any
  onclick=document.getElementById('positionId').value=
  type=submit /
 
  How can I append OGNL expression to the onclick attribute?

 You can have a page method return the entire string, or read up on
 OGNL. It can do string concatenation.

 -Norman




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Jesse Kuhnert
Tapestry / OGNL / Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T4: Newbie's questions

2008-01-10 Thread Norman Franke
Which doesn't work if you want to include a single quote in the  
string, as he seems to want. You can get around this by defining the  
component in the .page file and specifying that property like this:


  component id=attributesDisplay type=Insert

binding name=value  
value=components.table.columnValue /


binding name=renderTag value=literal:true /

binding name=width value=literal:100% /

binding name=onmouseover

  return escape(hintAttributesTxt(1,this,'+attrList 
+'))


/binding

  /component



Norman Franke

ASD, Inc.

On Jan 10, 2008, at 4:19 PM, Jesse Kuhnert wrote:

input jwcid=@Any stringValue=ognl:'myStringValue' +  
page.user.name /


On Jan 10, 2008 3:52 PM, Zheng, Xiahong [EMAIL PROTECTED] wrote:
I will try to read OGNL. For now, I did just as you suggested;  
created a

page method to return the entire string. The down side is: I have
JavaScript in my Page class which is vulnerable to UI changes (form
element id changes, i.e.).

-Original Message-
From: Norman Franke [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 10, 2008 3:38 PM
To: Tapestry users
Subject: Re: T4: Newbie's questions


On Jan 10, 2008, at 3:04 PM, Zheng, Xiahong wrote:


Thanks Norman and Ulrich for your quick response. Now I am getting
closer. In my scenario, I want to append a dynamic content to the
onclick attribute, not to replace it entirely. See below,

input jwcid=@Any
onclick=document.getElementById('positionId').value=
type=submit /

How can I append OGNL expression to the onclick attribute?


You can have a page method return the entire string, or read up on
OGNL. It can do string concatenation.

-Norman




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--
Jesse Kuhnert
Tapestry / OGNL / Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T4: Newbie's questions

2008-01-10 Thread Jesse Kuhnert
\'

On Jan 10, 2008 4:29 PM, Zheng, Xiahong [EMAIL PROTECTED] wrote:
 How to escape single quote inside my string constant?


 -Original Message-
 From: Jesse Kuhnert [mailto:[EMAIL PROTECTED]
 Sent: Thursday, January 10, 2008 4:19 PM
 To: Tapestry users
 Subject: Re: T4: Newbie's questions

 input jwcid=@Any stringValue=ognl:'myStringValue' + page.user.name
 /

 On Jan 10, 2008 3:52 PM, Zheng, Xiahong [EMAIL PROTECTED] wrote:
  I will try to read OGNL. For now, I did just as you suggested; created
 a
  page method to return the entire string. The down side is: I have
  JavaScript in my Page class which is vulnerable to UI changes (form
  element id changes, i.e.).
 
  -Original Message-
  From: Norman Franke [mailto:[EMAIL PROTECTED]
  Sent: Thursday, January 10, 2008 3:38 PM
  To: Tapestry users
  Subject: Re: T4: Newbie's questions
 
 
  On Jan 10, 2008, at 3:04 PM, Zheng, Xiahong wrote:
 
   Thanks Norman and Ulrich for your quick response. Now I am getting
   closer. In my scenario, I want to append a dynamic content to the
   onclick attribute, not to replace it entirely. See below,
  
   input jwcid=@Any
   onclick=document.getElementById('positionId').value=
   type=submit /
  
   How can I append OGNL expression to the onclick attribute?
 
  You can have a page method return the entire string, or read up on
  OGNL. It can do string concatenation.
 
  -Norman
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



 --
 Jesse Kuhnert
 Tapestry / OGNL / Dojo team member/developer

 Open source based consulting work centered around
 dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Jesse Kuhnert
Tapestry / OGNL / Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T4: Newbie's questions

2008-01-10 Thread Yunhua Sang
Hi Xiahong,

For Layout management, there is a example in Workbench demo:
src\Workbench\src\context\WEB-INF\Border.html
You may have better sense after you take a look of this page.
Cheers,
Yunhua
On Jan 10, 2008 2:26 PM, Ulrich Stärk [EMAIL PROTECTED] wrote:

 Zheng, Xiahong schrieb:
  Hi,
 
  I am exploring Tapestry (currently looking at 4.1.4 snapshot). So far,
  the experience has been very positive. I was able to convert a Struts
  based application to Tapestry4 in just a couple days. However, I still
  need answer to the following questions,
 
  1) Layout management: I couldn't find a documented solution to replace
  tiles used by the old application.

 I'm no Struts expert but AFAICR tiles are just some kind of reusable
 templates. In Tapestry every component you write can be compared with a
 tile. Just write your component (with or without a template) and reuse
 it anywhere in your projects.
 To manage a common layout on all pages you write a so called Border
 component which contains layout common to all pages and that contains
 the RenderBody component. If you then wrap your page's components within
  your Border component, the content of your Border component is
 rendered around them. Look here for an example:
 http://tapestry.apache.org/tapestry4.1/components/general/renderbody.html

 
  2) Dynamic attribute value generation: Something like the following you
  can do with JSP
 
input type=submit value=${button. value}/
 
 How do I achieve this in Tapestry? Is there a component I can use to
  generate dynamic content as value for any arbitrary attribute of an HTML
  element?

 In Tapestry you do that with some OGNL expression. Your example would be
 something like input jwcid=@Submit value=ognl:pageProperty / which
 would label your button according to a call of getPageProperty() on your
 page class.

 Cheers,

 Uli

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




RE: T4: Newbie's questions

2008-01-10 Thread Zheng, Xiahong
It works!!! Thanks a bunch.

-Original Message-
From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 10, 2008 4:33 PM
To: Tapestry users
Subject: Re: T4: Newbie's questions

\'

On Jan 10, 2008 4:29 PM, Zheng, Xiahong [EMAIL PROTECTED] wrote:
 How to escape single quote inside my string constant?


 -Original Message-
 From: Jesse Kuhnert [mailto:[EMAIL PROTECTED]
 Sent: Thursday, January 10, 2008 4:19 PM
 To: Tapestry users
 Subject: Re: T4: Newbie's questions

 input jwcid=@Any stringValue=ognl:'myStringValue' +
page.user.name
 /

 On Jan 10, 2008 3:52 PM, Zheng, Xiahong [EMAIL PROTECTED] wrote:
  I will try to read OGNL. For now, I did just as you suggested;
created
 a
  page method to return the entire string. The down side is: I have
  JavaScript in my Page class which is vulnerable to UI changes (form
  element id changes, i.e.).
 
  -Original Message-
  From: Norman Franke [mailto:[EMAIL PROTECTED]
  Sent: Thursday, January 10, 2008 3:38 PM
  To: Tapestry users
  Subject: Re: T4: Newbie's questions
 
 
  On Jan 10, 2008, at 3:04 PM, Zheng, Xiahong wrote:
 
   Thanks Norman and Ulrich for your quick response. Now I am getting
   closer. In my scenario, I want to append a dynamic content to the
   onclick attribute, not to replace it entirely. See below,
  
   input jwcid=@Any
   onclick=document.getElementById('positionId').value=
   type=submit /
  
   How can I append OGNL expression to the onclick attribute?
 
  You can have a page method return the entire string, or read up on
  OGNL. It can do string concatenation.
 
  -Norman
 
 
 
 
 
-
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
-
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



 --
 Jesse Kuhnert
 Tapestry / OGNL / Dojo team member/developer

 Open source based consulting work centered around
 dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Jesse Kuhnert
Tapestry / OGNL / Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T4: Newbie's questions

2008-01-10 Thread Norman Franke
I think that won't work for double quotes, should you need that. That  
was the issue I had originally, I think.


Norman Franke
ASD, Inc.

On Jan 10, 2008, at 4:41 PM, Zheng, Xiahong wrote:


It works!!! Thanks a bunch.

-Original Message-
From: Jesse Kuhnert [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 10, 2008 4:33 PM
To: Tapestry users
Subject: Re: T4: Newbie's questions

\'

On Jan 10, 2008 4:29 PM, Zheng, Xiahong [EMAIL PROTECTED] wrote:

How to escape single quote inside my string constant?


-Original Message-
From: Jesse Kuhnert [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 10, 2008 4:19 PM
To: Tapestry users
Subject: Re: T4: Newbie's questions

input jwcid=@Any stringValue=ognl:'myStringValue' +

page.user.name

/

On Jan 10, 2008 3:52 PM, Zheng, Xiahong [EMAIL PROTECTED]  
wrote:

I will try to read OGNL. For now, I did just as you suggested;

created

a

page method to return the entire string. The down side is: I have
JavaScript in my Page class which is vulnerable to UI changes (form
element id changes, i.e.).

-Original Message-
From: Norman Franke [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 10, 2008 3:38 PM
To: Tapestry users
Subject: Re: T4: Newbie's questions


On Jan 10, 2008, at 3:04 PM, Zheng, Xiahong wrote:


Thanks Norman and Ulrich for your quick response. Now I am getting
closer. In my scenario, I want to append a dynamic content to the
onclick attribute, not to replace it entirely. See below,

input jwcid=@Any
onclick=document.getElementById('positionId').value=
type=submit /

How can I append OGNL expression to the onclick attribute?


You can have a page method return the entire string, or read up on
OGNL. It can do string concatenation.

-Norman






-

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--
Jesse Kuhnert
Tapestry / OGNL / Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--
Jesse Kuhnert
Tapestry / OGNL / Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





RE: T4: Newbie's questions

2008-01-10 Thread Zheng, Xiahong
Thanks, I'll look into the example.

-Original Message-
From: Yunhua Sang [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 10, 2008 4:35 PM
To: Tapestry users
Subject: Re: T4: Newbie's questions

Hi Xiahong,

For Layout management, there is a example in Workbench demo:
src\Workbench\src\context\WEB-INF\Border.html
You may have better sense after you take a look of this page.
Cheers,
Yunhua
On Jan 10, 2008 2:26 PM, Ulrich Stärk [EMAIL PROTECTED] wrote:

 Zheng, Xiahong schrieb:
  Hi,
 
  I am exploring Tapestry (currently looking at 4.1.4 snapshot). So far,
  the experience has been very positive. I was able to convert a Struts
  based application to Tapestry4 in just a couple days. However, I still
  need answer to the following questions,
 
  1) Layout management: I couldn't find a documented solution to replace
  tiles used by the old application.

 I'm no Struts expert but AFAICR tiles are just some kind of reusable
 templates. In Tapestry every component you write can be compared with a
 tile. Just write your component (with or without a template) and reuse
 it anywhere in your projects.
 To manage a common layout on all pages you write a so called Border
 component which contains layout common to all pages and that contains
 the RenderBody component. If you then wrap your page's components within
  your Border component, the content of your Border component is
 rendered around them. Look here for an example:
 http://tapestry.apache.org/tapestry4.1/components/general/renderbody.html

 
  2) Dynamic attribute value generation: Something like the following you
  can do with JSP
 
input type=submit value=${button. value}/
 
 How do I achieve this in Tapestry? Is there a component I can use to
  generate dynamic content as value for any arbitrary attribute of an HTML
  element?

 In Tapestry you do that with some OGNL expression. Your example would be
 something like input jwcid=@Submit value=ognl:pageProperty / which
 would label your button according to a call of getPageProperty() on your
 page class.

 Cheers,

 Uli

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T5] NPE in PageRenderQueueImpl

2008-01-10 Thread Howard Lewis Ship
We're looking into this, it may be due to a known bug in JDK 1.5.

On Jan 10, 2008 1:08 PM, Moritz Gmelin [EMAIL PROTECTED] wrote:
 Hi,

 I have a rather big application with hibernate integration that I am
 trying to deploy on a tomcat Server. After first deployment, I get the
 following error message almost for every page I go to. If I then just
 hit reload, the page loads correctly. I must touch every page maybe
 2 or 3 time for the problem to dissappear. Then it won't re-appear
 anymore until I stop and start the server again.
 Anyone seen this before?

 Regards

 Moritz
 java.lang.NullPointerException
 Stack trace
 org
 .apache
 .tapestry
 .internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:
 52)
 org.apache.tapestry.internal.services.MarkupRendererPipelineImpl
 $1.renderMarkup(MarkupRendererPipelineImpl.java:39)
 org.apache.tapestry.services.TapestryModule
 $20.renderMarkup(TapestryModule.java:1349)
 org.apache.tapestry.services.TapestryModule
 $19.renderMarkup(TapestryModule.java:1330)
 org.apache.tapestry.services.TapestryModule
 $18.renderMarkup(TapestryModule.java:1312)
 org.apache.tapestry.services.TapestryModule
 $17.renderMarkup(TapestryModule.java:1294)
 org
 .apache
 .tapestry
 .internal
 .services
 .MarkupRendererPipelineImpl
 .renderMarkup(MarkupRendererPipelineImpl.java:48)
 org
 .apache
 .tapestry
 .internal
 .services
 .PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:55)
 org
 .apache
 .tapestry
 .internal
 .services
 .PageResponseRendererImpl
 .renderPageResponse(PageResponseRendererImpl.java:56)
 org
 .apache
 .tapestry
 .internal
 .services
 .PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:
 87)
 org
 .apache
 .tapestry
 .internal
 .services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:66)
 org.apache.tapestry.services.TapestryModule
 $12.service(TapestryModule.java:905)
 de.avetana.patientenakte.services.AppModule$2.service(AppModule.java:
 110)
 de.avetana.patientenakte.services.AppModule$1.service(AppModule.java:59)
 org
 .apache
 .tapestry
 .internal.services.LocalizationFilter.service(LocalizationFilter.java:
 43)
 org.apache.tapestry.services.TapestryModule
 $2.service(TapestryModule.java:487)
 org
 .apache
 .tapestry
 .internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79)
 org.apache.tapestry.internal.services.CheckForUpdatesFilter
 $2.invoke(CheckForUpdatesFilter.java:94)
 org.apache.tapestry.internal.services.CheckForUpdatesFilter
 $2.invoke(CheckForUpdatesFilter.java:85)
 org
 .apache
 .tapestry
 .ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)
 org
 .apache
 .tapestry
 .internal
 .services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:107)
 org.apache.tapestry.services.TapestryModule
 $11.service(TapestryModule.java:888)
 org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:164)
 org
 .apache
 .catalina
 .core
 .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
 235)
 org
 .apache
 .catalina
 .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 org
 .apache
 .catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
 233)
 org
 .apache
 .catalina.core.StandardContextValve.invoke(StandardContextValve.java:
 175)
 org
 .apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
 128)
 org
 .apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
 102)
 org
 .apache
 .catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
 263)
 org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
 org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
 org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
 org
 .apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
 697)
 org.apache.jk.common.ChannelSocket
 $SocketConnection.runIt(ChannelSocket.java:889)
 org.apache.tomcat.util.threads.ThreadPool
 $ControlRunnable.run(ThreadPool.java:690)
 java.lang.Thread.run(Thread.java:595)



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tapestry 5.0.7 : Filtering in Output component

2008-01-10 Thread Shing Hing Man
In Tap 4.0, the component Insert will
have filtering  on by default (characters such as 
are escaped to lt;).

In Tap 5.0.7, the Output component does not seem to
have  the above filtering capability. 
Do I have to write a custom Output component or
is there an existing Tap 5.0.7 component similar to
Tap 4.0 Insert ?

Shing 
 
 

Home page : http://www.lombok.demon.co.uk/



  __
Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Announcement] t5components - release 0.5.2

2008-01-10 Thread Sven Homburg

Hi there,

the t5components release 0.5.2 is out now
and implements three more components and one new binding.

special thanks to Tod Orr for his PagedLoop component.

project page with demo   http://213.160.23.119:8080/t5components/ click here 



-
best regards
Sven
-- 
View this message in context: 
http://www.nabble.com/-Announcement--t5components---release-0.5.2-tp14746224p14746224.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tapestry 5.0.7 : Filtering in Output component

2008-01-10 Thread Ashish Kheterpal



On 1/10/08 2:34 PM, Shing Hing Man [EMAIL PROTECTED] wrote:

 In Tap 4.0, the component Insert will
 have filtering  on by default (characters such as 
 are escaped to lt;).
 
 In Tap 5.0.7, the Output component does not seem to
 have  the above filtering capability.
 Do I have to write a custom Output component or
 is there an existing Tap 5.0.7 component similar to
 Tap 4.0 Insert ?
 
 Shing
 
 
 
 Home page : http://www.lombok.demon.co.uk/
 
 
 
   __
 Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


Ashish Kheterpal
Director, Lab IT
BHL Inc.
960 Atlantic Av., Suite 100
Alameda, CA 94501
Phone: 510-263-4074
Cell Phone: 510-390-6514



[T4] AJAX: reender whole page or just send back the markup of the div

2008-01-10 Thread Kaspar Fischer

Dear all,

I have a very basic question about AJAX in Tapestry 4.1.3: IIUC, the  
updateComponents
attribute provided by Tapestry components works by rendering the  
*whole* page,
extracting the relevant components (via their ids) and sending them  
back to the client.

I find this very elegant and it makes the pages easy to maintain.

For very complex pages, however, the above approach can result in  
some overhead.
I'd therefore like to just call a function that returns the  
replacement div (and

does not render the whole page).

Is there a simple example that shows how to do this?

For instance: Given a div and a link, clicking the link will replace  
the div via AJAX

without reloading the page.

Thanks,
Kaspar

P.S. I have started reading about EventListeners but am not sure  
whether this is

exactly what I need.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tapestry 5.0.7 : Filtering in Output component

2008-01-10 Thread Howard Lewis Ship
You will have to write your own component (a few lines), or add a JIRA
issue so that we can work on providing this functionality.

On Jan 10, 2008 2:34 PM, Shing Hing Man [EMAIL PROTECTED] wrote:
 In Tap 4.0, the component Insert will
 have filtering  on by default (characters such as 
 are escaped to ).

 In Tap 5.0.7, the Output component does not seem to
 have  the above filtering capability.
 Do I have to write a custom Output component or
 is there an existing Tap 5.0.7 component similar to
 Tap 4.0 Insert ?

 Shing



 Home page : http://www.lombok.demon.co.uk/



   __
 Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How about a PERSESSION_SCOPE?

2008-01-10 Thread Donyee
T5 now supports singleton and per-thread scope;
in the webapps the per-session is also a good way!

Any tips?


-- 
Yet Another Java EE Developer!


Re: [Announcement] t5components - release 0.5.2

2008-01-10 Thread Howard Lewis Ship
Looks good as usual!

On Jan 10, 2008 3:19 PM, Sven Homburg [EMAIL PROTECTED] wrote:

 Hi there,

 the t5components release 0.5.2 is out now
 and implements three more components and one new binding.

 special thanks to Tod Orr for his PagedLoop component.

 project page with demo   http://213.160.23.119:8080/t5components/ click here



 -
 best regards
 Sven
 --
 View this message in context: 
 http://www.nabble.com/-Announcement--t5components---release-0.5.2-tp14746224p14746224.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T4] AJAX: reender whole page or just send back the markup of the div

2008-01-10 Thread Pai911

Hi!
I don't think that Tapestry will render the whole page when a listener is in
invoked Asynchronously.

When you intend to define a link or form for Async invocation, remember to
set the async attribute as true

for example:
#DIV TO DISPLAY CURRENT TIME#
lt;span jwcid=[EMAIL PROTECTED] value=ognl:currentTime/


#LINK TO UPDATE CURRENT TIME PROPERTY#
lt;a jwcid=@DirectLink listener=listener:updateTime async=true
updateComponents=timeBar
What time is it? 

#CORRESPONDING JAVA CODE#

public abstract Date getCurrentTime();

public abstract void setCurrentTime(Date time);

public void updateTime(){
this.setCurrentTime(new Date());
}

I think Tapestry Ajax basically updates client side page by component.

If you want to manipulate it by DOM element, you have to use EventListener
annotation 
with the target to specify the DOM element you want to update

Please correct me if there is anything wrong

Regards,

John

hbf wrote:
 
 Dear all,
 
 I have a very basic question about AJAX in Tapestry 4.1.3: IIUC, the  
 updateComponents
 attribute provided by Tapestry components works by rendering the  
 *whole* page,
 extracting the relevant components (via their ids) and sending them  
 back to the client.
 I find this very elegant and it makes the pages easy to maintain.
 
 For very complex pages, however, the above approach can result in  
 some overhead.
 I'd therefore like to just call a function that returns the  
 replacement div (and
 does not render the whole page).
 
 Is there a simple example that shows how to do this?
 
 For instance: Given a div and a link, clicking the link will replace  
 the div via AJAX
 without reloading the page.
 
 Thanks,
 Kaspar
 
 P.S. I have started reading about EventListeners but am not sure  
 whether this is
 exactly what I need.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-T4--AJAX%3A-reender-whole-page-or-just-send-back-the-markup-of-the-div-tp14747399p14749380.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]