T5: FileUpload and time out

2008-07-09 Thread Angelo Chen

Hi,

following sample works, but how to determine if timeout error occurs?
thanks.

 public class UploadExample
{
private UploadedFile file;

public UploadedFile getFile()
{
return file;
}

public void setFile(UploadedFile file)
{
this.file = file;
}

public void onSuccess()
{
File copied = new File(/my/file/location/ +
file.getFileName());

file.write(copied);
}
}

-- 
View this message in context: 
http://www.nabble.com/T5%3A-FileUpload-and-time-out-tp18355064p18355064.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: T5: dead lock in Tapestry - Hibernate

2008-07-09 Thread Angelo Chen

just discovered that  my mysql jdbc driver is stil 3.x, updated to 5.1.6 in
pom.xml, problem goes away up to now.


Angelo Chen wrote:
 
 Hi,
 
 I encounter this warning quite often, it usually happens when I updated a
 row using mysql command line, then quit, after that I either update or
 append some rows using T5-hibernate, any idea why ? Thanks.
 
 
 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-dead-lock-in-Tapestry---Hibernate-tp18353145p18355745.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: T5: dead lock in Tapestry - Hibernate

2008-07-09 Thread Davor Hrg
nice to know :) , thnx
I still use 3.x :)

On Wed, Jul 9, 2008 at 9:10 AM, Angelo Chen [EMAIL PROTECTED]
wrote:


 just discovered that  my mysql jdbc driver is stil 3.x, updated to 5.1.6 in
 pom.xml, problem goes away up to now.


 Angelo Chen wrote:
 
  Hi,
 
  I encounter this warning quite often, it usually happens when I updated a
  row using mysql command line, then quit, after that I either update or
  append some rows using T5-hibernate, any idea why ? Thanks.
 
 
 

 --
 View this message in context:
 http://www.nabble.com/T5%3A-dead-lock-in-Tapestry---Hibernate-tp18353145p18355745.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: T5: dead lock in Tapestry - Hibernate

2008-07-09 Thread Angelo Chen

I had quite a number of this dead lock issues before, have to modify the
code, trial and error, just to make it works, looks like the main problem is
this jdbc 3.x, so far so good.


Davor Hrg wrote:
 
 nice to know :) , thnx
 I still use 3.x :)
 
 On Wed, Jul 9, 2008 at 9:10 AM, Angelo Chen [EMAIL PROTECTED]
 wrote:
 

 just discovered that  my mysql jdbc driver is stil 3.x, updated to 5.1.6
 in
 pom.xml, problem goes away up to now.


 Angelo Chen wrote:
 
  Hi,
 
  I encounter this warning quite often, it usually happens when I updated
 a
  row using mysql command line, then quit, after that I either update or
  append some rows using T5-hibernate, any idea why ? Thanks.
 
 
 

 --
 View this message in context:
 http://www.nabble.com/T5%3A-dead-lock-in-Tapestry---Hibernate-tp18353145p18355745.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]


 
 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-dead-lock-in-Tapestry---Hibernate-tp18353145p18356498.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]



Localization in business objects

2008-07-09 Thread Udo Abel
Hi,

is it possible to use the Tapestry Localization (message catalog) outside of 
pages and components, e.g. in business objects creating reports?

A simple
@Inject
private Messages messages;
doesn't work.
Of course Tapestry could supply messages from the main application catalog 
only, but since pages-specific catalogs are usually override existing 
application messages, that would be sufficient.

If thats not possible we must minic the name-decoration used by tapestry to 
load the best matching properties file, or is there another approach?

Thanks,
Udo.


-- 
Pt! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger

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



[T5] Using Autocomplete.configure to specify an afterUpdateElement function

2008-07-09 Thread Patrick Moriarty
Hi,

Although I can subclass Autocomplete and implement the configure(JSONObject)
method to specify an afterUpdateElement, the fuction I specify (as a String
here) gets surrounded by double-quotes by JSONObject.toString()

Thus it is not interpreted as a function.  It would be nice if I could use
some object, JavascriptFunction for example, which would not be quoted by
toString().

protected void configure(JSONObject config) {
  config.put(afterUpdateElement, function (element, selectedElement)
{element.blur();});
}

results in the following script:

new Ajax.Autocompleter(xxx, xxx:menu', '/xxx/xxx:autocomplete',
{indicator:xxx:loader,afterUpdateElement:function (element,
selectedElement) {element.blur();},paramName:t:input});

Should I create a JIRA issue for this?

Regards,

Paudi


Re: AW: AW: AW: AW: Strange behavior of special characters

2008-07-09 Thread Sebastian Altmann

Ok seems like this won't get me anywhre.

I just can repeat: 
All my properties filese are 100% encoded in UTF-8 (checked this in eclipse
and in an external editor) and all umlauts are displayed properly (except in
the special case described above).

To this problem you mentioned concerning Java Properties Files and UTF-8
encoding i just can guess, that it seems that this problem doesn't inflict
the usage of properties inside tapestry.
After i did a lot of testing concerning encoding both on UNIX and Windows
machines, 
i just can say that special characters in UTF-8 are display properly (except
in the special case described above) as long you set the concerning meta
information in .application or rather in .library properly.
 



