Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-2394

clientid not rendered for pagelink or actionlink (with no zone parameter)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 5.0.12
    • None
    • Core Components
    • None
    • Any

    Description

      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>

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            wooo Steven Woolley
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: