<- ReadMe.html  ||  <- ../Functionality.html

CreateNewStoreActivity UI specification

Class name: CreateNewStoreActivity
Title: Create Store
Widget labelWidget typeWidget name
passwordtext fieldtxtPassword
memorable datetext fieldtxtMemorableDate
confirm passwordtext fieldtxtConfirmPassword
confirm memorable datetext fieldtxtConfirmMemorableDate
create storebuttonbtnCreateStore

The activity has a navigation bar at the bottom of the screen, with the following navigation bar items:

icon positionicon nameitem variable name
far leftexitbtnBack
far righthelpbtnHelp

CreateNewStoreActivity functionality

When the button btnBack is pressed, the activity is popped of the activity stack.

When the btnHelp button is pressed, the activity navigates to the HelpActivity, requesting that the asset file CreateNewStoreActivityHelp.html be displayed.

When the btnCreateStore is pressed, the following is carried out:

  1. The txtPassword field is checked to see if it has at least 8 characters, if not an error alert is displayed with the message "A password must have at least 8 characters".
  2. The txtMemorableDate field is checked that it is not empty. If it is empty an error dialog is displayed with the message "Please supply a date that is memorable to you."
  3. txtPassword and txtConfirmPassword are compared, if they do not match an error dialog is displayed with the message "The passwords do not match, please ensure they are the same".
  4. txtMemorableDate and txtConfirmMemorableDate are compared, if they do not match an error dialog is displayed with the message "The memorable dates do not match, please ensure they are the same".
  5. If errors have been displayed, the processing stops, allowing the user to decide what to do next: correct errors, or tap help or tap back.

  6. If no error has been reported, the steps outlined below are carried out.
  7. creates a DataField instance variable called field1, with the following values:
      name = "A field name",
      value = "A field value"
  8. another DataField instance variable called field12 with the following values:
      name = "A second field",
      value = "A value for the second field"
  9. creates a DataEntry instance variable called dataEntry1, with the following values:
      name = "A sample",
      notes = "These are some sample\nnotes for the sample",
      password = "apassword"
  10. field1 and field2 are added to the dataEntry1 instance variable detailFields.
  11. createStore is called, in the DataLayer class, with the map of dataEntry1
  12. This activity is popped off the activity stack, and then the app navigates to ListEntriesActivity.