You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sebastian Gooren (JIRA)" <ji...@apache.org> on 2011/09/16 23:14:09 UTC

[jira] [Created] (WICKET-4061) Invalid listener url generated for nested components that have an id which starts with a dash

Invalid listener url generated for nested components that have an id which starts with a dash
---------------------------------------------------------------------------------------------

                 Key: WICKET-4061
                 URL: https://issues.apache.org/jira/browse/WICKET-4061
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.5.0
            Reporter: Sebastian Gooren
            Priority: Minor


I have a very simple hierarchy:

WebMarkupContainer with id "-nav-container"
nested RepeatingView with id "-nav"
... which contains a link with id "link"

HTML:
<div id="layout-nav" wicket:id="-nav-container">
	<ul>
		<li wicket:id="-nav"><a href="#" wicket:id="link"><span wicket:id="name">Tab name</span></a></li>
	</ul>
</div>

On page render I get a link like "wicket/page?3-1.ILinkListener-nav--container---nav-1-link".
When clicking this link I get:

Could not find component '-nav-container-:nav:1:link' on page x.y.Z

Note the dash after -nav-container, which should not be there.
Also note the missing dash before nav.

It appears the dash shifts to the left in the encoding or decoding phase of the code that generates/handles a url for ILinkListener.INTERFACE.

Removing the starting dash from the RepeatingView's id solves the problem.
However, if this is considered normal behaviour (dashed not allowed in componend ids) it needs to be documented.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WICKET-4061) Invalid listener url generated for nested components that have an id which starts with a dash

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

Sebastian Gooren updated WICKET-4061:
-------------------------------------

    Description: 
I have a very simple hierarchy:

WebMarkupContainer with id "-nav-container"
nested RepeatingView with id "-nav"
... which contains a link with id "link"

HTML:
<div id="layout-nav" wicket:id="-nav-container">
	<ul>
		<li wicket:id="-nav"><a href="#" wicket:id="link"><span wicket:id="name">Tab name</span></a></li>
	</ul>
</div>

On page render I get a link like "wicket/page?3-1.ILinkListener---nav--container---nav-1-link".
When clicking this link I get:

Could not find component '-nav-container-:nav:1:link' on page x.y.Z

Note the dash after -nav-container, which should not be there.
Also note the missing dash before nav.

It appears the dash shifts to the left in the encoding or decoding phase of the code that generates/handles a url for ILinkListener.INTERFACE.

Removing the starting dash from the RepeatingView's id solves the problem.
However, if this is considered normal behaviour (dashed not allowed in componend ids) it needs to be documented.

  was:
I have a very simple hierarchy:

WebMarkupContainer with id "-nav-container"
nested RepeatingView with id "-nav"
... which contains a link with id "link"

HTML:
<div id="layout-nav" wicket:id="-nav-container">
	<ul>
		<li wicket:id="-nav"><a href="#" wicket:id="link"><span wicket:id="name">Tab name</span></a></li>
	</ul>
</div>

On page render I get a link like "wicket/page?3-1.ILinkListener-nav--container---nav-1-link".
When clicking this link I get:

Could not find component '-nav-container-:nav:1:link' on page x.y.Z

Note the dash after -nav-container, which should not be there.
Also note the missing dash before nav.

It appears the dash shifts to the left in the encoding or decoding phase of the code that generates/handles a url for ILinkListener.INTERFACE.

Removing the starting dash from the RepeatingView's id solves the problem.
However, if this is considered normal behaviour (dashed not allowed in componend ids) it needs to be documented.


> Invalid listener url generated for nested components that have an id which starts with a dash
> ---------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4061
>                 URL: https://issues.apache.org/jira/browse/WICKET-4061
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.0
>            Reporter: Sebastian Gooren
>            Priority: Minor
>
> I have a very simple hierarchy:
> WebMarkupContainer with id "-nav-container"
> nested RepeatingView with id "-nav"
> ... which contains a link with id "link"
> HTML:
> <div id="layout-nav" wicket:id="-nav-container">
> 	<ul>
> 		<li wicket:id="-nav"><a href="#" wicket:id="link"><span wicket:id="name">Tab name</span></a></li>
> 	</ul>
> </div>
> On page render I get a link like "wicket/page?3-1.ILinkListener---nav--container---nav-1-link".
> When clicking this link I get:
> Could not find component '-nav-container-:nav:1:link' on page x.y.Z
> Note the dash after -nav-container, which should not be there.
> Also note the missing dash before nav.
> It appears the dash shifts to the left in the encoding or decoding phase of the code that generates/handles a url for ILinkListener.INTERFACE.
> Removing the starting dash from the RepeatingView's id solves the problem.
> However, if this is considered normal behaviour (dashed not allowed in componend ids) it needs to be documented.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (WICKET-4061) Invalid listener url generated for nested components that have an id which starts with a dash

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

