[jira] [Updated] (OFBIZ-10020) Improve groovy DSL : makeValue accept fields map and call delegator.makeValidValue

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (OFBIZ-10020) Improve groovy DSL : makeValue accept fields map and call delegator.makeValidValue

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-10020?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nicolas Malin updated OFBIZ-10020:
----------------------------------
    Attachment: OFBIZ-10020.patch

> Improve groovy DSL : makeValue accept fields map and call delegator.makeValidValue
> ----------------------------------------------------------------------------------
>
>                 Key: OFBIZ-10020
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-10020
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: Trunk
>            Reporter: Nicolas Malin
>            Assignee: Nicolas Malin
>            Priority: Minor
>              Labels: DSL
>         Attachments: OFBIZ-10020.patch
>
>
> When you create a Generic value with groovy, you need to initial it with makeValue and after set all fields.
> {code}
> GenericValue product = makeValue('Product')
> product.internalName = parameters.internalName
> {code}
> I propose to simplify this dsl with an automatic parameters check so you can call directly like that :
> {code}
> GenericValue product = makeValue('Product', parameters)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)