Re: ioc.Registry Exception Failed Coercion of css to Entity Id type java.lang.Long

2012-04-26 Thread netdawg
Still no trace of this error and cannot seem to reproduce it.  

I am pretty sure this was caused by using jQuery though - before replacing
the $ sign with the word jQuery.  

http://docs.jquery.com/Using_jQuery_with_Other_Libraries

and, while I was messing around trying to fix the apparent yuicompressor
issue (with rhino-bugfix etc):

http://tapestry.1045711.n5.nabble.com/AssetsModule-ResourceMinimizer-Exception-yui-compressor-td5658826.html



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/ioc-Registry-Exception-Failed-Coercion-of-css-to-Entity-Id-type-java-lang-Long-tp5661389p5668894.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: ioc.Registry Exception Failed Coercion of css to Entity Id type java.lang.Long

2012-04-24 Thread Lance Java
I think you might be having a name clash with a page name and a CSS file
name in the same folder and tapestry is thinking it's an event URL to the
page instead of a CSS path.

Solution: name the CSS file differently or move it to a different folder


Re: ioc.Registry Exception Failed Coercion of css to Entity Id type java.lang.Long

2012-04-24 Thread Thiago H. de Paula Figueiredo
On Tue, 24 Apr 2012 06:45:03 -0300, Lance Java lance.j...@googlemail.com  
wrote:



I think you might be having a name clash with a page name and a CSS file
name in the same folder and tapestry is thinking it's an event URL to the
page instead of a CSS path.

Solution: name the CSS file differently or move it to a different folder


Or use just absolute paths to CSS, JavaScript and image files.

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



Re: ioc.Registry Exception Failed Coercion of css to Entity Id type java.lang.Long

2012-04-24 Thread Howard Lewis Ship
Most likely, your template has a relative path to it ... you've done:
  link rel=stylesheet src=css/site.css/

That works great inside a static page, where you know exactly what the
browser URL is going to be.

In Tapestry, once you add page activation contexts, various folders,
and other mappings configured inside Tapestry, the browser URL is
going to be variable ... sometimes even for the same page in different
contexts, and certainly for any reusable component used across
multiple pages.

The end result is Tapestry tries to shoehorn the extra part of the
path (/mypage/css/site.css) into the page's activation context
(looks like a long) and is unable to convert css to a number.

The solution is to let Tapestry do the work:

  link rel=stylesheet src=${context:css/site.css}/

The context: binding prefix instructs Tapestry to locate the file as
an Asset, and generate the absolute URL. It also adds a bunch of other
useful features, such as client-side caching and optional GZip
compression.

Also, rather than do this in a template, try:

  @Import(stylesheet=context:css/site.css)

in you page or component class, as a class annotation.

On Tue, Apr 24, 2012 at 4:16 AM, Thiago H. de Paula Figueiredo
thiag...@gmail.com wrote:
 On Tue, 24 Apr 2012 06:45:03 -0300, Lance Java lance.j...@googlemail.com
 wrote:

 I think you might be having a name clash with a page name and a CSS file
 name in the same folder and tapestry is thinking it's an event URL to the
 page instead of a CSS path.

 Solution: name the CSS file differently or move it to a different folder


 Or use just absolute paths to CSS, JavaScript and image files.

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




-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

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

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

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



Re: ioc.Registry Exception Failed Coercion of css to Entity Id type java.lang.Long

2012-04-24 Thread netdawg
Aha.  Thanks, Howard.  Makes sense.  That is probably what was going on.  

I am, however, using the context:  in all my templates and corresponding
java classes, as intended. 

And, for the life of me, I am unable to trap the issue any longer.  The logs
seem to be free of it last time I checked and, of course, it never seemed to
interrupt the workflow. 

If I find it happens again, I will try to isolate it and post again.  

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/ioc-Registry-Exception-Failed-Coercion-of-css-to-Entity-Id-type-java-lang-Long-tp5661389p5663911.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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