In order for my LCA to work the user needs to define some settings as a first step to be able to properly use the app.
I was thinking of using DOM for that but wondering how my DOM settings definition could look like:
- Use a single section with fields settings name and settings value, so a single setting is a single instance of that dom definition, and all the instances (settings) are created when installing the dom module (if not yet existing). Sort of a list of "environment variables" where all settings are of type string
- Or use a definition where each fielddescriptor represents a setting and the instance of the definition contains all the settings. And potentially you could add multiple instances like for DEV/STAGE/PROD and choose which one is the active setting configuration
From the LCA perspective is there a way, if no settings are configured, to show the settings configuration page, or highlight that settings still need to be configured?
Hi,
I think out of the two options, the second one is the best, as it is less error-prone and you also give yourself the possibility to not only have a string setting but also go for a boolean, an enum value or a DateTime value.
With the first option, I assume you would work with a kind of Key-ValuePairs (string-string), you have a small advantage in that you can change a single setting instead of having to open a form with all settings at once.
In terms of indicating which settings still need to be configured, I think both options can do that. With the first option, you can do conditional formatting and apply a different colour if a value is empty.
But also in the other (in my opinion) more robust second option, you could do this, by for example choosing a certain default value ("Undefined" for a string / the enum "Undefined" in case of an enum ... ) and then doing conditional formatting on that default value. Only for a boolean that would be less convenient, I guess.
With an ad hoc data source, you could also make a GQI query that returns the settings that still need to be configured, so that would also give you some possibility to nicely show the user that they should apply the settings first.
Kind regards,
Joachim