[jbossseam-issues] [JBoss JIRA] Assigned: (JBSEAM-4190) RewriteFilter is Non-deterministic
Norman Richards (JIRA)
jira-events at lists.jboss.org
Tue Jun 9 18:42:56 EDT 2009
[ https://jira.jboss.org/jira/browse/JBSEAM-4190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Norman Richards reassigned JBSEAM-4190:
---------------------------------------
Assignee: Norman Richards
> RewriteFilter is Non-deterministic
> ----------------------------------
>
> Key: JBSEAM-4190
> URL: https://jira.jboss.org/jira/browse/JBSEAM-4190
> Project: Seam
> Issue Type: Bug
> Affects Versions: 2.1.1.GA
> Reporter: John Gilbert
> Assignee: Norman Richards
> Fix For: 2.2.0.CR1
>
>
> The RewriteFilter is non-deterministic in some cases. An example serves best.
> Here are the rewrite rules I would like:
> /Customer/edit/{id} -> /jsf/Customer/Edit.xhtml
> /Customer/create -> /jsf/Customer/Edit.xhtml
> /Customer/{id} -> /jsf/Customer/View.xhtml
> When debugging the value of RewriteFilter.getAllPatterns(), the order of the two rules for /jsf/Customer/Edit.xhtml are always preserved.
> However, because Pages.getKnownViewIds() returns a HashSet there is no guarantee that the rules for /jsf/Customer/View.xhtml will come after the rules for /jsf/Customer/Edit.xhtml. As a result, /Customer/create sometimes translates to /jsf/Customer/View.xhtml when /jsf/Customer/View.xhtml is returned first in the set.
> There are several possible solutions:
> 1) Change /Customer/{id} to /Customer/view/{id}. However, this is not the best url for a View.
> 2) Change Pages.pagesByViewId to a TreeMap. This is the patch I am currently using, but it is only guaranteed for my patterns.
> 3) Change RewriteFilter.getAllPatterns() to returns a TreeSet sorted from longest to shortest. This is similar to the way Pages.wildcardViewIds works.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list