[
https://issues.apache.org/jira/browse/TILES-502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12843966#action_12843966
]
Antonio Petrelli commented on TILES-502:
----------------------------------------
You convinced me :-)
However, I prefer the first approach, since it is useful to overcome a limit of
MessageFormat itself.
In fact, it should be possible to escape the opening curly brackets only if
they are not followed by a number.
Since you seem a regexp whiz :-) can you translate it into an expression?
Do you think that this approach might work for all cases?
> wildcarding works in put-attrib...@value but not in put-attrib...@expression
> -----------------------------------------------------------------------------
>
> Key: TILES-502
> URL: https://issues.apache.org/jira/browse/TILES-502
> Project: Tiles
> Issue Type: Bug
> Components: tiles-core
> Affects Versions: 2.2.2
> Reporter: Mck SembWever
> Fix For: 2.2.2
>
> Attachments: tiles-502.patch
>
>
> This works:
> <definition name="REGEXP:([^.]+)">
> <put-attribute name="something" value="some-{1}.jsp"
> </definition>
> but this does not:
> <definition name="REGEXP:([^.]+)">
> <put-attribute name="something"
> expression="some-{1}-${requestScope.someVariable}.jsp"
> </definition>
> Attached is a patch, albeit that
> st = st.replaceAll("'", "'''").replaceAll("\\Q${\\E", "\\$'{'");
> definitely should be improved with something from javax.el that escapes
> the el before pushing it through the MessageFormat.
> But going down this path it should be made pluggable so that the various
> registered attributeEvaluators are called to do the appropriate
> escaping.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.