Coercion error in onActivate
Dear Tapestry Users, I hope someone can help me with that issue, it's bugging me for a while now and I may not be able to see the obvious. In an edit page I am taking the user id as argument, but when calling the url with proper value /user/edit/2 I am getting an exception: Caused by: java.lang.IllegalArgumentException: Exception in method de.matchpatch.pages.user.UserEdit.onActivate(long) (at UserEdit.java:25), parameter #1: Coercion of layout to type java.lang.Long (via String -- Long) failed: For input string: layout I found a mail from Uli Staerk (http://osdir.com/ml/users-tapestry-apache/2009-01/msg00170.html) where he figured it was due to a hardcoded CSS file, but that's not the case here (using @IncludeStylesheet annotation). But I do use a Template (based on YAML) in a layout component. My UserEdit.tml looks like this: t:layout title=matchpatch User xmlns:t=http://tapestry.apache.org/schema/tapestry_5_1_0.xsd; xmlns:p=tapestry:parameter t:beaneditform object=user/ /t:layout I hope someone has got a hint for me. If more code is required, please let me know. Thanks in advance Daniel
Re: Coercion error in onActivate
On Sat, 29 May 2010 10:58:55 -0300, Daniel Henze dhe...@googlemail.com wrote: Dear Tapestry Users, Hi! I found a mail from Uli Staerk (http://osdir.com/ml/users-tapestry-apache/2009-01/msg00170.html) where he figured it was due to a hardcoded CSS file, but that's not the case here (using @IncludeStylesheet annotation). But I do use a Template (based on YAML) in a layout component. The overall problem is using relative paths, not hard-coding references to files such as JavaScript, CSS and images. You can use ${context:xxx} without any problems. Check the generated HTML and look for relative paths. ;) -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Coercion error in onActivate
Dear Tapestry Users, I hope someone can help me with that issue, it's bugging me for a while now and I may not be able to see the obvious. In an edit page I am taking the user id as argument, but when calling the url with proper value /user/edit/2 I am getting an exception: Caused by: java.lang.IllegalArgumentException: Exception in method de.matchpatch.pages.user.UserEdit.onActivate(long) (at UserEdit.java:25), parameter #1: Coercion of layout to type java.lang.Long (via String -- Long) failed: For input string: layout I found a mail from Uli Staerk (http://osdir.com/ml/users-tapestry-apache/2009-01/msg00170.html) where he figured it was due to a hardcoded CSS file, but that's not the case here (using @IncludeStylesheet annotation). But I do use a Template (based on YAML) in a layout component. My UserEdit.tml looks like this: t:layout title=matchpatch User xmlns:t=http://tapestry.apache.org/schema/tapestry_5_1_0.xsd; xmlns:p=tapestry:parameter t:beaneditform object=user/ /t:layout I hope someone has got an idea for me. If more code is required, please let me know. Thanks in advance Daniel - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Coercion error in onActivate
Thanks Thiago, thanks a lot, you pointed me into the right direction. I did eliminate everything from the layout and that worked well. So I'll be going through and try to find the erroneous part. Cheers Daniel Am 29.05.2010 16:24, schrieb Thiago H. de Paula Figueiredo: On Sat, 29 May 2010 10:58:55 -0300, Daniel Henze dhe...@googlemail.com wrote: Dear Tapestry Users, Hi! I found a mail from Uli Staerk (http://osdir.com/ml/users-tapestry-apache/2009-01/msg00170.html) where he figured it was due to a hardcoded CSS file, but that's not the case here (using @IncludeStylesheet annotation). But I do use a Template (based on YAML) in a layout component. The overall problem is using relative paths, not hard-coding references to files such as JavaScript, CSS and images. You can use ${context:xxx} without any problems. Check the generated HTML and look for relative paths. ;) - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org