You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Fritz Pröbstle (JIRA)" <de...@tapestry.apache.org> on 2008/03/31 11:42:24 UTC
[jira] Created: (TAPESTRY-2318) OnActivate() gets additional values
from css , img and other resources
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
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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Commented: (TAPESTRY-2318) OnActivate() gets additional
values from css , img and other resources
Posted by "Emanuel Greisen (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586145#action_12586145 ]
Emanuel Greisen commented on TAPESTRY-2318:
-------------------------------------------
Yes, now that I figured it out it is to be expected. But I think that all new to tapestry will have to learn this them selves the hard way. And it is far from intuitive that you just get weird activation context instead of 404s. Maybe the URLs could be a little different to work around this common mistake.
> 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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Closed: (TAPESTRY-2318) OnActivate() gets additional values
from css , img and other resources
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ 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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org