Class FcForEachLoopBean
- java.lang.Object
-
- de.xima.fc.workflow.designer.bean.nodes.FcForEachLoopBean
-
- All Implemented Interfaces:
IElementPropertiesBean<FcForEachLoopProps,WorkflowNode>
,INodePropertiesBean<FcForEachLoopProps>
,Serializable
@ViewScoped @Named public class FcForEachLoopBean extends Object implements INodePropertiesBean<FcForEachLoopProps>, Serializable
Bean for editing FORMCYCLEEWorkflowNodeType.FC_FOR_EACH_LOOP
nodes.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FcForEachLoopBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCsvFormatExampleString()
Sometimes, it is easier to understand the format by looking at an example.List<String>
getCsvFormatExampleValues()
Sometimes, it is easier to understand the format by looking at an example.EForEachLoopItemListSource
getItemSource()
Gets the source from which to obtain the items over which to iterate.void
prepareViewForElement(IElementPropInitParams<FcForEachLoopProps> params)
Called each time when the properties panel for a certain workflow element is loaded.IRetrieveElementPropsRetVal<FcForEachLoopProps>
retrieveCurrentProperties(FcForEachLoopProps storedModel)
Called each time the data that is currently being edited needs to be retrieved, and possibly persisted.void
setItemSource(EForEachLoopItemListSource newItemSource)
Sets the source from which to obtain the items over which to iterate.void
updateCurrentProperties(IElementUpdateCurrentPropsParams<FcForEachLoopProps> params)
Called each time when the data of the selected node was edited externally.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.xima.fc.interfaces.workflow.elements.IElementPropertiesBean
updateCurrentTask
-
-
-
-
Method Detail
-
getCsvFormatExampleString
public String getCsvFormatExampleString()
Sometimes, it is easier to understand the format by looking at an example.When the type item list source
CHARACTER_SEPARATED_VALUES
is selected: Gets a formatted string of values using the currently selectedformat
settings. When the string returned by this method is split into individual values using the current format settings, this results in the list ofexample values
.- Returns:
- The list of
example values
, formatted according to the current settings.
-
getCsvFormatExampleValues
public List<String> getCsvFormatExampleValues()
Sometimes, it is easier to understand the format by looking at an example.When the type item list source
CHARACTER_SEPARATED_VALUES
is selected: Gets a list of example values. Theexample string
is the formatted string, this method returns the values obtained when splitting that formatted string according to the currentformat
settings.- Returns:
- A list of sample values for illustrating the currently selected format.
-
getItemSource
public EForEachLoopItemListSource getItemSource()
Gets the source from which to obtain the items over which to iterate.- Returns:
- The source from which to obtain the items over which to iterate.
-
setItemSource
public void setItemSource(EForEachLoopItemListSource newItemSource)
Sets the source from which to obtain the items over which to iterate.- Parameters:
newItemSource
- The source from which to obtain the items over which to iterate.
-
prepareViewForElement
public void prepareViewForElement(IElementPropInitParams<FcForEachLoopProps> params) throws Exception
Description copied from interface:IElementPropertiesBean
Called each time when the properties panel for a certain workflow element is loaded. This method is passed the workflow element and the properties model, and should perform whatever initialization is necessary in order for the user to start editing the properties.- Specified by:
prepareViewForElement
in interfaceIElementPropertiesBean<FcForEachLoopProps,WorkflowNode>
- Parameters:
params
- The current element to be edited and its properties. You may store a reference to these, modify them, and return them whenIElementPropertiesBean.retrieveCurrentProperties(Object)
is called.- Throws:
Exception
- When the initialization failed. If an exception is thrown, the user is shown an error indicating that the properties cannot be edited.
-
retrieveCurrentProperties
public IRetrieveElementPropsRetVal<FcForEachLoopProps> retrieveCurrentProperties(FcForEachLoopProps storedModel)
Description copied from interface:IElementPropertiesBean
Called each time the data that is currently being edited needs to be retrieved, and possibly persisted. Usually this is called when the user switch to another workflow element, or when theNote, however, that you may not assume the editing process for the current workflow element is done. The data is sometimes retrieved while the user is still editing the properties, such as to sync the properties with the workflow design area. Do not perform any clean up work here. Use
PreDestroy
for cleanup.- Specified by:
retrieveCurrentProperties
in interfaceIElementPropertiesBean<FcForEachLoopProps,WorkflowNode>
- Specified by:
retrieveCurrentProperties
in interfaceINodePropertiesBean<FcForEachLoopProps>
- Parameters:
storedModel
- The same model that was passed toIElementPropertiesBean.prepareViewForElement(IElementPropInitParams)
. If you did not need to replace that model with another instance, you can just returned it. Conversely, if you did store the properties model in your bean, you may just return your stored value and ignore this parameter altogether.- Returns:
- The current properties that reflect the current user input. You may mutate and return the same object(s)
that were passed to
IElementPropertiesBean.prepareViewForElement(IElementPropInitParams)
.
-
updateCurrentProperties
public void updateCurrentProperties(IElementUpdateCurrentPropsParams<FcForEachLoopProps> params) throws Exception
Description copied from interface:IElementPropertiesBean
Called each time when the data of the selected node was edited externally. Normally this does not happen. This only happens when the element handler returned a custom client handler (seeIElementHandler.getJavaScript(boolean)
) that invoked an external custom params update from the flowchart. If this bean stored the data in a field duringIElementPropertiesBean.prepareViewForElement(IElementPropInitParams)
, it should update that field.- Specified by:
updateCurrentProperties
in interfaceIElementPropertiesBean<FcForEachLoopProps,WorkflowNode>
- Parameters:
params
- Params with the old and new data.- Throws:
Exception
- When the data could not be updated. This exception is caught and an error message is shown to the user.
-
-