You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Olivier Heintz (Created) (JIRA)" <ji...@apache.org> on 2012/02/11 17:49:03 UTC

[jira] [Created] (OFBIZ-4687) Add attributes value and type for script tag in screen, form. Default type is groovy and value can be a little script.

Add attributes value and type for script tag in screen, form. Default type is groovy and value can be a little script.
----------------------------------------------------------------------------------------------------------------------

                 Key: OFBIZ-4687
                 URL: https://issues.apache.org/jira/browse/OFBIZ-4687
             Project: OFBiz
          Issue Type: Improvement
          Components: framework
    Affects Versions: SVN trunk
            Reporter: Olivier Heintz
            Priority: Minor


this enhancement can be usefull for branch 20120209RemoveBsh
and for trunk, to avoid very small groovy file

--
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] (OFBIZ-4687) Add attributes value and type for script tag in screen, form. Default type is groovy and value can be a little script.

Posted by "Olivier Heintz (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-4687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206384#comment-13206384 ] 

Olivier Heintz commented on OFBIZ-4687:
---------------------------------------

it's very similar, I used it in two case :
a) when code seem more clear if it's in script, but in this case "more clear" is only a personal point of view
b) when script move or change more than 1 field
{code}
                <set field="displayFields" value="[facilityName]"/>
                <script value="if ('_NA_'.equals(parameters.ownerPartyId)){
                                 if ('N'.equals(parameters.showAll)) {
                                    parameters.put('ownerPartyId',' ');
                                 } else {
                                    parameters.remove('ownerPartyId');
                                    parameters.put('facilityTypeId','JuryLoc');
                                 }}"/>
{code}
it's possible to do it with <set> but, in this case the set field name will be not used.


It's a small enhancement, and I think it does not introduce some complexity in code and for user, be able to do same thing by two ways will not create problem or question.
                
> Add attributes value and type for script tag in screen, form. Default type is groovy and value can be a little script.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-4687
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4687
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Olivier Heintz
>            Priority: Minor
>         Attachments: OFBIZ-4687.patch
>
>
> this enhancement can be usefull for branch 20120209RemoveBsh
> and for trunk, to avoid very small groovy file

--
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] [Updated] (OFBIZ-4687) Add attributes value and type for script tag in screen, form. Default type is groovy and value can be a little script.

Posted by "Olivier Heintz (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-4687?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Heintz updated OFBIZ-4687:
----------------------------------

    Attachment: OFBIZ-4687_withExpression.patch

new patch with
where value is changed by expression and add test if expression startWith "groovy:"
                
> Add attributes value and type for script tag in screen, form. Default type is groovy and value can be a little script.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-4687
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4687
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Olivier Heintz
>            Priority: Minor
>         Attachments: OFBIZ-4687.patch, OFBIZ-4687_withExpression.patch
>
>
> this enhancement can be usefull for branch 20120209RemoveBsh
> and for trunk, to avoid very small groovy file

--
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] (OFBIZ-4687) Add attributes value and type for script tag in screen, form. Default type is groovy and value can be a little script.

Posted by "Adrian Crum (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-4687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206375#comment-13206375 ] 

Adrian Crum commented on OFBIZ-4687:
------------------------------------

I do not understand the need for this change when you can do the same thing in the <set> element.

Something I have suggested in the past is to give the <set> element a "from-expression" attribute where you can put UEL or Groovy expressions.

                
> Add attributes value and type for script tag in screen, form. Default type is groovy and value can be a little script.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-4687
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4687
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Olivier Heintz
>            Priority: Minor
>         Attachments: OFBIZ-4687.patch
>
>
> this enhancement can be usefull for branch 20120209RemoveBsh
> and for trunk, to avoid very small groovy file

--
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] (OFBIZ-4687) Add attributes value and type for script tag in screen, form. Default type is groovy and value can be a little script.

Posted by "Adrian Crum (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-4687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206387#comment-13206387 ] 

Adrian Crum commented on OFBIZ-4687:
------------------------------------

Understood. I would like to see the value attribute called expression, and eliminate the type attribute by using the "groovy:" expression prefix.
                
> Add attributes value and type for script tag in screen, form. Default type is groovy and value can be a little script.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-4687
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4687
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Olivier Heintz
>            Priority: Minor
>         Attachments: OFBIZ-4687.patch
>
>
> this enhancement can be usefull for branch 20120209RemoveBsh
> and for trunk, to avoid very small groovy file

--
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] [Updated] (OFBIZ-4687) Add attributes value and type for script tag in screen, form. Default type is groovy and value can be a little script.

Posted by "Olivier Heintz (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-4687?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Heintz updated OFBIZ-4687:
----------------------------------

    Attachment: OFBIZ-4687.patch
    
> Add attributes value and type for script tag in screen, form. Default type is groovy and value can be a little script.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-4687
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4687
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Olivier Heintz
>            Priority: Minor
>         Attachments: OFBIZ-4687.patch
>
>
> this enhancement can be usefull for branch 20120209RemoveBsh
> and for trunk, to avoid very small groovy file

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