Package org.imixs.workflow.engine
Class TextForEachAdapter
- java.lang.Object
-
- org.imixs.workflow.engine.TextForEachAdapter
-
public class TextForEachAdapter extends Object
The TextForEachAdapter can be used to format text fragments with the 'for-each' tag. The adapter will iterate over the value list of a specified item.<for-each item="_partid"> Order-No: <itemvalue>_orderid</itemvalue> - Part ID: <itemvalue>_partid</itemvalue><br /> </for-each>
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
- Author:
- rsoika
-
-
Field Summary
Fields Modifier and Type Field Description protected jakarta.enterprise.event.Event<TextEvent>
textEvents
-
Constructor Summary
Constructors Constructor Description TextForEachAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onEvent(TextEvent event)
This method reacts on CDI events of the type TextEvent and parses a string for xml tag.
-
-
-
Field Detail
-
textEvents
@Inject protected jakarta.enterprise.event.Event<TextEvent> textEvents
-
-
Method Detail
-
onEvent
public void onEvent(@Observes @Priority(1990) TextEvent event)
This method reacts on CDI events of the type TextEvent and parses a string for xml tag. Those tags will be replaced with the corresponding system property value. The priority of the CDI event is set to (APPLICATION-10) to ensure that the for-each adapter is triggered before the TextItemValueAdapter
-
-