public class TextForEachAdapter extends Object
<for-each item="_partid">
Order-No: <itemvalue>_orderid</itemvalue> - Part ID: <itemvalue>_partid</itemvalue><br />
</for-each>
In this example, the for-each block will be executed for each single value of
the item '_partid'. Within the for-each block it is possible to access the
current value of the iteration as also any other values of the current
document. The result may look like in the following example:
Order-No: 111222 - Part ID: A123
Order-No: 111222 - Part ID: B456
In case the item contains an embedded list of child ItemCollections the content of the for-each block will be processed in the context for each embedded ItemCollection:
<for-each item="_orderitems">
<itemvalue>_orderid</itemvalue>: <itemvalue>_price</itemvalue>
</for-each>
The result may look like in the following example:
Order ID: A123: 50.55
Order ID: B456: 150.10
| Modifier and Type | Field and Description |
|---|---|
protected javax.enterprise.event.Event<TextEvent> |
textEvents |
| Constructor and Description |
|---|
TextForEachAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
onEvent(TextEvent event)
This method reacts on CDI events of the type TextEvent and parses a string
for xml tag
|
@Inject protected javax.enterprise.event.Event<TextEvent> textEvents
public void onEvent(@Observes @Priority(value=1990) TextEvent event)
The priority of the CDI event is set to (APPLICATION-10) to ensure that the for-each adapter is triggered before the TextItemValueAdapter
Copyright © 2006–2020 Imixs Software Solutions GmbH. All rights reserved.