Maximilian Weißböck wrote:
 
 I'm very sure the property files that work are not utf-8 encoded 
 but iso-8895-1 encoded. 
 
 You can use ÄÖÜß and so on with no problem in property files 
 (we do it), just be very sure they are iso-8895-1 encoded.
 
 If you use Eclipse, right click on the file, open Properties
 and look at the Text file Encoding.
 
 Max
 
 
 -Ursprüngliche Nachricht-
 Von: Sebastian Altmann [mailto:[EMAIL PROTECTED] 
 Gesendet: Dienstag, 8. Juli 2008 15:11
 An: users@tapestry.apache.org
 Betreff: Re: AW: AW: AW: Strange behavior of special characters
 
 
 Sorry but I just don't get it...
 
 After you mentioned the first time that there are problems concerning
 properties files in UTF-8 I also found this and similar articles on the
 sam
 topic.
 
 I would quietly accept this, 
 if my special characters were displayed wrong all over the application and
 in other applications too, but i can't understand why this should be a
 general Java problem even though in 99% of cases my special characters are
 displayed properly.
 
 
 
 Maximilian Weißböck wrote:
 
 The load and store methods load and store properties in a simple
 line-oriented format specified below. This format uses the ISO 8859-1
 character encoding. Characters that cannot be directly represented in
 this
 encoding can be written using Unicode escapes  ; only a single 'u'
 character is allowed in an escape sequence. The native2ascii tool can be
 used to convert property files to and from other character encodings.
 
 from http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html
 
 Max
 
 -Ursprüngliche Nachricht-
 Von: Sebastian Altmann [mailto:[EMAIL PROTECTED] 
 Gesendet: Dienstag, 8. Juli 2008 09:19
 An: users@tapestry.apache.org
 Betreff: Re: AW: AW: Strange behavior of special characters
 
 
 Yes I'm reading my values from properties files which are utf-8 encoded,
 but what really confuses me is that you tell me they aren't allowed i
 utf-8.
 
 Because we're running an application with utf-8 properties-files without
 any
 problems.
 
 This strange behavior can only be found in anatoher application. 
 
 
 
 
 Maximilian Weißböck wrote:
 
 Do you read this values from a property file?
 Property files in Java may not be utf-8 encoded.
 The have to be iso-8859-1 encoded.
 Many thanks to Sun ...
 
 Max
 
 
 -Ursprüngliche Nachricht-
 Von: Sebastian Altmann [mailto:[EMAIL PROTECTED] 
 Gesendet: Montag, 7. Juli 2008 14:54
 An: users@tapestry.apache.org
 Betreff: Re: AW: Strange behavior of special characters
 
 
 No i didn't because i am using tapestry 4.0.2 (forgot to mention this
 :-(()
 but i read similar atricles on tapestry 4.
 
 The weird thing is that my encoding basically is ok,
 and this strange things happen just under certain circumstances.
 
 Another thing that confuses me is that for example in löschen not just
 the
 ö isn't displayed correct
 but also the 3 following characters (sch).
 This happens to every string with special characters (mostly not the
 next
 3
 but the next 2 characters ).
 
 
 
 Maximilian Weißböck wrote:
 
 Did you have a look at
 http://wiki.apache.org/tapestry/Tapestry5Utf8Encoding 
 
 Max
 
 
 -Ursprüngliche Nachricht-
 Von: Sebastian Altmann [mailto:[EMAIL PROTECTED] 
 Gesendet: Montag, 7. Juli 2008 14:06
 An: users@tapestry.apache.org
 Betreff: Strange behavior of special characters
 
 
 Hi,
 
 we provide our tapestry application in two languages (german and
 english)
 which work quite fine but with one problem.
 
 The problem is, that special characters used in german (like ö, ü, ä)
 are
 displayed wrong the first time i access a page (in this case i get
 l?en
 instead of  löschen för example).
 If i do a refresh on the page or just navigate to another page all my
 special characters are displayed correct all over the application.
 
 My first suspicion was that this is some kind of browser problem, 
 because the page's sourcecode is identic before and after refresh.
 
 But my browser encoding is UTF-8 in both cases which is ok.
 By the way i tried both firefox and ie and always get the same wrong
 behavior.
 
 Another point which confuses me is that we are developping more than
 one
 tapestry application 
 and this just happens 

Re: Localization in business objects

2008-07-09 Thread Davor Hrg
injection via annotations to fields is only possible for pages,
components...

for pages and comps byte code is changed and greater flexibility is
possible,
for services that tapestry autobuilds, tapestry will use the constructor
with most parameters,

everything else you must connect your self..

...

you can inject message catalog to the page,
and then forward it to the business object before creating the report

Davor Hrg

On Wed, Jul 9, 2008 at 10:47 AM, Udo Abel [EMAIL PROTECTED] wrote:

 Hi,

 is it possible to use the Tapestry Localization (message catalog) outside
 of pages and components, e.g. in business objects creating reports?

 A simple
@Inject
private Messages messages;
 doesn't work.
 Of course Tapestry could supply messages from the main application catalog
 only, but since pages-specific catalogs are usually override existing
 application messages, that would be sufficient.

 If thats not possible we must minic the name-decoration used by tapestry to
 load the best matching properties file, or is there another approach?

 Thanks,
 Udo.


 --
 Pt! Schon vom neuen GMX MultiMessenger gehört?
 Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger

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




Re: AW: AW: AW: AW: Strange behavior of special characters

2008-07-09 Thread Davor Hrg
properties files can not be encoded other than iso1,
you should use natve2acii to convert them.

this might solve your problem

Davor Hrg

On Wed, Jul 9, 2008 at 12:12 PM, Sebastian Altmann [EMAIL PROTECTED] wrote:


 Ok seems like this won't get me anywhre.

 I just can repeat:
 All my properties filese are 100% encoded in UTF-8 (checked this in eclipse
 and in an external editor) and all umlauts are displayed properly (except
 in
 the special case described above).

 To this problem you mentioned concerning Java Properties Files and UTF-8
 encoding i just can guess, that it seems that this problem doesn't inflict
 the usage of properties inside tapestry.
 After i did a lot of testing concerning encoding both on UNIX and Windows
 machines,
 i just can say that special characters in UTF-8 are display properly
 (except
 in the special case described above) as long you set the concerning meta
 information in .application or rather in .library properly.




 Maximilian Weißböck wrote:
 
  I'm very sure the property files that work are not utf-8 encoded
  but iso-8895-1 encoded.
 
  You can use ÄÖÜß and so on with no problem in property files
  (we do it), just be very sure they are iso-8895-1 encoded.
 
  If you use Eclipse, right click on the file, open Properties
  and look at the Text file Encoding.
 
  Max
 
 
  -Ursprüngliche Nachricht-
  Von: Sebastian Altmann [mailto:[EMAIL PROTECTED]
  Gesendet: Dienstag, 8. Juli 2008 15:11
  An: users@tapestry.apache.org
  Betreff: Re: AW: AW: AW: Strange behavior of special characters
 
 
  Sorry but I just don't get it...
 
  After you mentioned the first time that there are problems concerning
  properties files in UTF-8 I also found this and similar articles on the
  sam
  topic.
 
  I would quietly accept this,
  if my special characters were displayed wrong all over the application
 and
  in other applications too, but i can't understand why this should be a
  general Java problem even though in 99% of cases my special characters
 are
  displayed properly.
 
 
 
  Maximilian Weißböck wrote:
 
  The load and store methods load and store properties in a simple
  line-oriented format specified below. This format uses the ISO 8859-1
  character encoding. Characters that cannot be directly represented in
  this
  encoding can be written using Unicode escapes  ; only a single 'u'
  character is allowed in an escape sequence. The native2ascii tool can be
  used to convert property files to and from other character encodings.
 
  from http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html
 
  Max
 
  -Ursprüngliche Nachricht-
  Von: Sebastian Altmann [mailto:[EMAIL PROTECTED]
  Gesendet: Dienstag, 8. Juli 2008 09:19
  An: users@tapestry.apache.org
  Betreff: Re: AW: AW: Strange behavior of special characters
 
 
  Yes I'm reading my values from properties files which are utf-8 encoded,
  but what really confuses me is that you tell me they aren't allowed i
  utf-8.
 
  Because we're running an application with utf-8 properties-files without
  any
  problems.
 
  This strange behavior can only be found in anatoher application.
 
 
 
 
  Maximilian Weißböck wrote:
 
  Do you read this values from a property file?
  Property files in Java may not be utf-8 encoded.
  The have to be iso-8859-1 encoded.
  Many thanks to Sun ...
 
  Max
 
 
  -Ursprüngliche Nachricht-
  Von: Sebastian Altmann [mailto:[EMAIL PROTECTED]
  Gesendet: Montag, 7. Juli 2008 14:54
  An: users@tapestry.apache.org
  Betreff: Re: AW: Strange behavior of special characters
 
 
  No i didn't because i am using tapestry 4.0.2 (forgot to mention this
  :-(()
  but i read similar atricles on tapestry 4.
 
  The weird thing is that my encoding basically is ok,
  and this strange things happen just under certain circumstances.
 
  Another thing that confuses me is that for example in löschen not
 just
  the
  ö isn't displayed correct
  but also the 3 following characters (sch).
  This happens to every string with special characters (mostly not the
  next
  3
  but the next 2 characters ).
 
 
 
  Maximilian Weißböck wrote:
 
  Did you have a look at
  http://wiki.apache.org/tapestry/Tapestry5Utf8Encoding
 
  Max
 
 
  -Ursprüngliche Nachricht-
  Von: Sebastian Altmann [mailto:[EMAIL PROTECTED]
  Gesendet: Montag, 7. Juli 2008 14:06
  An: users@tapestry.apache.org
  Betreff: Strange behavior of special characters
 
 
  Hi,
 
  we provide our tapestry application in two languages (german and
  english)
  which work quite fine but with one problem.
 
  The problem is, that special characters used in german (like ö, ü, ä)
  are
  displayed wrong the first time i access a page (in this case i get
  l?en
  instead of  löschen för example).
  If i do a refresh on the page or just navigate to another page all my
  special characters are displayed correct all over the application.
 
  My first suspicion was that this is some kind of browser problem,
  because the page's 

Re: [T5] Using Autocomplete.configure to specify an afterUpdateElement function

2008-07-09 Thread Andreas Andreou
i think there's already a jira for this

On 7/9/08, Patrick Moriarty [EMAIL PROTECTED] wrote:
 Hi,

  Although I can subclass Autocomplete and implement the configure(JSONObject)
  method to specify an afterUpdateElement, the fuction I specify (as a String
  here) gets surrounded by double-quotes by JSONObject.toString()

  Thus it is not interpreted as a function.  It would be nice if I could use
  some object, JavascriptFunction for example, which would not be quoted by
  toString().

  protected void configure(JSONObject config) {
   config.put(afterUpdateElement, function (element, selectedElement)
  {element.blur();});
  }

  results in the following script:

  new Ajax.Autocompleter(xxx, xxx:menu', '/xxx/xxx:autocomplete',
  {indicator:xxx:loader,afterUpdateElement:function (element,
  selectedElement) {element.blur();},paramName:t:input});

  Should I create a JIRA issue for this?

  Regards,

  Paudi



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



RE: [T5] Using Autocomplete.configure to specify an afterUpdateElement function

2008-07-09 Thread Joel Wiegman
There is indeed... Looks like the fix version is 5.0 though, which is
some strange holding place where defects seem to disappear to:

https://issues.apache.org/jira/browse/TAPESTRY-2234 

-Original Message-
From: Andreas Andreou [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 09, 2008 8:58 AM
To: Tapestry users
Subject: Re: [T5] Using Autocomplete.configure to specify an
afterUpdateElement function

i think there's already a jira for this

On 7/9/08, Patrick Moriarty [EMAIL PROTECTED] wrote:
 Hi,

  Although I can subclass Autocomplete and implement the 
 configure(JSONObject)  method to specify an afterUpdateElement, the 
 fuction I specify (as a String
  here) gets surrounded by double-quotes by JSONObject.toString()

  Thus it is not interpreted as a function.  It would be nice if I 
 could use  some object, JavascriptFunction for example, which would 
 not be quoted by  toString().

  protected void configure(JSONObject config) {
   config.put(afterUpdateElement, function (element, 
 selectedElement)  {element.blur();});  }

  results in the following script:

  new Ajax.Autocompleter(xxx, xxx:menu', '/xxx/xxx:autocomplete',  
 {indicator:xxx:loader,afterUpdateElement:function (element,
  selectedElement) {element.blur();},paramName:t:input});

  Should I create a JIRA issue for this?

  Regards,

  Paudi



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


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



t5: pass few parameters to 2nd page

2008-07-09 Thread t
void onActivate(String message) 
  { 
System.out.println(Another page is activated! The 
  message is:  + message); 
this.passedMessage = message; 
  } 
  String onPassivate() 
  { 
System.out.println(Another page is passivated...); 
return passedMessage; 
  } 

This is the snippet that i got from t5 book on how to pass parameter from first
page to 2nd page. if i need to pass more than 1 parameter to 2nd pages, how to
do it?




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



Re: [T5] Using Autocomplete.configure to specify an afterUpdateElement function

2008-07-09 Thread Patrick Moriarty
Sorry, guess I should have searched first.  Could consider this a bump I
suppose :)

On 09/07/2008, Joel Wiegman [EMAIL PROTECTED] wrote:

 There is indeed... Looks like the fix version is 5.0 though, which is
 some strange holding place where defects seem to disappear to:

 https://issues.apache.org/jira/browse/TAPESTRY-2234


 -Original Message-
 From: Andreas Andreou [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 09, 2008 8:58 AM
 To: Tapestry users
 Subject: Re: [T5] Using Autocomplete.configure to specify an
 afterUpdateElement function

 i think there's already a jira for this

 On 7/9/08, Patrick Moriarty [EMAIL PROTECTED] wrote:
  Hi,
 
   Although I can subclass Autocomplete and implement the
  configure(JSONObject)  method to specify an afterUpdateElement, the
  fuction I specify (as a String
   here) gets surrounded by double-quotes by JSONObject.toString()
 
   Thus it is not interpreted as a function.  It would be nice if I
  could use  some object, JavascriptFunction for example, which would
  not be quoted by  toString().
 
   protected void configure(JSONObject config) {
config.put(afterUpdateElement, function (element,
  selectedElement)  {element.blur();});  }
 
   results in the following script:
 
   new Ajax.Autocompleter(xxx, xxx:menu', '/xxx/xxx:autocomplete',
  {indicator:xxx:loader,afterUpdateElement:function (element,
   selectedElement) {element.blur();},paramName:t:input});
 
   Should I create a JIRA issue for this?
 
   Regards,
 
   Paudi
 


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


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




[T5] Rendering a block a component received as parameter

2008-07-09 Thread Tobias Wehrum

Hi there,

I am developing a tree component which can take several classes as 
nodes. Each class should have it's own body, stored in parameters - and 
then rendered, of course.


Now, lets say I have I have this code in my Test.tml:

--
t:ExTree t:id=taskTree source=treeNodes currentNode=currentTreeNode
   t:parameter name=taskClassContent
   t:pagelink t:page=Task 
context=${ognl:currentTreeNode.id}${ognl:currentTreeNode.title}/t:pagelink

   /t:parameter
   t:parameter name=projectClassContent
   t:pagelink t:page=Project 
context=${ognl:currentTreeNode.id}${ognl:currentTreeNode.projectName}/t:pagelink

   /t:parameter
/t:ExTree
--

As you can see, taskClassContent and projectClassContent are Block elements.

Now how can I render this Block element in my ExTree component? By the 
way, ExTree hasn't a template, just a class.


Hope that someone can help me,
Tobias

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



Re: t5: pass few parameters to 2nd page

2008-07-09 Thread Ted Steen
Just add more parameters to the activate/passivate-methods.
Or you can use (Object[] parameters).
Or you can use (EventContext context)

The way to go for you would be to just add more parameters to the
activate/passivate-methods.

2008/7/9 t [EMAIL PROTECTED]:
 void onActivate(String message)
  {
System.out.println(Another page is activated! The
  message is:  + message);
this.passedMessage = message;
  }
  String onPassivate()
  {
System.out.println(Another page is passivated...);
return passedMessage;
  }

 This is the snippet that i got from t5 book on how to pass parameter from 
 first
 page to 2nd page. if i need to pass more than 1 parameter to 2nd pages, how to
 do it?




 -
 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] Layout and $remove$

2008-07-09 Thread Fabio Kreusch
Thanks, that's what I needed!

2008/7/8 Onno Scheffers [EMAIL PROTECTED]:

 Hi Fabio,

 it looks like you're looking for the same thing I was looking for a while
 ago.

 http://www.nabble.com/Re-%3A-Re-%3A-T5%3A-Layout-question-tc16448904.html#a16448904

 Look for Peters' responses in that Thread. He really helped me out.

 regards,

 Onno Scheffers



 2008/7/8 Fabio Kreusch [EMAIL PROTECTED]:

  Hello all,
 
  I'm new to Tapestry 5, and I'm having some problems:
 
  In T4, the Shell component creates the outer layout. When I insert a
  shell  component in my pages, it ignores the page htmlhead etc and
 only
  renderizes
  the body, and renderizes the shell htmlhead.
 
 On T5, with the t:layout, it renders both, the layout htmlhead
 and
  the page htmlhead.
 How can I make it render only the layout htmlhead?
 
 And how can I make so that it don't render something, like the
 $remove$
  tag on T4?
 
  The tutorials I found about T5 shows examples with layout this way:
 
  On the layout page, it goes the shell:
 
  html
   head
etc
 
  On the page, just the body content, like:
 
  t:layout xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd
 
  ${hello}
  /t:layout
 
  But if I do this way, when I open the page on a web browser it doesn't
  recognize it
  as a html page. I have tried adding a
 
  meta http-equiv=Content-Type content=text/html; charset=UTF-8/
 
  It works for a preview, but when I run tapestry it throws this exception:
  Failure parsing template context:Start.tml: The markup in the document
  following the root element must be well-formed.
 
  How are you doing to preview the pages?
 
  Thanks.
 
 
  --
  Fabio Kreusch
  [EMAIL PROTECTED]
 




-- 
Fabio Kreusch
[EMAIL PROTECTED]


[T5] Login session

2008-07-09 Thread Fabio Kreusch
Hello all again.

I can't find any examples on how can I store a user session login on T5.
Does anyone know how can I do it? And how can I protect pages so that only
logged users can see it?

Thanks.

-- 
Fabio Kreusch
[EMAIL PROTECTED]


T5: getting current hibernate session (per-thread) from singleton-service

2008-07-09 Thread Britske

I found some partial references on the list, but nothing that really answered
the question, so: 
How can I get the current (per-thread) hibernate-session (as configured
through tapestry-hibernate) from a singleton custom tapestry service?

For reference:
I have a MySingleton-class build as a tapestry service.
MySingleton.getSingleton().getCurrentSession() should give me the current
session (thread-bound) as managed by tapestry-hibernate. 
This would enable me to access the current session from any class (not just
components or tapestry services)


I tried 3 methods, 2 of which don't work, and 1 I'm not certain 

Method 1: 
build the MySingleton-class and inject Session at constructortime. 

Problem:  the hibernate session that is created on constructor-time stays
assoaciated with MySingleton  (correct?). So this doesn't give a
session-per-thread.


Method 2:
build the MySingleton-class and inject HibernateSessionSource 
getCurrentSession(){
   return hibernateSessionSource.getSessionFactory().getCurrentSession();
}

Problem: 

but this gives error: 
org.hibernate.HibernateException: No CurrentSessionContext configured!
I think this happens because the way the session is accessed bypasses the
tapestry-hibernate session-in-view filter (HibernateSessionManager) which
takes care of providing the context. 

Is there any way to make getSessionFactory() aware of the
HibernateSessionManager? So the above works?


Method 3: 
build the MySingleton-class and inject ProperyShadowBuilder  and
HibernateSessionManager 

I figured this calling hibernateSessionManager.getSession() would give me
the needed context (which lacked from method 2) . The problem is that
HibernateSessionManager is not a singleton either. 
I thought this could be bypassed by doing :

getCurrentSession(){
return shadowBuilder.build(hibernateSessionManager, session,
Session.class); 
}

However this still doens't ensure (I think) that hibernateSessionManager
belongs to the current thread. 


Can anyone shed some light on this? I would highly appreciate it!
Cheers, 
britske


-- 
View this message in context: 
http://www.nabble.com/T5%3A-getting-current-hibernate-session-%28per-thread%29-from-singleton-service-tp18365296p18365296.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]



T5: Different behavior of Palette Component in FireFox, Safari and IE

2008-07-09 Thread Maximilian Weißböck
Palette Component behaves different in FireFox then it does in Safari and IE

 

If  palette item is moved in FireFox the following events are triggered

  

  onSuccess()

  onSubmit()

 

If  palette item is moved in Safari or IE none of the above events is triggered.

 

Is this suggested to be a bug? Then I would file a Jira Issue.

Tested with FF 3.0, Safari 3.1 and IE 6 (all on Windows)

 

Regards, Max

 



Re: [T5] Login session

2008-07-09 Thread Marcus
Hi Fabio,

I can't find any examples on how can I store a user session login on T5.


http://tapestry.apache.org/tapestry5/tapestry-core/guide/appstate.html



 And how can I protect pages so that only
 logged users can see it?


http://wiki.apache.org/tapestry/Tapestry5HowToCreateADispatcher
http://wiki.apache.org/tapestry/Tapestry5HowToCreateADispatcher2

Marcus


Re: [T5] Rendering a block a component received as parameter

2008-07-09 Thread Josh Canfield
I don't recall if you can use MarkupWriter to write blocks yet, but one
method I've used is to return the block from the beginRender method, it's
rendered after whatever you write within the method. I believe for both
blocks you would have to use both beginRender and beforeRenderTemplate, or I
suppose you could loop from the beginRender method.

If you want to wrap your blocks in an element you would start it in
beginRender and finish it in afterRender...

In the case you've laid out though, it might be easier to just create a
template.

Josh
On Wed, Jul 9, 2008 at 8:56 AM, Tobias Wehrum [EMAIL PROTECTED] wrote:

 Hi there,

 I am developing a tree component which can take several classes as nodes.
 Each class should have it's own body, stored in parameters - and then
 rendered, of course.

 Now, lets say I have I have this code in my Test.tml:

 --
 t:ExTree t:id=taskTree source=treeNodes currentNode=currentTreeNode
   t:parameter name=taskClassContent
   t:pagelink t:page=Task
 context=${ognl:currentTreeNode.id}${ognl:currentTreeNode.title}/t:pagelink
   /t:parameter
   t:parameter name=projectClassContent
   t:pagelink t:page=Project
 context=${ognl:currentTreeNode.id}${ognl:currentTreeNode.projectName}/t:pagelink
   /t:parameter
 /t:ExTree
 --

 As you can see, taskClassContent and projectClassContent are Block
 elements.

 Now how can I render this Block element in my ExTree component? By the way,
 ExTree hasn't a template, just a class.

 Hope that someone can help me,
 Tobias

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




-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.


Re: t5: pass few parameters to 2nd page

2008-07-09 Thread Francisco Manzano
Or, you can use the new @PageActivationContext  annotation for a greater 
simplicity


Zanius

Ted Steen wrote:

Just add more parameters to the activate/passivate-methods.
Or you can use (Object[] parameters).
Or you can use (EventContext context)

The way to go for you would be to just add more parameters to the
activate/passivate-methods.

2008/7/9 t [EMAIL PROTECTED]:
  

void onActivate(String message)
 {
   System.out.println(Another page is activated! The
 message is:  + message);
   this.passedMessage = message;
 }
 String onPassivate()
 {
   System.out.println(Another page is passivated...);
   return passedMessage;
 }

This is the snippet that i got from t5 book on how to pass parameter from first
page to 2nd page. if i need to pass more than 1 parameter to 2nd pages, how to
do it?




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



  



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



[T5] : in place Grid does not sort when rendering a checkbox in a column

2008-07-09 Thread Hugues Narjoux
Hi,

I have  an inplace grid, enclosed in a form, and which renders a checkbox
for a boolean attribute. (The code is at the end of this mail).

My problem is that the grid refuses to sort its columns
If I remove the rendering of the check box and just display the boolean
value, sorting works fine
If I set my grid to inplace:false, sorting works fine also

After debugging it seems that the gridDataSource.getRowValue(i) is called
just once for i=0, and not for the rest of the rows.

Does anyone have the same issue ? Am I missing something ?

Thanks,
Hugues

*Code :*
t:form
t:grid t:source=gridDataSource rowsPerPage=10 row=myItem
pagerposition=bottom exclude=Id inPlace=literal:true
reorder=selected, name, desc
t:parameter name=selectedCell
t:checkbox t:value=myItem.selected /
/t:parameter
/t:grid
t:submit t:id=testSubmit value=test /
/t:form


Re: t5: pass few parameters to 2nd page

2008-07-09 Thread Ted Steen
I dont think you can use that with multiple values as the context :/

2008/7/9 Francisco Manzano [EMAIL PROTECTED]:
 Or, you can use the new @PageActivationContext  annotation for a greater
 simplicity

 Zanius

 Ted Steen wrote:

 Just add more parameters to the activate/passivate-methods.
 Or you can use (Object[] parameters).
 Or you can use (EventContext context)

 The way to go for you would be to just add more parameters to the
 activate/passivate-methods.

 2008/7/9 t [EMAIL PROTECTED]:


 void onActivate(String message)
  {
   System.out.println(Another page is activated! The
 message is:  + message);
   this.passedMessage = message;
  }
  String onPassivate()
  {
   System.out.println(Another page is passivated...);
   return passedMessage;
  }

 This is the snippet that i got from t5 book on how to pass parameter from
 first
 page to 2nd page. if i need to pass more than 1 parameter to 2nd pages,
 how to
 do it?




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






 -
 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: getting current hibernate session (per-thread) from singleton-service

2008-07-09 Thread Josh Canfield

 How can I get the current (per-thread) hibernate-session (as configured
 through tapestry-hibernate) from a singleton custom tapestry service?


I haven't tried creating a getInstance type method for my service classes,
but here is my understanding. The default scope for a service is singleton.
When your service is auto built by Tapestry the parameters to the
constructor are proxies to the actual implementation. When your singleton
service has a dependancy on a perthread service the proxy gives you the
correct object for the current thread. For instance, all of my DAO classes
are registered as a service receiving the Session. Sessions are opened and
closed with the request, so if you're trying to access it outside of the
request you'd be in trouble.

Josh

On Wed, Jul 9, 2008 at 9:27 AM, Britske [EMAIL PROTECTED] wrote:


 I found some partial references on the list, but nothing that really
 answered
 the question, so:
 How can I get the current (per-thread) hibernate-session (as configured
 through tapestry-hibernate) from a singleton custom tapestry service?

 For reference:
 I have a MySingleton-class build as a tapestry service.
 MySingleton.getSingleton().getCurrentSession() should give me the current
 session (thread-bound) as managed by tapestry-hibernate.
 This would enable me to access the current session from any class (not just
 components or tapestry services)


 I tried 3 methods, 2 of which don't work, and 1 I'm not certain

 Method 1:
 build the MySingleton-class and inject Session at constructortime.

 Problem:  the hibernate session that is created on constructor-time stays
 assoaciated with MySingleton  (correct?). So this doesn't give a
 session-per-thread.


 Method 2:
 build the MySingleton-class and inject HibernateSessionSource
 getCurrentSession(){
   return hibernateSessionSource.getSessionFactory().getCurrentSession();
 }

 Problem:

 but this gives error:
 org.hibernate.HibernateException: No CurrentSessionContext configured!
 I think this happens because the way the session is accessed bypasses the
 tapestry-hibernate session-in-view filter (HibernateSessionManager) which
 takes care of providing the context.

 Is there any way to make getSessionFactory() aware of the
 HibernateSessionManager? So the above works?


 Method 3:
 build the MySingleton-class and inject ProperyShadowBuilder  and
 HibernateSessionManager

 I figured this calling hibernateSessionManager.getSession() would give me
 the needed context (which lacked from method 2) . The problem is that
 HibernateSessionManager is not a singleton either.
 I thought this could be bypassed by doing :

 getCurrentSession(){
 return shadowBuilder.build(hibernateSessionManager, session,
 Session.class);
 }

 However this still doens't ensure (I think) that hibernateSessionManager
 belongs to the current thread.


 Can anyone shed some light on this? I would highly appreciate it!
 Cheers,
 britske


 --
 View this message in context:
 http://www.nabble.com/T5%3A-getting-current-hibernate-session-%28per-thread%29-from-singleton-service-tp18365296p18365296.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]




-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.


Re: T5: getting current hibernate session (per-thread) from singleton-service

2008-07-09 Thread Howard Lewis Ship
If you are using tapestry-hibernate, the injectable Session service is
a perthread proxy.  It can be shared across threads, but each method
invocation on the proxy is redirected to a real per-thread Hibernate
session.

On Wed, Jul 9, 2008 at 9:27 AM, Britske [EMAIL PROTECTED] wrote:

 I found some partial references on the list, but nothing that really answered
 the question, so:
 How can I get the current (per-thread) hibernate-session (as configured
 through tapestry-hibernate) from a singleton custom tapestry service?

 For reference:
 I have a MySingleton-class build as a tapestry service.
 MySingleton.getSingleton().getCurrentSession() should give me the current
 session (thread-bound) as managed by tapestry-hibernate.
 This would enable me to access the current session from any class (not just
 components or tapestry services)


 I tried 3 methods, 2 of which don't work, and 1 I'm not certain

 Method 1:
 build the MySingleton-class and inject Session at constructortime.

 Problem:  the hibernate session that is created on constructor-time stays
 assoaciated with MySingleton  (correct?). So this doesn't give a
 session-per-thread.


 Method 2:
 build the MySingleton-class and inject HibernateSessionSource
 getCurrentSession(){
   return hibernateSessionSource.getSessionFactory().getCurrentSession();
 }

 Problem:

 but this gives error:
 org.hibernate.HibernateException: No CurrentSessionContext configured!
 I think this happens because the way the session is accessed bypasses the
 tapestry-hibernate session-in-view filter (HibernateSessionManager) which
 takes care of providing the context.

 Is there any way to make getSessionFactory() aware of the
 HibernateSessionManager? So the above works?


 Method 3:
 build the MySingleton-class and inject ProperyShadowBuilder  and
 HibernateSessionManager

 I figured this calling hibernateSessionManager.getSession() would give me
 the needed context (which lacked from method 2) . The problem is that
 HibernateSessionManager is not a singleton either.
 I thought this could be bypassed by doing :

 getCurrentSession(){
 return shadowBuilder.build(hibernateSessionManager, session,
 Session.class);
 }

 However this still doens't ensure (I think) that hibernateSessionManager
 belongs to the current thread.


 Can anyone shed some light on this? I would highly appreciate it!
 Cheers,
 britske


 --
 View this message in context: 
 http://www.nabble.com/T5%3A-getting-current-hibernate-session-%28per-thread%29-from-singleton-service-tp18365296p18365296.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: t5: pass few parameters to 2nd page

2008-07-09 Thread Josh Canfield

 Or, you can use the new @PageActivationContext  annotation for a greater
 simplicity

http://tapestry.formos.com/nightly/tapestry5/apidocs/src-html/org/apache/tapestry5/internal/transform/PageActivationContextWorker.html#line.37

037if (fields.size()  1)
038throw new
RuntimeException(TransformMessages.illegalNumberOfPageActivationContextHandlers(fields));

That's only good for one field.

Josh

On Wed, Jul 9, 2008 at 10:10 AM, Francisco Manzano 
[EMAIL PROTECTED] wrote:

 Or, you can use the new @PageActivationContext  annotation for a greater
 simplicity

 Zanius


 Ted Steen wrote:

 Just add more parameters to the activate/passivate-methods.
 Or you can use (Object[] parameters).
 Or you can use (EventContext context)

 The way to go for you would be to just add more parameters to the
 activate/passivate-methods.

 2008/7/9 t [EMAIL PROTECTED]:


 void onActivate(String message)
  {
   System.out.println(Another page is activated! The
 message is:  + message);
   this.passedMessage = message;
  }
  String onPassivate()
  {
   System.out.println(Another page is passivated...);
   return passedMessage;
  }

 This is the snippet that i got from t5 book on how to pass parameter from
 first
 page to 2nd page. if i need to pass more than 1 parameter to 2nd pages,
 how to
 do it?




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







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




-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.


Re: t5: pass few parameters to 2nd page

2008-07-09 Thread Francisco Manzano

why don't ?

Ted Steen wrote:

I dont think you can use that with multiple values as the context :/

2008/7/9 Francisco Manzano [EMAIL PROTECTED]:
  

Or, you can use the new @PageActivationContext  annotation for a greater
simplicity

Zanius

Ted Steen wrote:


Just add more parameters to the activate/passivate-methods.
Or you can use (Object[] parameters).
Or you can use (EventContext context)

The way to go for you would be to just add more parameters to the
activate/passivate-methods.

2008/7/9 t [EMAIL PROTECTED]:

  

void onActivate(String message)
 {
  System.out.println(Another page is activated! The
message is:  + message);
  this.passedMessage = message;
 }
 String onPassivate()
 {
  System.out.println(Another page is passivated...);
  return passedMessage;
 }

This is the snippet that i got from t5 book on how to pass parameter from
first
page to 2nd page. if i need to pass more than 1 parameter to 2nd pages,
how to
do it?




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




  

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



  



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



Re: t5: pass few parameters to 2nd page

2008-07-09 Thread Ted Steen
At the moment you should think of the @PageActivationContext as a
convenience annotation for you to use when you only want to place a
single value in the context. Personally I think it would make more
sense if you where able to use it for multiple values.

Maybe worth adding a JIRA for that?
For example, when multiple values are annotated they are added to the
context in alphabetical order.

2008/7/9 Francisco Manzano [EMAIL PROTECTED]:
 why don't ?

 Ted Steen wrote:

 I dont think you can use that with multiple values as the context :/

 2008/7/9 Francisco Manzano [EMAIL PROTECTED]:


 Or, you can use the new @PageActivationContext  annotation for a greater
 simplicity

 Zanius

 Ted Steen wrote:


 Just add more parameters to the activate/passivate-methods.
 Or you can use (Object[] parameters).
 Or you can use (EventContext context)

 The way to go for you would be to just add more parameters to the
 activate/passivate-methods.

 2008/7/9 t [EMAIL PROTECTED]:



 void onActivate(String message)
  {
  System.out.println(Another page is activated! The
message is:  + message);
  this.passedMessage = message;
  }
  String onPassivate()
  {
  System.out.println(Another page is passivated...);
  return passedMessage;
  }

 This is the snippet that i got from t5 book on how to pass parameter
 from
 first
 page to 2nd page. if i need to pass more than 1 parameter to 2nd pages,
 how to
 do it?




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






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






 -
 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: pass few parameters to 2nd page

2008-07-09 Thread Marcelo Lotif
IMHO, this is not the easyest approach

I prefer to inject the next page, set it's attributes and then pass it
as the method's return... this way you can set as many parameters as
you like

On Wed, Jul 9, 2008 at 2:29 PM, Francisco Manzano
[EMAIL PROTECTED] wrote:
 why don't ?

 Ted Steen wrote:

 I dont think you can use that with multiple values as the context :/

 2008/7/9 Francisco Manzano [EMAIL PROTECTED]:


 Or, you can use the new @PageActivationContext  annotation for a greater
 simplicity

 Zanius

 Ted Steen wrote:


 Just add more parameters to the activate/passivate-methods.
 Or you can use (Object[] parameters).
 Or you can use (EventContext context)

 The way to go for you would be to just add more parameters to the
 activate/passivate-methods.

 2008/7/9 t [EMAIL PROTECTED]:



 void onActivate(String message)
  {
  System.out.println(Another page is activated! The
message is:  + message);
  this.passedMessage = message;
  }
  String onPassivate()
  {
  System.out.println(Another page is passivated...);
  return passedMessage;
  }

 This is the snippet that i got from t5 book on how to pass parameter
 from
 first
 page to 2nd page. if i need to pass more than 1 parameter to 2nd pages,
 how to
 do it?




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






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






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





-- 
Atenciosamente,

Marcelo Lotif
Programador Java e Tapestry
FIEC - Federação das Indústrias do Estado do Ceará
(85) 3477-5910

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



Re: T5: getting current hibernate session (per-thread) from singleton-service

2008-07-09 Thread Britske

Wow I love that. Somehow I mistakenly thought it didn't work that way,
thanks. 
 
As a related question :
is there a way to get the 'real' session instead of the proxy on a call to 
getSession()

The reason I'm asking is that in a lot of cases I want to use (Hibernate's)
DetachedCriteria's, so I can make a criteria, pass that as a parameter to a
repository and let the repository get the current session and create a real
criteria. (For reasons of seperation)

This is done through detachedCriteria.getExecutableCriteria(getSession());

However this always gives a classCastException, like: 
java.lang.ClassCastException: $Session_11b08fbaf1e cannot be cast to
org.hibernate.engine.SessionImplementor.

for a related post (similar problem) see:
http://www.nabble.com/Hivemind-creates-proxy-Hibernate-Session-td9845916.html

Therefore I need the 'real' object. 
diong getSession().getSessionFactory().getCurrentSession() would solve my
problem, since that would be both the session of the current thread and the
real object, but (as described in method 2 of my post) the context assigned
to be tapestry-hibernate isn't there when accessing the session in this way.

Any suggestions on how to solve this as well? Much apreciated!






Howard Lewis Ship wrote:
 
 If you are using tapestry-hibernate, the injectable Session service is
 a perthread proxy.  It can be shared across threads, but each method
 invocation on the proxy is redirected to a real per-thread Hibernate
 session.
 
 On Wed, Jul 9, 2008 at 9:27 AM, Britske [EMAIL PROTECTED] wrote:

 I found some partial references on the list, but nothing that really
 answered
 the question, so:
 How can I get the current (per-thread) hibernate-session (as configured
 through tapestry-hibernate) from a singleton custom tapestry service?

 For reference:
 I have a MySingleton-class build as a tapestry service.
 MySingleton.getSingleton().getCurrentSession() should give me the current
 session (thread-bound) as managed by tapestry-hibernate.
 This would enable me to access the current session from any class (not
 just
 components or tapestry services)


 I tried 3 methods, 2 of which don't work, and 1 I'm not certain

 Method 1:
 build the MySingleton-class and inject Session at constructortime.

 Problem:  the hibernate session that is created on constructor-time stays
 assoaciated with MySingleton  (correct?). So this doesn't give a
 session-per-thread.


 Method 2:
 build the MySingleton-class and inject HibernateSessionSource
 getCurrentSession(){
   return hibernateSessionSource.getSessionFactory().getCurrentSession();
 }

 Problem:

 but this gives error:
 org.hibernate.HibernateException: No CurrentSessionContext configured!
 I think this happens because the way the session is accessed bypasses the
 tapestry-hibernate session-in-view filter (HibernateSessionManager) which
 takes care of providing the context.

 Is there any way to make getSessionFactory() aware of the
 HibernateSessionManager? So the above works?


 Method 3:
 build the MySingleton-class and inject ProperyShadowBuilder  and
 HibernateSessionManager

 I figured this calling hibernateSessionManager.getSession() would give me
 the needed context (which lacked from method 2) . The problem is that
 HibernateSessionManager is not a singleton either.
 I thought this could be bypassed by doing :

 getCurrentSession(){
 return shadowBuilder.build(hibernateSessionManager, session,
 Session.class);
 }

 However this still doens't ensure (I think) that hibernateSessionManager
 belongs to the current thread.


 Can anyone shed some light on this? I would highly appreciate it!
 Cheers,
 britske


 --
 View this message in context:
 http://www.nabble.com/T5%3A-getting-current-hibernate-session-%28per-thread%29-from-singleton-service-tp18365296p18365296.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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-getting-current-hibernate-session-%28per-thread%29-from-singleton-service-tp18365296p18367496.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: t5: pass few parameters to 2nd page

2008-07-09 Thread Francisco Manzano
I thought that its main contribution to be able to use it for multiple 
values,

and not yet I understand why this functionality has not been implemented.
So, I agree for jira.


Ted Steen wrote:

At the moment you should think of the @PageActivationContext as a
convenience annotation for you to use when you only want to place a
single value in the context. Personally I think it would make more
sense if you where able to use it for multiple values.

Maybe worth adding a JIRA for that?
For example, when multiple values are annotated they are added to the
context in alphabetical order.

2008/7/9 Francisco Manzano [EMAIL PROTECTED]:
  

why don't ?

Ted Steen wrote:


I dont think you can use that with multiple values as the context :/

2008/7/9 Francisco Manzano [EMAIL PROTECTED]:

  

Or, you can use the new @PageActivationContext  annotation for a greater
simplicity

Zanius

Ted Steen wrote:



Just add more parameters to the activate/passivate-methods.
Or you can use (Object[] parameters).
Or you can use (EventContext context)

The way to go for you would be to just add more parameters to the
activate/passivate-methods.

2008/7/9 t [EMAIL PROTECTED]:


  

void onActivate(String message)
 {
 System.out.println(Another page is activated! The
   message is:  + message);
 this.passedMessage = message;
 }
 String onPassivate()
 {
 System.out.println(Another page is passivated...);
 return passedMessage;
 }

This is the snippet that i got from t5 book on how to pass parameter
from
first
page to 2nd page. if i need to pass more than 1 parameter to 2nd pages,
how to
do it?




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





  

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




  

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



  



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



Re: [T5] Layout and $remove$

2008-07-09 Thread Fabio Kreusch
Just one thing if anyone try this again:

I had to add a xmlns, otherway it doesn't uses the Border component:

t:type=Layout xmlns:t=
 http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;


Did it worked for you without the xmlns?

2008/7/9 Fabio Kreusch [EMAIL PROTECTED]:

 Thanks, that's what I needed!

 2008/7/8 Onno Scheffers [EMAIL PROTECTED]:

 Hi Fabio,

 it looks like you're looking for the same thing I was looking for a while
 ago.

 http://www.nabble.com/Re-%3A-Re-%3A-T5%3A-Layout-question-tc16448904.html#a16448904

 Look for Peters' responses in that Thread. He really helped me out.

 regards,

 Onno Scheffers



 2008/7/8 Fabio Kreusch [EMAIL PROTECTED]:

  Hello all,
 
  I'm new to Tapestry 5, and I'm having some problems:
 
  In T4, the Shell component creates the outer layout. When I insert a
  shell  component in my pages, it ignores the page htmlhead etc and
 only
  renderizes
  the body, and renderizes the shell htmlhead.
 
 On T5, with the t:layout, it renders both, the layout htmlhead
 and
  the page htmlhead.
 How can I make it render only the layout htmlhead?
 
 And how can I make so that it don't render something, like the
 $remove$
  tag on T4?
 
  The tutorials I found about T5 shows examples with layout this way:
 
  On the layout page, it goes the shell:
 
  html
   head
etc
 
  On the page, just the body content, like:
 
  t:layout xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd
 
  ${hello}
  /t:layout
 
  But if I do this way, when I open the page on a web browser it doesn't
  recognize it
  as a html page. I have tried adding a
 
  meta http-equiv=Content-Type content=text/html; charset=UTF-8/
 
  It works for a preview, but when I run tapestry it throws this
 exception:
  Failure parsing template context:Start.tml: The markup in the document
  following the root element must be well-formed.
 
  How are you doing to preview the pages?
 
  Thanks.
 
 
  --
  Fabio Kreusch
  [EMAIL PROTECTED]
 




 --
 Fabio Kreusch
 [EMAIL PROTECTED]




-- 
Fabio Kreusch
[EMAIL PROTECTED]


Re: [T5] Rendering a block a component received as parameter

2008-07-09 Thread Howard Lewis Ship
Another option is to use the Delegate component and pass it the Block instance.

On Wed, Jul 9, 2008 at 9:59 AM, Josh Canfield [EMAIL PROTECTED] wrote:
 I don't recall if you can use MarkupWriter to write blocks yet, but one
 method I've used is to return the block from the beginRender method, it's
 rendered after whatever you write within the method. I believe for both
 blocks you would have to use both beginRender and beforeRenderTemplate, or I
 suppose you could loop from the beginRender method.

 If you want to wrap your blocks in an element you would start it in
 beginRender and finish it in afterRender...

 In the case you've laid out though, it might be easier to just create a
 template.

 Josh
 On Wed, Jul 9, 2008 at 8:56 AM, Tobias Wehrum [EMAIL PROTECTED] wrote:

 Hi there,

 I am developing a tree component which can take several classes as nodes.
 Each class should have it's own body, stored in parameters - and then
 rendered, of course.

 Now, lets say I have I have this code in my Test.tml:

 --
 t:ExTree t:id=taskTree source=treeNodes currentNode=currentTreeNode
   t:parameter name=taskClassContent
   t:pagelink t:page=Task
 context=${ognl:currentTreeNode.id}${ognl:currentTreeNode.title}/t:pagelink
   /t:parameter
   t:parameter name=projectClassContent
   t:pagelink t:page=Project
 context=${ognl:currentTreeNode.id}${ognl:currentTreeNode.projectName}/t:pagelink
   /t:parameter
 /t:ExTree
 --

 As you can see, taskClassContent and projectClassContent are Block
 elements.

 Now how can I render this Block element in my ExTree component? By the way,
 ExTree hasn't a template, just a class.

 Hope that someone can help me,
 Tobias

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




 --
 --
 TheDailyTube.com. Sign up and get the best new videos on the internet
 delivered fresh to your inbox.




-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Re: [T5] Rendering a block a component received as parameter

2008-07-09 Thread Josh Canfield
But you can't use a delegate component without a template, right?

On Wed, Jul 9, 2008 at 12:15 PM, Howard Lewis Ship [EMAIL PROTECTED] wrote:

 Another option is to use the Delegate component and pass it the Block
 instance.

 On Wed, Jul 9, 2008 at 9:59 AM, Josh Canfield [EMAIL PROTECTED]
 wrote:
  I don't recall if you can use MarkupWriter to write blocks yet, but one
  method I've used is to return the block from the beginRender method, it's
  rendered after whatever you write within the method. I believe for both
  blocks you would have to use both beginRender and beforeRenderTemplate,
 or I
  suppose you could loop from the beginRender method.
 
  If you want to wrap your blocks in an element you would start it in
  beginRender and finish it in afterRender...
 
  In the case you've laid out though, it might be easier to just create a
  template.
 
  Josh
  On Wed, Jul 9, 2008 at 8:56 AM, Tobias Wehrum [EMAIL PROTECTED]
 wrote:
 
  Hi there,
 
  I am developing a tree component which can take several classes as
 nodes.
  Each class should have it's own body, stored in parameters - and then
  rendered, of course.
 
  Now, lets say I have I have this code in my Test.tml:
 
 
 --
  t:ExTree t:id=taskTree source=treeNodes
 currentNode=currentTreeNode
t:parameter name=taskClassContent
t:pagelink t:page=Task
 
 context=${ognl:currentTreeNode.id}${ognl:currentTreeNode.title}/t:pagelink
/t:parameter
t:parameter name=projectClassContent
t:pagelink t:page=Project
 
 context=${ognl:currentTreeNode.id}${ognl:currentTreeNode.projectName}/t:pagelink
/t:parameter
  /t:ExTree
 
 --
 
  As you can see, taskClassContent and projectClassContent are Block
  elements.
 
  Now how can I render this Block element in my ExTree component? By the
 way,
  ExTree hasn't a template, just a class.
 
  Hope that someone can help me,
  Tobias
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  --
  --
  TheDailyTube.com. Sign up and get the best new videos on the internet
  delivered fresh to your inbox.
 



 --
 Howard M. Lewis Ship

 Creator Apache Tapestry and Apache HiveMind

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




-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.


Re: t5: pass few parameters to 2nd page

2008-07-09 Thread Igor Drobiazko
I see a problem with multiple @PageActivationContext annotations inside a
page class.
Consider following example:

public class Start{
   @PageActivationContext
   private Foo b;

   @PageActivationContext
   private Bar a;
}

When Eclipse Sort Member Save Action feature is enabled, the order of
members a and b will change. The class will look like:

public class Start{
   @PageActivationContext
   private Bar a;

   @PageActivationContext
   private Foo b;
}

In this case the order of the parameters of the generated onActivate handler
conflicts with the order of the values of the ActionLink's context
parameter specified in the template.


On Wed, Jul 9, 2008 at 8:07 PM, Francisco Manzano 
[EMAIL PROTECTED] wrote:

 I thought that its main contribution to be able to use it for multiple
 values,
 and not yet I understand why this functionality has not been implemented.
 So, I agree for jira.



 Ted Steen wrote:

 At the moment you should think of the @PageActivationContext as a
 convenience annotation for you to use when you only want to place a
 single value in the context. Personally I think it would make more
 sense if you where able to use it for multiple values.

 Maybe worth adding a JIRA for that?
 For example, when multiple values are annotated they are added to the
 context in alphabetical order.

 2008/7/9 Francisco Manzano [EMAIL PROTECTED]:


 why don't ?

 Ted Steen wrote:


 I dont think you can use that with multiple values as the context :/

 2008/7/9 Francisco Manzano [EMAIL PROTECTED]:



 Or, you can use the new @PageActivationContext  annotation for a
 greater
 simplicity

 Zanius

 Ted Steen wrote:



 Just add more parameters to the activate/passivate-methods.
 Or you can use (Object[] parameters).
 Or you can use (EventContext context)

 The way to go for you would be to just add more parameters to the
 activate/passivate-methods.

 2008/7/9 t [EMAIL PROTECTED]:




 void onActivate(String message)
  {
  System.out.println(Another page is activated! The
   message is:  + message);
  this.passedMessage = message;
  }
  String onPassivate()
  {
  System.out.println(Another page is passivated...);
  return passedMessage;
  }

 This is the snippet that i got from t5 book on how to pass parameter
 from
 first
 page to 2nd page. if i need to pass more than 1 parameter to 2nd
 pages,
 how to
 do it?




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







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






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







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




-- 
Best regards,

Igor Drobiazko


T5: java.util.ConcurrentModificationException

2008-07-09 Thread Martijn Brinkers
On one page I use a persistent Hashmap. The page contains an actionLink
with a click event handler. The onclick event is activated with a delay
using setTimeout. When the event is fired another actionLink is
activated. Now what happens is that during the handling of the first
actionLink the second actionLink is activated and this results in a
ConcurrentModificationException on the Hashmap. I can solve it by using
a multithread safe Hashmap but I want to understand under what
circumstances you need to be carefull for multi threaded activation
(with Tapestry 5 that is). Should a Persisted variable always be
multithread safe?  I think so but what other Tapestry related items
should be multithread safe as well?

Martijn

Stack trace:

java.util.ConcurrentModificationException
Stack trace
  * java.util.HashMap
$HashIterator.nextEntry(HashMap.java:793)
  * java.util.HashMap$KeyIterator.next(HashMap.java:828)
  * 
mitm.mimesecure.web.components.CertificateStoreGrid.downloadSelected(CertificateStoreGrid.java:76)
  * 
mitm.mimesecure.web.components.CertificateStoreGrid.dispatchComponentEvent(CertificateStoreGrid.java)
  * 
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:864)
  * 
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1025)
  * 
org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:67)
  * 
org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
  * 
org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
  * org.apache.tapestry5.services.TapestryModule
$37.handle(TapestryModule.java:1987)
  * 
org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:135)
  * org.apache.tapestry5.services.TapestryModule
$12.service(TapestryModule.java:938)
  * 
org.apache.tapestry5.internal.services.LocalizationFilter.service(LocalizationFilter.java:42)
  * org.apache.tapestry5.services.TapestryModule
$2.service(TapestryModule.java:586)
  * 
org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
  * 
org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79)
  * 
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:93)
  * 
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:84)
  * 
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:75)
  * 
org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:106)
  * org.apache.tapestry5.services.TapestryModule
