Class LocalizedComponentDisplayValue
java.lang.Object
ch.tocco.nice2.model.form.impl.entity.LocalizedComponentDisplayValue
- All Implemented Interfaces:
DisplayValue
Display value evaluating a label of a localized field for a component
depending on configuration parameters in the form xml.
-
Constructor Summary
ConstructorsConstructorDescriptionLocalizedComponentDisplayValue(DisplayValue standardDisplay, DataComponent component) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn if this display-value can be evaluated.evaluate()Evaluate the data-in the current-context.Get the raw-data.
-
Constructor Details
-
Method Details
-
getRawData
Description copied from interface:DisplayValueGet the raw-data. This is a string-representation which should indicate what get evaluated. For example in the case of TextResource this would be the key to the resource.
It should be used for debug and logs only. It should never be used to actually get the value to display.- Specified by:
getRawDatain interfaceDisplayValue- Returns:
- the value, non-null. can be empty
-
evaluate
Description copied from interface:DisplayValueEvaluate the data-in the current-context.- Specified by:
evaluatein interfaceDisplayValue- Returns:
- the evaluate-result, ready to display
-
canEvaluate
public boolean canEvaluate()Description copied from interface:DisplayValueReturn if this display-value can be evaluated. If it cannot, theDisplayValue.evaluate()-Method still has to return a string.
Because this is 'friendly' asking the system if this display value exists, an implementaition may reports this as a value which is optional. For example. The Textresoure-System will add the display-value to the optional-list if this call is made.
This behind-scenes-notification is not obvious. So maybe this method should be renamed or replaced.- Specified by:
canEvaluatein interfaceDisplayValue- Returns:
- true/false
-