You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Hugo Palma (JIRA)" <ji...@apache.org> on 2008/10/16 17:19:44 UTC

[jira] Created: (TAP5-290) Namespace error when partial-updating a zone with a block

Namespace error when partial-updating a zone with a block
---------------------------------------------------------

                 Key: TAP5-290
                 URL: https://issues.apache.org/jira/browse/TAP5-290
             Project: Tapestry 5
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.0.15
            Reporter: Hugo Palma


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:zone>
<t:delegate to="myblock"/>
<t:block>
<t:component1>
...
</t:component1>
<t:component2>
...
</t:component2>
<div>whatever</div>
</t:block>
</t:zone>

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:

<div>whatever</div>

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.

-- 
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] Reopened: (TAP5-290) Namespace error when partial-updating a zone with a block

Posted by "Hugo Palma (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hugo Palma reopened TAP5-290:
-----------------------------


The namespace error is gone.

Still, the fix changes the the root tag from the original one to something like "<ns0:div>"
This can force the developer to change a lot of css definitions that are tied to the HTML tag and not only the css class.

I don't think the developer should have to change it's approach to the page css because of this.
Isn't there any other way you can do this without changing the root element tag ?

> Namespace error when partial-updating a zone with a block
> ---------------------------------------------------------
>
>                 Key: TAP5-290
>                 URL: https://issues.apache.org/jira/browse/TAP5-290
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.15
>            Reporter: Hugo Palma
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.16
>
>
> 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:zone>
> <t:delegate to="myblock"/>
> <t:block>
> <t:component1>
> ...
> </t:component1>
> <t:component2>
> ...
> </t:component2>
> <div>whatever</div>
> </t:block>
> </t:zone>
> 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:
> <div>whatever</div>
> 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.

-- 
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] Assigned: (TAP5-290) Namespace error when partial-updating a zone with a block

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship reassigned TAP5-290:
-----------------------------------------

    Assignee: Howard M. Lewis Ship

> Namespace error when partial-updating a zone with a block
> ---------------------------------------------------------
>
>                 Key: TAP5-290
>                 URL: https://issues.apache.org/jira/browse/TAP5-290
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.15
>            Reporter: Hugo Palma
>            Assignee: Howard M. Lewis Ship
>
> 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:zone>
> <t:delegate to="myblock"/>
> <t:block>
> <t:component1>
> ...
> </t:component1>
> <t:component2>
> ...
> </t:component2>
> <div>whatever</div>
> </t:block>
> </t:zone>
> 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:
> <div>whatever</div>
> 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.

-- 
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: (TAP5-290) Namespace error when partial-updating a zone with a block

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12640863#action_12640863 ] 

Howard M. Lewis Ship commented on TAP5-290:
-------------------------------------------

The solution I'm working on is to automatically define namespaces as needed, when performing a partial render.

> Namespace error when partial-updating a zone with a block
> ---------------------------------------------------------
>
>                 Key: TAP5-290
>                 URL: https://issues.apache.org/jira/browse/TAP5-290
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.15
>            Reporter: Hugo Palma
>            Assignee: Howard M. Lewis Ship
>
> 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:zone>
> <t:delegate to="myblock"/>
> <t:block>
> <t:component1>
> ...
> </t:component1>
> <t:component2>
> ...
> </t:component2>
> <div>whatever</div>
> </t:block>
> </t:zone>
> 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:
> <div>whatever</div>
> 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.

-- 
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: (TAP5-290) Namespace error when partial-updating a zone with a block

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-290.
-------------------------------------

    Resolution: Fixed

A tough nut to crack, but I think this will do it.

> Namespace error when partial-updating a zone with a block
> ---------------------------------------------------------
>
>                 Key: TAP5-290
>                 URL: https://issues.apache.org/jira/browse/TAP5-290
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.15
>            Reporter: Hugo Palma
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.16
>
>
> 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:zone>
> <t:delegate to="myblock"/>
> <t:block>
> <t:component1>
> ...
> </t:component1>
> <t:component2>
> ...
> </t:component2>
> <div>whatever</div>
> </t:block>
> </t:zone>
> 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:
> <div>whatever</div>
> 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.

-- 
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: (TAP5-290) Namespace error when partial-updating a zone with a block

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12642969#action_12642969 ] 

Howard M. Lewis Ship commented on TAP5-290:
-------------------------------------------

Ok, I think I can do this by forcing the element to the default (no prefix) namespace.  The issue is that, in the highly dynamic space, it hard to connect the element that content that is rendering to the enclosing elements (outside of the rendering block/component) that are defining the namespaces.

> Namespace error when partial-updating a zone with a block
> ---------------------------------------------------------
>
>                 Key: TAP5-290
>                 URL: https://issues.apache.org/jira/browse/TAP5-290
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.15
>            Reporter: Hugo Palma
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.16
>
>
> 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:zone>
> <t:delegate to="myblock"/>
> <t:block>
> <t:component1>
> ...
> </t:component1>
> <t:component2>
> ...
> </t:component2>
> <div>whatever</div>
> </t:block>
> </t:zone>
> 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:
> <div>whatever</div>
> 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.

-- 
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: (TAP5-290) Namespace error when partial-updating a zone with a block

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-290.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0.16

Didn't create a specific test for the Ajax use case, but now for both complete renders and partial renders, Element will automatically generate namespace definitions if they aren't provided explicitly.

> Namespace error when partial-updating a zone with a block
> ---------------------------------------------------------
>
>                 Key: TAP5-290
>                 URL: https://issues.apache.org/jira/browse/TAP5-290
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.15
>            Reporter: Hugo Palma
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.16
>
>
> 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:zone>
> <t:delegate to="myblock"/>
> <t:block>
> <t:component1>
> ...
> </t:component1>
> <t:component2>
> ...
> </t:component2>
> <div>whatever</div>
> </t:block>
> </t:zone>
> 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:
> <div>whatever</div>
> 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.

-- 
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