$11.service(TapestryModule.java:918)
  * 
org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44)
  * 
org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
  * 
org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:168)
  * org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1084)
  * 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
  * 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
  * 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
  * 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
  * 
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
  * 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
  * org.mortbay.jetty.Server.handle(Server.java:324)
  * 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
  * org.mortbay.jetty.HttpConnection
$RequestHandler.headerComplete(HttpConnection.java:828)
  * org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
  * org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
  * org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
  * 
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
  * org.mortbay.thread.BoundedThreadPool
$PoolThread.run(BoundedThreadPool.java:450)



Re: T5: java.util.ConcurrentModificationException

2008-07-09 Thread Howard Lewis Ship
Does raise an interesting point.

In a traditional page app, you would rarely have request overlap.  It
was possible (a wildly clicking user, perhaps).  Often the main page
would be one request, followed by a series of overlapping requests to
retrieve static assets.

It would be possible to add a filter to the page and component event
request chains that would single-thread requests for any specific
session.

That would raise some additional problems; for example, an earlier
user ran afoul of Tapestry's existing code (that single threads the
system periodically, to check to see if any resources on the file
system changed).  They had a window where process of one request would
loop back as a new request and thus two threads could end up
deadlocked.

So it does seem to me that if you are using Ajax techniques and thus
explicitly asynchronous access to the application, you should be
mindful of this.  We could bounce around some ideas as to how the
framework could assist: perhaps a per-session/per-page lock?

On Wed, Jul 9, 2008 at 2:36 PM, Martijn Brinkers [EMAIL PROTECTED] wrote:
 On one page I use a persistent Hashmap. The page contains an actionLink
 with a click event handler. The onclick event is activated with a delay
 using setTimeout. When the event is fired another actionLink is
 activated. Now what happens is that during the handling of the first
 actionLink the second actionLink is activated and this results in a
 ConcurrentModificationException on the Hashmap. I can solve it by using
 a multithread safe Hashmap but I want to understand under what
 circumstances you need to be carefull for multi threaded activation
 (with Tapestry 5 that is). Should a Persisted variable always be
 multithread safe?  I think so but what other Tapestry related items
 should be multithread safe as well?

 Martijn

 Stack trace:

 java.util.ConcurrentModificationException
 Stack trace
  * java.util.HashMap
$HashIterator.nextEntry(HashMap.java:793)
  * java.util.HashMap$KeyIterator.next(HashMap.java:828)
  * 
 mitm.mimesecure.web.components.CertificateStoreGrid.downloadSelected(CertificateStoreGrid.java:76)
  * 
 mitm.mimesecure.web.components.CertificateStoreGrid.dispatchComponentEvent(CertificateStoreGrid.java)
  * 
 org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:864)
  * 
 org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1025)
  * 
 org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:67)
  * 
 org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
  * 
 org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
  * org.apache.tapestry5.services.TapestryModule
