VL WEB - Material Design / error message highlighting

Please log all suggestions for improvements and enhancements to Visual LANSA here. Entries may be acknowledged and may be added to the list for possible inclusion in later releases of Visual LANSA.
Post Reply
Posts: 68
Joined: Thu Mar 24, 2016 5:31 am

VL WEB - Material Design / error message highlighting

Post by LANSAGuru » Tue Apr 30, 2019 1:46 am

This question is for the dev team.

1. There is no valid or error icon built in. You CAN yes the prompt icon for this, and this works fine unless you want to have a prompt and an error icon at the same time.

2. Validation integration using #com_onwer.validate is nice but all rules can not be simple rules and if you have a mix of simple and more complex rules now you are left with a mixed experience...that is some rules just pop up with in line messages on the fields, but others have to be put somewhere else in a message box and there is no connection to the input field in error and the message. This seems in-elegant to me.

I have some enhancement request suggestions which would help this situation

1. Add error icon support which would turn on when HasErrors is true
2. Expose the HasErrors property to be writeable (so I can set the field in error if a more complex rule was violated)
3. Add the ability to write a message to the error text under a field (like a simple rule validation check does)

I can emulate all of this now to route all error messages to the correct field and have error icon support and support complex messages by doing this

1. Do not use .validate at all
2. Make error messages look like this [field] text
3. Use the helper text area with appropriate color to route error messages to
4. Parse errors by field and then set the helper text
5. Also set the error icon if the field is in error

This gives the ability to highlight each field in error for all simple rules and complex rules.
You get the error icon (lose prompt icon if needed)
Follows the material design standard.

However, I would rather use the built in simple rules support in the repository as this is client side.
And then use the enhancements above to do this...

Then for server validation I can parse the error messages and then I can set HasErrors and route each message to set an error under the field (I tested and if you currently have helper text and get a client side error, the error overlays the helper text, so this works correctly). I would like a proper set error message like in the client side error support so I can use helper text and error messages without having to hand code it all on the fly.

Of course if all fields in error would route there error messages to the correct field after a server module call, then perhaps you would not necessarily need the above requests (except for the error icon support). My understanding is doing this for complex rules, like file lookups, as well as any errors set in triggers, would be quite complex to change. So the suggestions above are an interim approach which I think would satisfy some challenges I am facing.



Post Reply