amit kumar created OFBIZ-4885:
---------------------------------

             Summary: Support for closure, if and loop for inline groovy script 
in set filed of action tag.
                 Key: OFBIZ-4885
                 URL: https://issues.apache.org/jira/browse/OFBIZ-4885
             Project: OFBiz
          Issue Type: Improvement
          Components: framework
    Affects Versions: SVN trunk
            Reporter: amit kumar


Currently, we can use inline groovy script in set field tag of action tag in 
screens and forms. like
<form>
<action>
    <set field="tempVar" value="${groovy: someList?someList.size():0;}"/>
</action>
</form>
But, we can not use closure, if or loop in this kind of inline groovy. like
<form>
<action>
    <set field="tempVar" value="${groovy: str=''; someList.each{str=str+it}}"/>
</action>
</form>

The reason is that matching closing } braces for any opening { braces in the 
script are ignored and script does not get compiled if it contains any set of { 
and }.


So, I have added a patch which makes it possible to use closure, if and loop by 
handling { and } braces occurs with in the script.

--
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

        

Reply via email to