$37.handle(TapestryModule.java:1987)
  * 
 org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:135)
  * org.apache.tapestry5.services.TapestryModule
$12.service(TapestryModule.java:938)
  * 
 org.apache.tapestry5.internal.services.LocalizationFilter.service(LocalizationFilter.java:42)
  * org.apache.tapestry5.services.TapestryModule
$2.service(TapestryModule.java:586)
  * 
 org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
  * 
 org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79)
  * 
 org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:93)
  * 
 org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:84)
  * 
 org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:75)
  * 
 org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:106)
  * org.apache.tapestry5.services.TapestryModule
$11.service(TapestryModule.java:918)
  * 
 org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44)
  * 
 org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
  * 
 org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:168)
  * org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1084)
  * 
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
  * 
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
  * 

Re: T5: java.util.ConcurrentModificationException

2008-07-09 Thread Martijn Brinkers

 So it does seem to me that if you are using Ajax techniques and thus
 explicitly asynchronous access to the application, you should be
 mindful of this.  We could bounce around some ideas as to how the
 framework could assist: perhaps a per-session/per-page lock?

A per-session/per-page lock still allows concurrent access to ASO's I
guess?
I think that making any 'globally' accessible objects (ie Persisted
objects, ASO's...?) thread safe is the safest choice but I'm not sure if
that works for everyone. Would it be possible to automatically create a
thread safe wrapper (proxy) for a Persisted object (and ASO) that only
allows single threaded access to that object? Trigger the auto wrapper
when a specific annotation is added to the persisted object like
@ThreadSafe (or something like that). You can then choose to make the
object thread safe by yourself or let Tapestry make a thread safe
wrapper for you.

Martijn

On Wed, 2008-07-09 at 14:48 -0700, Howard Lewis Ship wrote:
 Does raise an interesting point.
 
 In a traditional page app, you would rarely have request overlap.  It
 was possible (a wildly clicking user, perhaps).  Often the main page
 would be one request, followed by a series of overlapping requests to
 retrieve static assets.
 
 It would be possible to add a filter to the page and component event
 request chains that would single-thread requests for any specific
 session.
 
 That would raise some additional problems; for example, an earlier
 user ran afoul of Tapestry's existing code (that single threads the
 system periodically, to check to see if any resources on the file
 system changed).  They had a window where process of one request would
 loop back as a new request and thus two threads could end up
 deadlocked.
 
 So it does seem to me that if you are using Ajax techniques and thus
 explicitly asynchronous access to the application, you should be
 mindful of this.  We could bounce around some ideas as to how the
 framework could assist: perhaps a per-session/per-page lock?
 
 On Wed, Jul 9, 2008 at 2:36 PM, Martijn Brinkers [EMAIL PROTECTED] wrote:
  On one page I use a persistent Hashmap. The page contains an actionLink
  with a click event handler. The onclick event is activated with a delay
  using setTimeout. When the event is fired another actionLink is
  activated. Now what happens is that during the handling of the first
  actionLink the second actionLink is activated and this results in a
  ConcurrentModificationException on the Hashmap. I can solve it by using
  a multithread safe Hashmap but I want to understand under what
  circumstances you need to be carefull for multi threaded activation
  (with Tapestry 5 that is). Should a Persisted variable always be
  multithread safe?  I think so but what other Tapestry related items
  should be multithread safe as well?
 
  Martijn
 
  Stack trace:
 
  java.util.ConcurrentModificationException
  Stack trace
   * java.util.HashMap
 $HashIterator.nextEntry(HashMap.java:793)
   * java.util.HashMap$KeyIterator.next(HashMap.java:828)
   * 
  mitm.mimesecure.web.components.CertificateStoreGrid.downloadSelected(CertificateStoreGrid.java:76)
   * 
  mitm.mimesecure.web.components.CertificateStoreGrid.dispatchComponentEvent(CertificateStoreGrid.java)
   * 
  org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:864)
   * 
  org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1025)
   * 
  org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:67)
   * 
  org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
   * 
  org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
   * org.apache.tapestry5.services.TapestryModule
 $37.handle(TapestryModule.java:1987)
   * 
  org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:135)
   * org.apache.tapestry5.services.TapestryModule
 $12.service(TapestryModule.java:938)
   * 
  org.apache.tapestry5.internal.services.LocalizationFilter.service(LocalizationFilter.java:42)
   * org.apache.tapestry5.services.TapestryModule
 $2.service(TapestryModule.java:586)
   * 
  org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
   * 
  org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79)
   * 
  org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:93)
   * 
  

