[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4425) Make Method "regexpArg" configureable in pages.xml
Frank Stolle (JIRA)
jira-events at lists.jboss.org
Fri Sep 25 12:58:49 EDT 2009
Make Method "regexpArg" configureable in pages.xml
--------------------------------------------------
Key: JBSEAM-4425
URL: https://jira.jboss.org/jira/browse/JBSEAM-4425
Project: Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 2.1.2.GA
Reporter: Frank Stolle
Currently the you can define a rewrite pattern in page.xml this way:
<?xml version="1.0" encoding="UTF-8"?>
<page xmlns="http://jboss.com/products/seam/pages" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.1.xsd">
<param name="post" required="true" converterId="postNameConverter" value="#{postView.post}" />
<rewrite pattern="/posts/{post}.html" />
</page>
The class org.jboss.seam.web.IncomingPattern then creates a Regexp-Pattern to check incoming Request: ^\/posts\/([^/]*)\.html$ which is of course correct. But it would be nice to configure ([^/]*)
One solution can be:
<?xml version="1.0" encoding="UTF-8"?>
<page xmlns="http://jboss.com/products/seam/pages" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.1.xsd">
<param name="post" required="true" converterId="postNameConverter" value="#{postView.post}" pattern="[a-z0-9]{0,5}" />
<rewrite pattern="/posts/{post}.html" />
</page>
--
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