This often happens when your template references an asset, in this case style.css, that doesn't exist (you should avoid using relative paths on pages that have an activation context).
What happens is that the page renders, the client asks the server for style.css relative the page's base URL ... that doesn't match a file in your context, and the URL looks like a page render request with an activation context that looks like "style.css" ... and that can't be converted to a long. Again, the solution is to avoid relative paths. Strip out style.css from your page or layout template, use the @IncludeStylesheet annotation instead of directly-code HTML. On Mon, Oct 27, 2008 at 8:32 AM, tapestryphoto <[EMAIL PROTECTED]> wrote: > > I have a PageLink thus: > > <t:PageLink t:page="viewMetadata" t:context="listItem.metadata.metadataId"> > > > </t:PageLink> > > > and code thus: > > public void onActivate(long metadataId) > { > System.out.println("METADATA ID = "+metadataId); > this.metadata = repository.getMetaDataById(metadataId); > } > > > Although every time I click on the link I get taken to the correct page and > the passed value is printed out correctly, I also get the following > exception: > > [ERROR] TapestryModule.RequestExceptionHandler Processing of request failed > with uncaught exception: Exception in method > dportal.pages.ViewMetadata.onActivate(long) (at ViewMetadata.java:20), > parameter #1: Coercion of style.css to type java.lang.Long (via String --> > Long) failed: For input string: "style.css" > org.apache.tapestry5.runtime.ComponentEventException: Exception in method > dportal.pages.ViewMetadata.onActivate(long) (at ViewMetadata.java:20), > parameter #1: Coercion of style.css to type java.lang.Long (via String --> > Long) failed: For input string: "style.css" > > > This occurs even when hard-coding the value thus: > > <t:PageLink t:page="viewMetadata" t:context="5"> > > > </t:PageLink> > > > So, what have I done wrong? > > > p. > > > > --------------------------------------------------------------------- > 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]