Konrad Windszus created FELIX-4542:
--------------------------------------
Summary: Basic type validation for different types of the
Attribute Definitions (AD) within the metatype
Key: FELIX-4542
URL: https://issues.apache.org/jira/browse/FELIX-4542
Project: Felix
Issue Type: Improvement
Affects Versions: webconsole-4.2.2
Reporter: Konrad Windszus
The OSGi Compendium 4.3 $105.6.1 defines the following types for the AD elements
- String
- Long
- Double
- Float
- Integer
- Byte
- Char
- Boolean
- Short
Currently all except boolean are rendered by the configuration tab in the web
console as regular input fields (with type=text) with no further validation.
For example it is possible to enter a string for an attribute with type "Long".
There is no exception in the log but the value is not changed (because it had
the wrong type).
One option would be to switch to HTML5 which supports a lot more types OOTB
(http://www.w3schools.com/tags/att_input_type.asp) or use a library like
http://jqueryvalidation.org/documentation/.
For all numeric types the minimum and maximum should be set.
--
This message was sent by Atlassian JIRA
(v6.2#6252)