You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tiles.apache.org by "David Hay (JIRA)" <ji...@apache.org> on 2011/08/02 16:53:28 UTC

[jira] [Created] (TILES-534) Wildcarding interferes with EL Expressions in put-attribute

Wildcarding interferes with EL Expressions in put-attribute
-----------------------------------------------------------

                 Key: TILES-534
                 URL: https://issues.apache.org/jira/browse/TILES-534
             Project: Tiles
          Issue Type: Bug
          Components: tiles-core, tiles-el
    Affects Versions: 2.2.2
            Reporter: David Hay


I'm trying to create a Tiles definition that uses wildcards (regex) as well as an EL expression.  It appears that the placeholder replacement for wildcards is interpreting the EL expression as an invalid placeholder instead of leaving it alone.  This looks to be related to TILES-502.

I've created the pattern definition resolver and EL expression support as described on the websit (http://tiles.apache.org/framework/tutorial/advanced/wildcard.html and http://tiles.apache.org/framework/tutorial/advanced/el-support.html, respectively). My tiles definition looks like the following:

<definition name="REGEXP:(.*)Body" template="/WEB-INF/jsp/{1}/index.jsp">
    <put-attribute name="pageContent" expression="EL:/WEB-INF/jsp/${website.template.name}/${currentPage.name}.jsp"/>
</definition>


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

        

[jira] [Assigned] (TILES-534) Wildcarding interferes with EL Expressions in put-attribute

Posted by "Mck SembWever (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TILES-534?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mck SembWever reassigned TILES-534:
-----------------------------------

    Assignee: Mck SembWever
    
> Wildcarding interferes with EL Expressions in put-attribute
> -----------------------------------------------------------
>
>                 Key: TILES-534
>                 URL: https://issues.apache.org/jira/browse/TILES-534
>             Project: Tiles
>          Issue Type: Bug
>          Components: tiles-core, tiles-el
>    Affects Versions: 2.2.2
>            Reporter: David Hay
>            Assignee: Mck SembWever
>
> I'm trying to create a Tiles definition that uses wildcards (regex) as well as an EL expression.  It appears that the placeholder replacement for wildcards is interpreting the EL expression as an invalid placeholder instead of leaving it alone.  This looks to be related to TILES-502.
> I've created the pattern definition resolver and EL expression support as described on the websit (http://tiles.apache.org/framework/tutorial/advanced/wildcard.html and http://tiles.apache.org/framework/tutorial/advanced/el-support.html, respectively). My tiles definition looks like the following:
> <definition name="REGEXP:(.*)Body" template="/WEB-INF/jsp/{1}/index.jsp">
>     <put-attribute name="pageContent" expression="EL:/WEB-INF/jsp/${website.template.name}/${currentPage.name}.jsp"/>
> </definition>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (TILES-534) Wildcarding interferes with EL Expressions in put-attribute

Posted by "Nicolas Le Bas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TILES-534?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nicolas Le Bas closed TILES-534.
--------------------------------

    
> Wildcarding interferes with EL Expressions in put-attribute
> -----------------------------------------------------------
>
>                 Key: TILES-534
>                 URL: https://issues.apache.org/jira/browse/TILES-534
>             Project: Tiles
>          Issue Type: Bug
>          Components: tiles-core, tiles-el
>    Affects Versions: 2.2.2
>            Reporter: David Hay
>            Assignee: Mck SembWever
>             Fix For: 2.2.3, 3.0.0
>
>
> I'm trying to create a Tiles definition that uses wildcards (regex) as well as an EL expression.  It appears that the placeholder replacement for wildcards is interpreting the EL expression as an invalid placeholder instead of leaving it alone.  This looks to be related to TILES-502.
> I've created the pattern definition resolver and EL expression support as described on the websit (http://tiles.apache.org/framework/tutorial/advanced/wildcard.html and http://tiles.apache.org/framework/tutorial/advanced/el-support.html, respectively). My tiles definition looks like the following:
> <definition name="REGEXP:(.*)Body" template="/WEB-INF/jsp/{1}/index.jsp">
>     <put-attribute name="pageContent" expression="EL:/WEB-INF/jsp/${website.template.name}/${currentPage.name}.jsp"/>
> </definition>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TILES-534) Wildcarding interferes with EL Expressions in put-attribute

Posted by "David Hay (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TILES-534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13076261#comment-13076261 ] 

David Hay commented on TILES-534:
---------------------------------

Changing PatternUtil line 227 from 'replaceFirst' to 'replace' appears to solve the problem.  In addition, it avoids the Pattern compile for each replacement.

