
jQuery.sap.require("sap.m.MessageBox");
var HVICore = sap.ui.getCore();
var TableHeader = new sap.m.Label({ wrapping: true, design:sap.m.LabelDesign.Bold});

var busyDialog =  new sap.m.BusyDialog({text: oBundle.getText('Loading')});
var busyDialogGetData = new sap.m.BusyDialog({text: oBundle.getText('getting_data')});

var vehicleCount = 0;
var vehicleJSONArray = [];

var meterUnit = new  sap.m.ComboBox({
    layoutData: new sap.ui.layout.GridData({span: "L3 M6 S12"}),
    value:oBundle.getText("KM"),
    items:[ 
        // new sap.ui.core.ListItem({key:"3",text:oBundle.getText("Hours")}),    
        new sap.ui.core.ListItem({key:"1",text:oBundle.getText("KM")}),
        new sap.ui.core.ListItem({key:"2",text:oBundle.getText("Miles")}),
    ]}).addEventDelegate({onAfterRendering: function(e) {meterUnit.$().find("input").attr("readonly", true);}});



function textFieldValidation(textField,value){
    
    if (value.trim() == "") {                            
       textField.setValueState("Error");
       textField.setValueStateText("Required");          
       return true;
   }else{
       textField.setValueState("None");         
       return false;
   }
}

var standartBusyDialog = new sap.m.BusyDialog({
    title: oBundle.getText('Uploading'),
    text: '',
    showCancelButton: false,
    close: function (oEvent) {
}});
