[ 
https://issues.apache.org/jira/browse/TAPESTRY-2318?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Howard M. Lewis Ship closed TAPESTRY-2318.
------------------------------------------

    Resolution: Invalid
      Assignee: Howard M. Lewis Ship

This is to be expected.

Your template references relative assets that don't exist.

Thus, when the page is rendering with a page activation context.  When the page 
activation context is a2, the relative url is /test/a2 and the relative URL 
"css/print" becomes /test/a2/css/print.css.  This looks like page Test with a 
page activation context of a2/css/print, and that's what's passed into your 
event handler method.

Using the ${asset:context:...} stuff nails down the location of the print.css 
to a file that actually exists, thus the request is delegates to the servlet 
container and is not handled by Tapestry.

> OnActivate() gets additional values from css , img and other resources
> ----------------------------------------------------------------------
>
>                 Key: TAPESTRY-2318
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2318
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.11
>            Reporter: Fritz Pröbstle
>            Assignee: Howard M. Lewis Ship
>
> OnActivate() gets additional values from css , img and other resources:
> If I asked my browser to display  "http://localhost:8080/tutorial1/test/a1";
> I expect *ONE*  parameter "a1".
> But I got
>  *Three*  parameters: "a2 , "css", "print".css".
> It seems to me that here the included request  for "css/print.css" are 
> encodes to be parameters.
> Using the asset notation works fine and I got one parameter.
> <link rel="stylesheet" type="text/css" media="print" 
> href="${asset:context:/css/print.css}" />
>  
> Reagards Fritz
> <<<<<<<<<< Test.tml
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>  
> <head>
>   <link rel="stylesheet" type="text/css" media="print" href="css/print.css" 
> />     
> </head>
>  <body>
>    <t:pagelink page="test"  context="literal:a1" >    xxx </t:pagelink>
>    </body>
> </html>
> <<<<<<<<<<<<<<< Test.java
> public class Test {
>       
>        
>        void onActivate(Object[] params)
>         {
>                
>                for ( Object o : params)
>                        System.out.println(o );
>        
>         }
> <<<<<<<<<<<<<<<<  }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to