Tapestry 5
  1. Tapestry 5
  2. TAP5-290

Namespace error when partial-updating a zone with a block


    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.15
    • Fix Version/s: 5.0.16
    • Component/s: tapestry-core
    • Labels:


      I have a zone that contains two components in its body that i'd like to update on a given event.
      Because i can't return more than one component to update from the event listener method i created a block inside the zone and outside the two components and now return the block from the event listener method. Something like this:

      <t:delegate to="myblock"/>

      I use the delegate to because i want the block content to be visible when the whole page is rendered and not just after the update event.
      So, the page renders just fine. But, when the event is executed i get the following error logged and nothing is updated on the UI:

      [ERROR] TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Namespace prefix for URI 'http://www.w3.org/1999/xhtml' is not defined.
      java.lang.RuntimeException: Namespace prefix for URI 'http://www.w3.org/1999/xhtml' is not defined.
      at org.apache.tapestry5.dom.Element.toNamespacePrefix(Element.java:502)
      at org.apache.tapestry5.dom.Element.toNamespacePrefix(Element.java:504)
      at org.apache.tapestry5.dom.Element.toPrefixedName(Element.java:366)
      at org.apache.tapestry5.dom.Element.toMarkup(Element.java:300)
      at org.apache.tapestry5.dom.Node.toMarkup(Node.java:149)
      at org.apache.tapestry5.dom.Node.writeChildMarkup(Node.java:103)
      at org.apache.tapestry5.dom.Node.getChildMarkup(Node.java:113)
      at org.apache.tapestry5.internal.services.PageRenderQueueImpl.renderPartial(PageRenderQueueImpl.java:150)

      Although the block rendered fine the first time it seems to fail to render upon the partial-update. After some digging i found out that the only way that i could get this to work was to only include tapestry namespace tags inside the block. So if i have something like:


      inside the block i get the error. But if i change it to:

      <t:any element="div">whatever</t:any>

      it works just fine.

      Again, the exact same block renders just fine when the page loads.

        Issue Links


          Folke Behrens made changes -
          Link This issue relates to TAP5-457 [ TAP5-457 ]
          Howard M. Lewis Ship made changes -
          Status In Progress [ 3 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Howard M. Lewis Ship made changes -
          Status Reopened [ 4 ] In Progress [ 3 ]
          Hugo Palma made changes -
          Status Closed [ 6 ] Reopened [ 4 ]
          Resolution Fixed [ 1 ]
          Howard M. Lewis Ship made changes -
          Status In Progress [ 3 ] Closed [ 6 ]
          Fix Version/s 5.0.16 [ 12313427 ]
          Resolution Fixed [ 1 ]
          Howard M. Lewis Ship made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Howard M. Lewis Ship made changes -
          Field Original Value New Value
          Assignee Howard M. Lewis Ship [ hlship ]
          Hugo Palma created issue -


            • Assignee:
              Howard M. Lewis Ship
              Hugo Palma
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created: