on 07-07-2015 8:11 AM
Hi All,
I have input field in a view 2 and validation for the same has been written in the change event.So lets say user inputs some wrong input and then without clicking enter or leaving focus he click another button to move to view 1.so now the view 1 is displayed and popup for the validation is also is displayed which is odd.
so how to stop or end any kind of process happening in view 2 and then proceed to view 1 ? in this case the change event functionality.
@ robin @ santhosh @maksim Thats is the right way to validate but the end user is not ok with it.His point of view its like in view 2 he entered some value by mistake and now he wants to move to view 1 but he sees the "no data found" popup in view 1 which is strange for him.
I tired the detachchange too its not working ..
is there any other solution possible for this
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If he want's it like that, then there should be a 'reset' button or something, changing everything back to the original state.
Navigating to another view without validating wrong input is just plain wrong. It might maybe help this particular user, but other users will be confused as to why their data is not being saved when navigating to another view
there is a clearlly issue with navigation condition, it should not happen if validation fails
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I believe the user should not go to view 1 in the first place; if he entered something wrong, then the navigation should be cancelled and the validation popup should be shown.
Why do you want to allow users to navigate away from the screen if they entered invalid input?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Precisely. if we do it right. We should stop where the error happens. Otherwise, user is going to be confused
Hi Thivi,
There is a property "valueLiveUpdate" for sap.m.Input.
Definition - Indicates when the value gets updated with the user changes: At each keystroke (true) or first when the user presses enter or tabs out (false).
Try to user it
Hope this will help.
Regards,
Abhijeet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
call validation method. and the validation is fine then do navigation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use detachChange event before processing that view.
JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.m.InputBase
On press event of that button through which you are navigating to another view, get the ID of that input field and after that write this.
oInput.detachChange();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.