[ 
https://issues.apache.org/jira/browse/OFBIZ-1968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12634416#action_12634416
 ] 

jacques.le.roux edited comment on OFBIZ-1968 at 9/25/08 2:34 AM:
-----------------------------------------------------------------

Sorry for the edit, I shall have used my own advices ;) 
Hi Jacopo,

Simply put \{code\} around your code when your paste it. The little blue button 
at right allows you to check/modify.
It's the same syntax than WIki Markup in Confluence BTW

{code}
// Example of a simple "updateProduct" CRUD-like method
product = findOne([productId: parameters.productId]);
if (product) { 
    setNonPkFields(parameters, product); product.store();
} else { 
    addError("Product with ID [" + parameters.productId + "] not found."); 
}
checkErrors();
{code}

Enjoy :o)

      was (Author: jacques.le.roux):
    Hi Jacopo,

Simply put {code} around when your paste your code, the blue button at right 
allows you to check/modify

{code}
// Example of a simple "updateProduct" CRUD-like method
product = findOne([productId: parameters.productId]);
if (product) { 
    setNonPkFields(parameters, product); product.store();
} else { 
    addError("Product with ID [" + parameters.productId + "] not found."); 
}
checkErrors();
{code}

Enjoy :o)
  
> Enrich Groovy integration with Ofbiz framework
> ----------------------------------------------
>
>                 Key: OFBIZ-1968
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1968
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Anil K Patel
>            Priority: Minor
>
> Enrich Groovy integration with Ofbiz framework in order to bring goodies of 
> Minilang to Groovy scripts. Start with simple things like use 
> findByPrimaryKey in groovy scripts without having to prefix it with delegator 
> and then automatically find values for primary key fields from environment if 
> they are not explicitly passed in the call. Later other similar goodies of 
> minilang can be added.
> Use Groovy to add DSL where possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to