<- ReadMe.html || <- ../Functionality.html
CreateNewStoreActivity UI specification
Class name: CreateNewStoreActivity
Title: Create Store
| Widget label | Widget type | Widget name |
| password | text field | txtPassword |
| memorable date | text field | txtMemorableDate |
| confirm password | text field | txtConfirmPassword |
| confirm memorable date | text field | txtConfirmMemorableDate |
| create store | button | btnCreateStore |
The activity has a navigation bar at the bottom of the screen, with the following navigation bar items:
| icon position | icon name | item variable name |
| far left | exit | btnBack |
| far right | help | btnHelp |
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:
- 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".
-
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."
-
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".
-
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".
-
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.
-
If no error has been reported, the steps outlined below are carried out.
-
creates a DataField instance variable called field1, with the following values:
name = "A field name",
value = "A field value"
-
another DataField instance variable called field12 with the following values:
name = "A second field",
value = "A value for the second field"
-
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"
-
field1 and field2 are added to the dataEntry1 instance variable detailFields.
- createStore is called, in the DataLayer class, with the map of dataEntry1
-
This activity is popped off the activity stack, and then the app navigates to
ListEntriesActivity.