on 07-02-2014 11:02 AM
I have validation function that I have for when a user inputs a string into an int only table, in my validation function i have a separate model that has a true or false flag, sets the error flag to true if the user inputted a string or something
validateNumber: function(oEvent){ | |
var oInput = oEvent.getSource(); | |
var oID = oInput.getValue( ); | |
if(isNaN(oID)){ | |
oInput.setValueState(sap.ui.core.ValueState.Error); var oModel2 = new myJSONModel; oModel2 = sap.ui.getCore().getModel('errorModel'); var oData2 = oModel2.getData(); alert(oData2.error); oData2 = {error:true}; alert(oData2.error); oModel2.setData(oData2) |
and sets it to false if the valuestate is success, but I just realised that if one cell has a string in it and then they type an int into another the flag will be set to true even though it should still be false.
This flag stops a user from saving their new entries on the table if the error flag is true
HI Stam
Here is an example
Enter a non number to the cell like 'abc' will have the button disabled.
-D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.