What happening is that your HTML is referencing a static file.  The
file does not exist, and the format of the URL makes it look like a
Tapestry page render or action request. If the file did exist,
Tapestry would let the servlet container handle it.

On Jan 13, 2008 8:16 AM, adamh <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> I'm seeing the same behaviour, I have a page that displays a list of items
> which link off to a viewitem page with a pagelink with an item id for the
> context (a string). When I hit the viewitem page I'm seeing the onActivate
> event handler being called twice, the first time I can see that the item id
> is there, then the second time its "asset"
>
> ViewItem.java:
> public void onActivate(String theID) {
>         log.debug(theId);
> }
>
>
> The tml is very light, no images/assets being used, the only asset that gets
> rendered out in the final html is the <link
> href="assets/tapestry/default.css" rel="stylesheet" type="text/css"> that
> Tapestry auto renders.
>
> ViewItem.tml:
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> Hello
> </html>
>
> Log output:
> DEBUG - uk.co.app.pages. ViewItem.onActivate(36) | A4S4
> DEBUG - uk.co.app.pages. ViewItem.onActivate(36) | assets
>
> Is there any reason why I should see two invocations, this is a render
> request so only one cycle should be seen right?
>
> Any ideas?
>
> Thanks, Adam.
>
>
>
>
>
> Josh Penza wrote:
> >
> > Can someone explain the following exception?
> >
> > I click on a productdetail url like ('..../productdetail/9)
> > The system.out in ProductDetail. java prints nicely 9 to the screen.
> > **
> > *void* onActivate(Long productId) {
> >      *this*.productId = productId;
> >      System.*out*.println("ProductDetail.onActivate :" +
> > *this*.productId);
> > }
> >
> > But where does the "assets" String come from??
> >
> > Exception in method
> > org.example.web.tapestry.pages.ProductDetail.onActivate(
> > java.lang.Long) (at ProductDetail.java:49), parameter #1: Coercion of
> > assets
> > to type java.lang.Long (via String --> Long) failed: For input string:
> > "assets"
> >
> > Caused by: *java.lang.RuntimeException*: Coercion of assets to type
> > java.lang.Long (via String --> Long) failed: For input string: "assets"
> >
> > at org.apache.tapestry.ioc.internal.services.TypeCoercerImpl.coerce(*
> > TypeCoercerImpl.java:154*)
> >
> > at $TypeCoercer_1158a09422d.coerce($TypeCoercer_1158a09422d.java)
> >
> > at
> > org.apache.tapestry.internal.services.ComponentEventImpl.coerceContext(*
> > ComponentEventImpl.java:90*)
> >
> > ... 43 more
> >
> > Caused by: *java.lang.NumberFormatException*: For input string: "assets"
> >
> > at java.lang.NumberFormatException.forInputString(*
> > NumberFormatException.java:48*)
> >
> > at java.lang.Long.parseLong(*Long.java:403*)
> >
> > at java.lang.Long.<init>(*Long.java:671*)
> >
> > at org.apache.tapestry.ioc.services.TapestryIOCModule$9.coerce(*
> > TapestryIOCModule.java:232*)
> >
> > at org.apache.tapestry.ioc.services.TapestryIOCModule$9.coerce(*
> > TapestryIOCModule.java:230*)
> >
> > at org.apache.tapestry.ioc.services.CoercionTuple$CoercionWrapper.coerce(*
> > CoercionTuple.java:53*)
> >
> > at org.apache.tapestry.ioc.internal.services.TypeCoercerImpl.coerce(*
> > TypeCoercerImpl.java:150*)
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/T5%3A-Exception-occurs-in-onActivate-tp13135811p14787478.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]

Reply via email to