commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitri Blinov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JEXL-177) Unified expressions to be used in String literals in Jexl scripts
Date Mon, 24 Aug 2015 11:35:45 GMT

    [ https://issues.apache.org/jira/browse/JEXL-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14709123#comment-14709123
] 

Dmitri Blinov commented on JEXL-177:
------------------------------------

I'm using both scripts and templates, and scripts are good at manipulating and preparing business
data (fetching, filtering etc) and templates are good at representing them in string form
but are a hell when it comes to conditional interpolation. 

At the moment I have both scripts and templates as independent parts of framework, they are
called by framework in relay - scripts to provide nessesery data context and templates to
finalyze the work, kind of MVC style, but in some non straight-forward cases there is a need
to either use different templates in the end, or to develop complex logic where data and representation
are interconnected, so that the only practical solution to this is to generate the result
by manipulating its fragments, including some parts and ommiting others, directly in script
where the data is being processed. 

> Unified expressions to be used in String literals in Jexl scripts
> -----------------------------------------------------------------
>
>                 Key: JEXL-177
>                 URL: https://issues.apache.org/jira/browse/JEXL-177
>             Project: Commons JEXL
>          Issue Type: New Feature
>    Affects Versions: 3.0
>            Reporter: Dmitri Blinov
>            Priority: Minor
>
> Introduce new string literals to jexl script that allow unified expressions to be used,
string literals could use for example triple quoted (single or double) syntax for delimiters,
may include newlines and should not escape single quotes
> {code}
> user = "Bob"; server = "Test"; s = """Hello ${user}, welcome to ${server}"""; return
s;
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message