| Summary: | Central Input Validation derived from config | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Ivan Motsch <ivan.motsch> |
| Component: | Scout | Assignee: | Project Inbox <scout.core-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | Flags: | mvi:
juno+
|
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | All | ||
| See Also: |
https://bugs.eclipse.org/bugs/show_bug.cgi?id=353087 https://bugs.eclipse.org/bugs/show_bug.cgi?id=370123 |
||
| Whiteboard: | |||
|
Description
Ivan Motsch
Base concept is designed and implemented:
There is a new annotation "ValidationRule" that is added to all getConfigured methods on form fields that influence validation. Can also be custom ones.
For example the AbstractStringField has such an annotation at
@ValidationRule(ValidationRule.MAX_LENGTH)
getConfiguredMaxLength
The sdk will detect this and add code to the form field data (shared area).
The serve side may override the ServiceTunnelServlet.filterInbound method and perform all the default checks with 3 lines of code (central input validation):
if(obj instanceof AbstractFormData){
new DefaultFormDataValidator((AbstractFormData)obj).validate();
}
So far the runtime framework part is done, the sdk part is in development.
I updated the javadoc in ServiceTunnelServlet to match the current implementation. What is missing for Scout SDK? Some code is already generated for input validation in the formdata. Please close this ticket and create a ticket for Scout SDK with the desired features. sdk part implemented Bug closed, shipped with 3.8.0 (Juno) |