You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Mauricio Aldazosa Mariaca (JIRA)" <ji...@apache.org> on 2014/01/31 16:36:09 UTC

[jira] [Created] (TAP5-2281) Conflict in page name resolution

Mauricio Aldazosa Mariaca created TAP5-2281:
-----------------------------------------------

             Summary: Conflict in page name resolution
                 Key: TAP5-2281
                 URL: https://issues.apache.org/jira/browse/TAP5-2281
             Project: Tapestry 5
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.3.7
            Reporter: Mauricio Aldazosa Mariaca
            Priority: Minor


Due to URL shortening, sometimes it is possible for Tapestry to obtain an incorrect page class. This behavior can be exposed by doing something like:

1. Create a page 'Choose' inside package foo.
2. Create a page 'ChooseFoo' inside package foo.

In a ComponentRequestFilter try to obtain one of the pages:

{code}
   handlePageRender(PageRenderRequestParameters params,
                    ComponentRequestHandler handler) {
        String pageName params.getLogicalPageName();
        Component page = _componentSource.getPage(pageName);
        ...
        handler.handlePageRender(parameters);
    }
{code}

When the request filter handles a request for page "Choose", the component source ends picking up the page "ChooseFoo". It seems that tapestry's logical page name shortening doesn't handle cases where more than one page resolve to the same logical name.

Maybe Tapestry should raise a warning or throw an exception when it encounters pages with ambigous names.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)