Igor Vaynberg resolved WICKET-4061.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5.1

~ is now used to encode -
~ is allowed not-encoded in the query string and is a lot less likely to be used by the user in component ids compared to the dash

> Invalid listener url generated for nested components that have an id which starts with a dash
> ---------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4061
>                 URL: https://issues.apache.org/jira/browse/WICKET-4061
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.0
>            Reporter: Sebastian Gooren
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.5.1
>
>
> I have a very simple hierarchy:
> WebMarkupContainer with id "-nav-container"
> nested RepeatingView with id "-nav"
> ... which contains a link with id "link"
> HTML:
> <div id="layout-nav" wicket:id="-nav-container">
> 	<ul>
> 		<li wicket:id="-nav"><a href="#" wicket:id="link"><span wicket:id="name">Tab name</span></a></li>
> 	</ul>
> </div>
> On page render I get a link like "wicket/page?3-1.ILinkListener---nav--container---nav-1-link".
> When clicking this link I get:
> Could not find component '-nav-container-:nav:1:link' on page x.y.Z
> Note the dash after -nav-container, which should not be there.
> Also note the missing dash before nav.
> It appears the dash shifts to the left in the encoding or decoding phase of the code that generates/handles a url for ILinkListener.INTERFACE.
> Removing the starting dash from the RepeatingView's id solves the problem.
> However, if this is considered normal behaviour (dashed not allowed in componend ids) it needs to be documented.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4061) Invalid listener url generated for nested components that have an id which starts with a dash

Posted by "Sebastian Gooren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13106833#comment-13106833 ] 

Sebastian Gooren commented on WICKET-4061:
------------------------------------------

Ok, I found the problem. It's the way ComponentInfo handles encoding and decoding the component path.

During the encode phase "ILinkListener:-nav-container:-nav:1:link" becomes the above.

However, on decode a set of three dashes causes a problem. The decoder no longer sees the difference between the encoded version of:

(a) :-
(b) -:

Both become three dashes when encoding, and on decoding _always_ become (b).
This only occurs for nested components which have an id that starts with a dash.

In most of my apps one or more dashes in component ids are not uncommon, so this causes applications to break when upgrading to 1.5.

> Invalid listener url generated for nested components that have an id which starts with a dash
> ---------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4061
>                 URL: https://issues.apache.org/jira/browse/WICKET-4061
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.0
>            Reporter: Sebastian Gooren
>            Priority: Minor
>
> I have a very simple hierarchy:
> WebMarkupContainer with id "-nav-container"
> nested RepeatingView with id "-nav"
> ... which contains a link with id "link"
> HTML:
> <div id="layout-nav" wicket:id="-nav-container">
> 	<ul>
> 		<li wicket:id="-nav"><a href="#" wicket:id="link"><span wicket:id="name">Tab name</span></a></li>
> 	</ul>
> </div>
> On page render I get a link like "wicket/page?3-1.ILinkListener---nav--container---nav-1-link".
> When clicking this link I get:
> Could not find component '-nav-container-:nav:1:link' on page x.y.Z
> Note the dash after -nav-container, which should not be there.
> Also note the missing dash before nav.
> It appears the dash shifts to the left in the encoding or decoding phase of the code that generates/handles a url for ILinkListener.INTERFACE.
> Removing the starting dash from the RepeatingView's id solves the problem.
> However, if this is considered normal behaviour (dashed not allowed in componend ids) it needs to be documented.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (WICKET-4061) Invalid listener url generated for nested components that have an id which starts with a dash

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

Igor Vaynberg reassigned WICKET-4061:
-------------------------------------

    Assignee: Igor Vaynberg

> Invalid listener url generated for nested components that have an id which starts with a dash
> ---------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4061
>                 URL: https://issues.apache.org/jira/browse/WICKET-4061
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.0
>            Reporter: Sebastian Gooren
>            Assignee: Igor Vaynberg
>            Priority: Minor
>
> I have a very simple hierarchy:
> WebMarkupContainer with id "-nav-container"
> nested RepeatingView with id "-nav"
> ... which contains a link with id "link"
> HTML:
> <div id="layout-nav" wicket:id="-nav-container">
> 	<ul>
> 		<li wicket:id="-nav"><a href="#" wicket:id="link"><span wicket:id="name">Tab name</span></a></li>
> 	</ul>
> </div>
> On page render I get a link like "wicket/page?3-1.ILinkListener---nav--container---nav-1-link".
> When clicking this link I get:
> Could not find component '-nav-container-:nav:1:link' on page x.y.Z
> Note the dash after -nav-container, which should not be there.
> Also note the missing dash before nav.
> It appears the dash shifts to the left in the encoding or decoding phase of the code that generates/handles a url for ILinkListener.INTERFACE.
> Removing the starting dash from the RepeatingView's id solves the problem.
> However, if this is considered normal behaviour (dashed not allowed in componend ids) it needs to be documented.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira