on 02-06-2014 9:57 AM
Hi Experts,
I need to validate the input fields in SAPUI5. I know the JavaScript view. but I need to validate the input fields using XML code. I need to write the code in view.xml file using XML code. If any error occur, the input field become red color bordered.
Any possible solution would be accepted gratefully.
Thanks & Regards,
Arindam Samanta.
Hi Arindam,
You cannot define any functions in XML Views. The editor itself provides a controller.js file whenever you try to create a view, whether it is XML, JavaScript or HTML view, because here the logic can be implemented in JS files only.
You can a call specific function defined in your controller.js to your XML Views, Example already shared by Angel Puertas.
Regards,
Sharique
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arindam,
Try this:
<TextField liveChange="validateFunction"/>
And create validateFunction on your controller.
Kind regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.