Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
-
Pulsar
-
Platform sprint 124
Description
Currently, org.hippoecm.addon.workflow.WorkflowManagerPluginTest#workflowCategoryIsUsedAsMenu fails. This is caused by "plugin-test" not being a present key in a ResourceBundleModel. The ResourceBundleModel replaced StringResourceModel which had support for 'default value' in case the key cannot be found.
My suggestion is :
1) Add a constructor for ResourceBundleModel with extra argument 'String defaultValue' and return this defaultValue (even if null) in case the key is missing
2) when the key is missing and the constructor without 'defaultValue' is used, return "?" + key + "?"
If the above is done, in MenuButton#MenuButton
new ResourceBundleModel("hippo:workflows", name)
with
new ResourceBundleModel("hippo:workflows", name, name)
(where last argument is the defaultValue)
Apart from this, we need to check other usages of ResourceBundleModel : They replaced the StringResourceModel. Should they also use the constructor with defaultValue instead?