Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Panel

(info) NOTE: The reference information for the simple-map-processor has been moved to annotations in the http://ofbiz.apache.org/dtds/simple-methods.xsd file. The idea is to now to use an XML completion tool in development. If you are interested by this issue take a look at https://issues.apache.org/jira/browse/OFBIZ-571

As static documentation you may find a simple-methods.html generated file in attachments. This file may be out of date but with the attached simple-methods.xsl file you are able to generate an updated file. In such case please feel free to put a comment below in order to let us know, thanks.

...

Panel

(info) NOTE: The reference information for simple-method has been moved to annotations in the http://ofbiz.apache.org/dtds/simple-methods.xsd file. The idea is to now to use an XML completion tool in development. If you are interested by this issue take a look at https://issues.apache.org/jira/browse/OFBIZ-571

As static documentation you may find a simple-methods.html generated file in attachments with reference information. This file may be out of date but with the also attached simple-methods.xsl file you are able to generate an updated file. In such case please feel free to put a comment below in order to let us know about that, thanks.

...

You should use the "." (dot) syntax to access Map members (the old map/field syntax is deprecated since 2009). For example if you specify the attribute field="product.productName" it will reference the productName member of the productMap. This would be the same as specifying map="product" field="productName". Note that this is, of course, more flexible than a field/map combination because the Map structure can be multiple levels deep. For example if you have used the attribute field="products.widget.productName" it will reference the productName in the widget Map which is in the products Map.

Wiki MarkupThe "\[\]" (square-brace) syntax can be used to access list elements. For example you can specify the attribute field="products\[0\].productName"and it will reference the productName of the first (position zero) element in the products List. To make this more useful you can pull a list index from the environment using something like field="products\[$\{currentIndex\}\].productName".unmigrated-wiki-markup

There are two extensions to the \ [\] syntax that can be used when referring to an environment location that is the target of an operation. If you do not include a number between the square braces the value will be put at the end of the list. If you put a "+" (plus sign) in front of the number between the square braces (ie: \ [+2\]) it will insert the value before that position in the list instead of replacing the value at that location. For example, specifying \ [+0\] would insert the value at the beginning of the list.

Wiki MarkupIn fact, you can use the $\{\} syntax to substitute any string or other value at any location in a field or other string constant. So, you could even reference a Map member named in some other environment variable. For example you could use field="products\[$\{currentIndex\}\].productName".

Okay, enough of the general stuff, you may find in the XSD file descriptions of the available operations. Here is simply a categorized list of them.

...

map-to-map
field-to-list
list-to-list
order-map-list
set
string-append
string-to-list
to-string
clear-field
first-from-list

All operations in red below have been be replaced by the set operation
field-to-field (deprecated, do not use anymore)
env-to-env (deprecated, do not use anymore)
env-to-field (deprecated, do not use anymore)
field-to-env (deprecated, do not use anymore)
string-to-field (deprecated, do not use anymore)

...

Control Operations

iterate
iterate-map
loop
first-from-list

...