> Wildcarding interferes with EL Expressions in put-attribute
> -----------------------------------------------------------
>
>                 Key: TILES-534
>                 URL: https://issues.apache.org/jira/browse/TILES-534
>             Project: Tiles
>          Issue Type: Bug
>          Components: tiles-core, tiles-el
>    Affects Versions: 2.2.2
>            Reporter: David Hay
>
> I'm trying to create a Tiles definition that uses wildcards (regex) as well as an EL expression.  It appears that the placeholder replacement for wildcards is interpreting the EL expression as an invalid placeholder instead of leaving it alone.  This looks to be related to TILES-502.
> I've created the pattern definition resolver and EL expression support as described on the websit (http://tiles.apache.org/framework/tutorial/advanced/wildcard.html and http://tiles.apache.org/framework/tutorial/advanced/el-support.html, respectively). My tiles definition looks like the following:
> <definition name="REGEXP:(.*)Body" template="/WEB-INF/jsp/{1}/index.jsp">
>     <put-attribute name="pageContent" expression="EL:/WEB-INF/jsp/${website.template.name}/${currentPage.name}.jsp"/>
> </definition>

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

        

[jira] [Resolved] (TILES-534) Wildcarding interferes with EL Expressions in put-attribute

Posted by "Mck SembWever (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TILES-534?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mck SembWever resolved TILES-534.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0.x
                   2.2.3

thanks David. committed to 2.2.x branch and trunk
                
> Wildcarding interferes with EL Expressions in put-attribute
> -----------------------------------------------------------
>
>                 Key: TILES-534
>                 URL: https://issues.apache.org/jira/browse/TILES-534
>             Project: Tiles
>          Issue Type: Bug
>          Components: tiles-core, tiles-el
>    Affects Versions: 2.2.2
>            Reporter: David Hay
>            Assignee: Mck SembWever
>             Fix For: 2.2.3, 3.0.x
>
>
> I'm trying to create a Tiles definition that uses wildcards (regex) as well as an EL expression.  It appears that the placeholder replacement for wildcards is interpreting the EL expression as an invalid placeholder instead of leaving it alone.  This looks to be related to TILES-502.
> I've created the pattern definition resolver and EL expression support as described on the websit (http://tiles.apache.org/framework/tutorial/advanced/wildcard.html and http://tiles.apache.org/framework/tutorial/advanced/el-support.html, respectively). My tiles definition looks like the following:
> <definition name="REGEXP:(.*)Body" template="/WEB-INF/jsp/{1}/index.jsp">
>     <put-attribute name="pageContent" expression="EL:/WEB-INF/jsp/${website.template.name}/${currentPage.name}.jsp"/>
> </definition>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TILES-534) Wildcarding interferes with EL Expressions in put-attribute

Posted by "David Hay (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TILES-534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13076244#comment-13076244 ] 

David Hay commented on TILES-534:
---------------------------------

This is the stack trace I get when evaluating the definition.

java.lang.IllegalArgumentException: Illegal group reference
	java.util.regex.Matcher.appendReplacement(Matcher.java:713)
	java.util.regex.Matcher.replaceFirst(Matcher.java:861)
	java.lang.String.replaceFirst(String.java:2146)
	org.apache.tiles.definition.pattern.PatternUtil.replace(PatternUtil.java:227)
	org.apache.tiles.definition.pattern.PatternUtil.replaceVarsInSimpleAttribute(PatternUtil.java:166)
	org.apache.tiles.definition.pattern.PatternUtil.replaceVarsInAttribute(PatternUtil.java:143)
	org.apache.tiles.definition.pattern.PatternUtil.replacePlaceholders(PatternUtil.java:90)
	org.apache.tiles.definition.pattern.regexp.RegexpDefinitionPatternMatcher.createDefinition(RegexpDefinitionPatternMatcher.java:71)

> Wildcarding interferes with EL Expressions in put-attribute
> -----------------------------------------------------------
>
>                 Key: TILES-534
>                 URL: https://issues.apache.org/jira/browse/TILES-534
>             Project: Tiles
>          Issue Type: Bug
>          Components: tiles-core, tiles-el
>    Affects Versions: 2.2.2
>            Reporter: David Hay
>
> I'm trying to create a Tiles definition that uses wildcards (regex) as well as an EL expression.  It appears that the placeholder replacement for wildcards is interpreting the EL expression as an invalid placeholder instead of leaving it alone.  This looks to be related to TILES-502.
> I've created the pattern definition resolver and EL expression support as described on the websit (http://tiles.apache.org/framework/tutorial/advanced/wildcard.html and http://tiles.apache.org/framework/tutorial/advanced/el-support.html, respectively). My tiles definition looks like the following:
> <definition name="REGEXP:(.*)Body" template="/WEB-INF/jsp/{1}/index.jsp">
>     <put-attribute name="pageContent" expression="EL:/WEB-INF/jsp/${website.template.name}/${currentPage.name}.jsp"/>
> </definition>

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