Arun,
Are you working with mock data ?
var page1 = new sap.m.Page("page1", {
title: "Initial Page",
content : new sap.m.Button({ // content is just one Button
text : "login",
press: function() {
//put the validation logic here
// when button is pressed, a validation happens against the values input by user with the hard coded value and checks true or false..
//if successful navigate to second page
app.to("page2");
}
})
});