Re: T5: java.util.ConcurrentModificationException

2008-07-09 Thread Fernando Padilla
Also, maybe you should be using ConcurrentHashMap or other classes 
specifically made for multi-threaded access.  And if you review the 
javadoc for that class, I think they discuss how they handle iterators 
in a multi-thread safe manner..



Howard Lewis Ship wrote:

Does raise an interesting point.

In a traditional page app, you would rarely have request overlap.  It
was possible (a wildly clicking user, perhaps).  Often the main page
would be one request, followed by a series of overlapping requests to
retrieve static assets.

It would be possible to add a filter to the page and component event
request chains that would single-thread requests for any specific
session.

That would raise some additional problems; for example, an earlier
user ran afoul of Tapestry's existing code (that single threads the
system periodically, to check to see if any resources on the file
system changed).  They had a window where process of one request would
loop back as a new request and thus two threads could end up
deadlocked.

So it does seem to me that if you are using Ajax techniques and thus
explicitly asynchronous access to the application, you should be
mindful of this.  We could bounce around some ideas as to how the
framework could assist: perhaps a per-session/per-page lock?

On Wed, Jul 9, 2008 at 2:36 PM, Martijn Brinkers [EMAIL PROTECTED] wrote:

On one page I use a persistent Hashmap. The page contains an actionLink
with a click event handler. The onclick event is activated with a delay
using setTimeout. When the event is fired another actionLink is
activated. Now what happens is that during the handling of the first
actionLink the second actionLink is activated and this results in a
ConcurrentModificationException on the Hashmap. I can solve it by using
a multithread safe Hashmap but I want to understand under what
circumstances you need to be carefull for multi threaded activation
(with Tapestry 5 that is). Should a Persisted variable always be
multithread safe?  I think so but what other Tapestry related items
should be multithread safe as well?

