-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List parameter type #316
Comments
Possible design: "secret" = {
default = <somevalue|dataType depends on type>
name = <somename|string>
type = <sometype|string>
secret = <issecret|boolean>
} The problem can be seen as that between native types (int, string etc.) and complex types (list, set etc.). For complex types such as lists, we can make the key type = {
name = <somecomplextype|string>
# metadata can be specific to each complex type. This example is for lists.
# metadata can be optional or mandatory based on the type. For example we don't
# need it for native types.
metadata = {
# I was thinking of keeping types to a single level for now.
# Do we also need to support list of lists?
# I think we can do that as well (recursively). Writing adaptors (see below) might get harder.
type = <somenativetype|string>
adaptor = {
# dynamic adaptors can specify the name of a class
type = <dynamic or static|string>
# we can implement different adaptors like LDAPListAdaptor and StaticListAdaptor
# that parse the values based on this. For the frontend the values will always be static.
provider = <fqdn of class|String> or <list of values|List[type]>
config = { # can be optional
// some config that the class may need
}
}
}
} Does this look too complex? Suggestions? |
I like it. I would prefer however, to just have a provider and not a type. Then we can have LDAP providers, static providers, etc. Here's how we could define a drop down single element selection list:
I still don't like that |
Problem
Sometimes you want to predefine which values a user can select for a parameter.
Solution
Introduce a list parameter type which holds predefined values the user can select. The front-end should then render a drop down / option select box. Any value that is not in the list will not be accepted from the back-end.
The text was updated successfully, but these errors were encountered: