tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Zeigler (JIRA)" <...@tapestry.apache.org>
Subject [jira] Commented: (TAPESTRY-2394) clientid not rendered for pagelink or actionlink (with no zone parameter)
Date Mon, 05 May 2008 12:15:55 GMT

    [ https://issues.apache.org/jira/browse/TAPESTRY-2394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594224#action_12594224

Robert Zeigler commented on TAPESTRY-2394:

I'm with Chris and Steve on this one.
Removing "id" is a ridiculously premature optimization.
Quoting from your blog:
"Tapestry 5.0.11 is now available for download. This is unofficially a beta, meaning that
the functionality is really nailed down and we're just stabilizing and fixing bugs. "

"Optimizing" away clientid from links isn't a bug fix. And it doesn't add any stability to
the framework.  And it de-stabilizes applications written in 5.0.11 (which is beta); they
will break when upgrading to 5.0.12.

I can understand the desire to clean up the html, but doesn't it seem like the "right" way
to do this would be something along the following lines:

1) Add a "lean" parameter to action link and page link (in the tradition of grid, et al)
2) Change behavior of the link components to include the client id if the zone parameter is
not null, or if lean is false.
3) lean defaults to false (preserving previous behavior)
4) Add documentation noting that in future versions of tapestry, lean will probably default
to true, so application authors who need the client id without specifying a zone should start
specifying "lean" as true.

The idea of using a mixing is interesting, but has the major issue of requiring active intervention
on the part of application authors to preserve behavior that used to exist in the framework
(in a non-alpha version of the framework, I might add).

> clientid not rendered for pagelink or actionlink (with no zone parameter) 
> --------------------------------------------------------------------------
>                 Key: TAPESTRY-2394
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2394
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Core Components
>    Affects Versions: 5.0.12
>         Environment: Any
>            Reporter: Steven Woolley
>            Assignee: Howard M. Lewis Ship
> the clientid is no longer rendered for pagelinks or actionlinks.  The cause (from walking
through the debugger) is this:
> For actionlinks:
> when there is no zone parameter, the call to getClientId() on the actionlink is never
made, and thus the clientid is never rendered.  Pagelink's simply never make a call to getClientId().
> This line in AbstractComponentEventLink's beginrender hilights the issue culprit:
>  if (_zone != null) _clientBehaviorSupport.linkZone(getClientId(), _zone);
> For pagelinks, there is simply no call to getClientId() anywhere in its rendering.
> I just double checked, very latest snapshot from maven:
> http://tapestry.formos.com/maven-snapshot-repository//org/apache/tapestry/tapestry-core/5.0.12-SNAPSHOT/tapestry-core-5.0.12-20080428.110035-48.jar
> Test.java:
> package org.example.myapp.pages;
> public class Test {
> }
> Test.tml:
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>     <head><title>test</title></head>
>     <body>
>     <a t:id="addSongsToList" t:type="actionlink" ></a>
>     </body>
> </html>
> renders:
> <html><head><link href="assets/tapestry/5.0.12-SNAPSHOT/default.css" rel="stylesheet"
type="text/css"><title>test</title></head><body><a href="test.addsongstolist"></a></body></html>
> Same thing in a loop renders:
> <html><head><link href="assets/tapestry/5.0.12-SNAPSHOT/default.css" rel="stylesheet"
type="text/css"><title>test</title></head><body><a href="test.addsongstolist"></a><a
href="test.addsongstolist"></a><a href="test.addsongstolist"></a></body></html>
> And if I explicitly set the id="something":
> <html><head><link href="assets/tapestry/5.0.12-SNAPSHOT/default.css" rel="stylesheet"
type="text/css"><title>test</title></head><body><a href="test.addsongstolist"
id="something"></a><a href="test.addsongstolist" id="something"></a><a
href="test.addsongstolist" id="something"></a></body></html>
> Also double checked in 5.0.11 and it works as expected:
> Test.tml:
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>     <head><title>test</title></head>
>     <body>
>     <t:loop source="1..3">
>     	<a t:id="addSongsToList" t:type="actionlink" ></a>
>  		</t:loop>
>     </body>
> </html>
> renders:
> <html><head><link href="assets/tapestry/default.css" rel="stylesheet"
type="text/css"><title>test</title></head><body><a href="test.addsongstolist"
id="addSongsToList"></a><a href="test.addsongstolist" id="addSongsToList_0"></a><a
href="test.addsongstolist" id="addSongsToList_1"></a></body></html>

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

View raw message