Martijn

Stack trace:

java.util.ConcurrentModificationException
Stack trace
 * java.util.HashMap
   $HashIterator.nextEntry(HashMap.java:793)
 * java.util.HashMap$KeyIterator.next(HashMap.java:828)
 * 
mitm.mimesecure.web.components.CertificateStoreGrid.downloadSelected(CertificateStoreGrid.java:76)
 * 
mitm.mimesecure.web.components.CertificateStoreGrid.dispatchComponentEvent(CertificateStoreGrid.java)
 * 
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:864)
 * 
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1025)
 * 
org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:67)
 * 
org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
 * 
org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
 * org.apache.tapestry5.services.TapestryModule
   $37.handle(TapestryModule.java:1987)
 * 
org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:135)
 * org.apache.tapestry5.services.TapestryModule
   $12.service(TapestryModule.java:938)
 * 
org.apache.tapestry5.internal.services.LocalizationFilter.service(LocalizationFilter.java:42)
 * org.apache.tapestry5.services.TapestryModule
   $2.service(TapestryModule.java:586)
 * 
org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
 * 
org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79)
 * 
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:93)
 * 
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:84)
 * 
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:75)
 * 
org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:106)
 * org.apache.tapestry5.services.TapestryModule
   $11.service(TapestryModule.java:918)
 * 
org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44)
 * 
org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
 * 
org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:168)
 * org.mortbay.jetty.servlet.ServletHandler
   

Re: t5: pass few parameters to 2nd page

2008-07-09 Thread Josh Canfield
Is there opposition to adding an index to the annotation so you don't have
to use source order?

@PageActiviationContext(index=2)
private Bar b

@PageActiviationContext(index=1)
private Foo a
Josh

On Wed, Jul 9, 2008 at 2:36 PM, Igor Drobiazko [EMAIL PROTECTED]
wrote:

 I see a problem with multiple @PageActivationContext annotations inside a
 page class.
 Consider following example:

 public class Start{
   @PageActivationContext
   private Foo b;

   @PageActivationContext
   private Bar a;
 }

 When Eclipse Sort Member Save Action feature is enabled, the order of
 members a and b will change. The class will look like:

 public class Start{
   @PageActivationContext
   private Bar a;

   @PageActivationContext
   private Foo b;
 }

 In this case the order of the parameters of the generated onActivate
 handler
 conflicts with the order of the values of the ActionLink's context
 parameter specified in the template.


 On Wed, Jul 9, 2008 at 8:07 PM, Francisco Manzano 
 [EMAIL PROTECTED] wrote:

  I thought that its main contribution to be able to use it for multiple
  values,
  and not yet I understand why this functionality has not been implemented.
  So, I agree for jira.
 
 
 
  Ted Steen wrote:
 
  At the moment you should think of the @PageActivationContext as a
  convenience annotation for you to use when you only want to place a
  single value in the context. Personally I think it would make more
  sense if you where able to use it for multiple values.
 
  Maybe worth adding a JIRA for that?
  For example, when multiple values are annotated they are added to the
  context in alphabetical order.
 
  2008/7/9 Francisco Manzano [EMAIL PROTECTED]:
 
 
  why don't ?
 
  Ted Steen wrote:
 
 
  I dont think you can use that with multiple values as the context :/
 
  2008/7/9 Francisco Manzano [EMAIL PROTECTED]:
 
 
 
  Or, you can use the new @PageActivationContext  annotation for a
  greater
  simplicity
 
  Zanius
 
  Ted Steen wrote:
 
 
 
  Just add more parameters to the activate/passivate-methods.
  Or you can use (Object[] parameters).
  Or you can use (EventContext context)
 
  The way to go for you would be to just add more parameters to the
  activate/passivate-methods.
 
  2008/7/9 t [EMAIL PROTECTED]:
 
 
 
 
  void onActivate(String message)
   {
   System.out.println(Another page is activated! The
message is:  + message);
   this.passedMessage = message;
   }
   String onPassivate()
   {
   System.out.println(Another page is passivated...);
   return passedMessage;
   }
 
  This is the snippet that i got from t5 book on how to pass
 parameter
  from
  first
  page to 2nd page. if i need to pass more than 1 parameter to 2nd
  pages,
  how to
  do it?
 
 
 
 
 
 -
  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]
 
 
 
 
 
 
 
  -
  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]
 
 
 
 
 
 
  -
  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]
 
 
 
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Best regards,

 Igor Drobiazko




