private void onCleanDeviceClicked() {
   int result =
       Dialog.ask(
           Dialog.D_YES_NO,
           "Do you want to clean the device? This will clear all the locally stored child records and login information");
   if (result == Dialog.YES) {
     ((HomeController) controller).cleanAll();
     Dialog.alert("Device successfully cleaned");
     onLoginButtonClicked();
   }
 }
 protected void onSynchronizeClicked() {
   if (ConnectionFactory.isNotConnected()) {
     Dialog.ask(
         Dialog.D_OK,
         "Could not establish connection with host because all connectors are offline");
   } else if (!settings.isUserLoggedIn()) {
     int result = Dialog.ask(Dialog.D_OK_CANCEL, "You are not logged in.\n Press ok to  login.");
     if (result == Dialog.OK) {
       onLoginButtonClicked();
     }
   } else {
     ((HomeController) controller).synchronize();
   }
 }
 private void onNewChildClicked() {
   ((HomeController) controller).newChild();
 }
 private void onSearchClicked() {
   ((HomeController) controller).showSearch();
 }
 private void onViewChildrenClicked() {
   ((HomeController) controller).viewChildren();
 }
 protected void onLoginButtonClicked() {
   ((HomeController) controller).logIn();
 }