-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.


T3 problem: spindle won't include the tap. .jars in the .war

2008-07-09 Thread Tomi N/A
I know most eyes are focused on T5, but people work with legacy apps
as well so...
I have a small application built on Tapestry 3.0.3.
It compiles, and I can build a .war, but no matter what I try, the
.war won't contain the tapestry jars.
The app is supposed to work in a hosted environment, I would like it
to be self-sufficient (i.e. pack all it's libraries in it's war) but
I'm obviously failing.
My project was built with eclipse+spindle. Tapestry Framework plugin
defaults libraries are included in the project java buildpath,
libraries tab, and are also checked on the Order and Export tab.
On war deployment, I get ClassNotFoundExceptions mentioning the
tapestry RequestFilter (if I recall correctly, can't try it out at the
moment).

Basically, I'm stuck and would very much welcome opinions and suggestions.

Cheers,
Tomislav

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



Re: t5: pass few parameters to 2nd page

2008-07-09 Thread Howard Lewis Ship
I think that kind of complication becomes more trouble than just
implementing onActivate(), onPassivate().

On Wed, Jul 9, 2008 at 3:24 PM, Josh Canfield [EMAIL PROTECTED] wrote:
 Is there opposition to adding an index to the annotation so you don't have
 to use source order?

 @PageActiviationContext(index=2)
 private Bar b

 @PageActiviationContext(index=1)
 private Foo a
 Josh

 On Wed, Jul 9, 2008 at 2:36 PM, Igor Drobiazko [EMAIL PROTECTED]
 wrote:

 I see a problem with multiple @PageActivationContext annotations inside a
 page class.
 Consider following example:

 public class Start{
   @PageActivationContext
   private Foo b;

   @PageActivationContext
   private Bar a;
 }

 When Eclipse Sort Member Save Action feature is enabled, the order of
 members a and b will change. The class will look like:

 public class Start{
   @PageActivationContext
   private Bar a;

   @PageActivationContext
   private Foo b;
 }

 In this case the order of the parameters of the generated onActivate
 handler
 conflicts with the order of the values of the ActionLink's context
 parameter specified in the template.


 On Wed, Jul 9, 2008 at 8:07 PM, Francisco Manzano 
 [EMAIL PROTECTED] wrote:

  I thought that its main contribution to be able to use it for multiple
  values,
  and not yet I understand why this functionality has not been implemented.
  So, I agree for jira.
 
 
 
  Ted Steen wrote:
 
  At the moment you should think of the @PageActivationContext as a
  convenience annotation for you to use when you only want to place a
  single value in the context. Personally I think it would make more
  sense if you where able to use it for multiple values.
 
  Maybe worth adding a JIRA for that?
  For example, when multiple values are annotated they are added to the
  context in alphabetical order.
 
  2008/7/9 Francisco Manzano [EMAIL PROTECTED]:
 
 
  why don't ?
 
  Ted Steen wrote:
 
 
  I dont think you can use that with multiple values as the context :/
 
  2008/7/9 Francisco Manzano [EMAIL PROTECTED]:
 
 
 
  Or, you can use the new @PageActivationContext  annotation for a
  greater
  simplicity
 
  Zanius
 
  Ted Steen wrote:
 
 
 
  Just add more parameters to the activate/passivate-methods.
  Or you can use (Object[] parameters).
  Or you can use (EventContext context)
 
  The way to go for you would be to just add more parameters to the
  activate/passivate-methods.
 
  2008/7/9 t [EMAIL PROTECTED]:
 
 
 
 
  void onActivate(String message)
   {
   System.out.println(Another page is activated! The
message is:  + message);
   this.passedMessage = message;
   }
   String onPassivate()
   {
   System.out.println(Another page is passivated...);
   return passedMessage;
   }
 
  This is the snippet that i got from t5 book on how to pass
 parameter
  from
  first
  page to 2nd page. if i need to pass more than 1 parameter to 2nd
  pages,
  how to
  do it?
 
 
 
 
 
 -
  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]
 
 
 
 
 
 
 
  -
  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]
 
 
 
 
 
 
  -
  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]
 
 
 
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Best regards,

 Igor Drobiazko




 --
 --
 TheDailyTube.com. Sign up and get the best new videos on the internet
 delivered fresh to your inbox.




-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Re: AW: AW: AW: AW: Strange behavior of special characters

2008-07-09 Thread Andreas Andreou
Try searching the bug tracker...

I found
http://issues.apache.org/jira/browse/TAPESTRY-607 'Output encoding
problem with some versions of Tomcat 5' (btw, what's your servlet
container?) and some others that may help...

For the record, tapestry 3-4 used a custom resourcebundle loader that
didn't require you to pass the properties through native2ascii... I
think it used the ending of the file name of the property to determine
the indended encoding allowing you to use UTF-8 and be done with it...
That's also the reason why GWT gives credit to Tapestry in Help-About
(they've reused the code)


On 7/9/08, Sebastian Altmann [EMAIL PROTECTED] wrote:

  Ok seems like this won't get me anywhre.

  I just can repeat:
  All my properties filese are 100% encoded in UTF-8 (checked this in eclipse
  and in an external editor) and all umlauts are displayed properly (except in
  the special case described above).

  To this problem you mentioned concerning Java Properties Files and UTF-8
  encoding i just can guess, that it seems that this problem doesn't inflict
  the usage of properties inside tapestry.
  After i did a lot of testing concerning encoding both on UNIX and Windows
  machines,
  i just can say that special characters in UTF-8 are display properly (except
  in the special case described above) as long you set the concerning meta
  information in .application or rather in .library properly.





  Maximilian Weißböck wrote:
  
   I'm very sure the property files that work are not utf-8 encoded
   but iso-8895-1 encoded.
  
   You can use ÄÖÜß and so on with no problem in property files
   (we do it), just be very sure they are iso-8895-1 encoded.
  
   If you use Eclipse, right click on the file, open Properties
   and look at the Text file Encoding.
  
   Max
  
  
   -Ursprüngliche Nachricht-
   Von: Sebastian Altmann [mailto:[EMAIL PROTECTED]
   Gesendet: Dienstag, 8. Juli 2008 15:11
   An: users@tapestry.apache.org
   Betreff: Re: AW: AW: AW: Strange behavior of special characters
  
  
   Sorry but I just don't get it...
  
   After you mentioned the first time that there are problems concerning
   properties files in UTF-8 I also found this and similar articles on the
   sam
   topic.
  
   I would quietly accept this,
   if my special characters were displayed wrong all over the application and
   in other applications too, but i can't understand why this should be a
   general Java problem even though in 99% of cases my special characters are
   displayed properly.
  
  
  
   Maximilian Weißböck wrote:
  
   The load and store methods load and store properties in a simple
   line-oriented format specified below. This format uses the ISO 8859-1
   character encoding. Characters that cannot be directly represented in
   this
   encoding can be written using Unicode escapes  ; only a single 'u'
   character is allowed in an escape sequence. The native2ascii tool can be
   used to convert property files to and from other character encodings.
  
   from http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html
  
   Max
  
   -Ursprüngliche Nachricht-
   Von: Sebastian Altmann [mailto:[EMAIL PROTECTED]
   Gesendet: Dienstag, 8. Juli 2008 09:19
   An: users@tapestry.apache.org
   Betreff: Re: AW: AW: Strange behavior of special characters
  
  
   Yes I'm reading my values from properties files which are utf-8 encoded,
   but what really confuses me is that you tell me they aren't allowed i
   utf-8.
  
   Because we're running an application with utf-8 properties-files without
   any
   problems.
  
   This strange behavior can only be found in anatoher application.
  
  
  
  
   Maximilian Weißböck wrote:
  
   Do you read this values from a property file?
   Property files in Java may not be utf-8 encoded.
   The have to be iso-8859-1 encoded.
   Many thanks to Sun ...
  
   Max
  
  
   -Ursprüngliche Nachricht-
   Von: Sebastian Altmann [mailto:[EMAIL PROTECTED]
   Gesendet: Montag, 7. Juli 2008 14:54
   An: users@tapestry.apache.org
   Betreff: Re: AW: Strange behavior of special characters
  
  
   No i didn't because i am using tapestry 4.0.2 (forgot to mention this
   :-(()
   but i read similar atricles on tapestry 4.
  
   The weird thing is that my encoding basically is ok,
   and this strange things happen just under certain circumstances.
  
   Another thing that confuses me is that for example in löschen not just
   the
   ö isn't displayed correct
   but also the 3 following characters (sch).
   This happens to every string with special characters (mostly not the
   next
   3
   but the next 2 characters ).
  
  
  
   Maximilian Weißböck wrote:
  
   Did you have a look at
   http://wiki.apache.org/tapestry/Tapestry5Utf8Encoding
  
   Max
  
  
   -Ursprüngliche Nachricht-
   Von: Sebastian Altmann [mailto:[EMAIL PROTECTED]
   Gesendet: Montag, 7. Juli 2008 14:06
   An: users@tapestry.apache.org
   Betreff: Strange behavior of special characters