Class: AddressWidget

XV. AddressWidget

Contains a set of fittable rows made up of controls for inputting and viewing addresses, including the popup for adding or editing them.
Derived from enyo.FittableRows.

new AddressWidget()

Source:

Extends

  • enyo.FittableRows

Methods

countryChanged()

When the country is changed we want to both do the typical event (to update the model) but also set the country of the state, which will limit its options.
Source:

done()

Closes the editor popup and saves the address immediately. Note that we don't typically wait for the user to save from the workspace for address changes to get saved to the database.
Source:

edit()

Opens the editor popup and creates a new address model if necessary.
Source:

editButtonKeyUp()

Source:
To Do:
  • Document the editButtonKeyUp method.

editorHidden()

Source:
To Do:
  • Document the editorHidden method.

inputChanged()

Triggered by a change to any one of the fields inside the address. Updates the model that backs this kind and signals an event with the updated model as the payload.
Source:

keyUp()

Listens for the enter key
Source:

mapTap()

Source:

notify()

Ask a question to the workspace container
Source:

pickerTapped()

Source:
To Do:
  • Document the pickerTapped method.

saveAddress()

Saves the address, taking care of the complicated business logic of checking to see if the address is in use anywhere else, and, if it is, asking the user if he wants to update them all, or just this one.
Source:
Opens up the search screen for addresses. Restricts on account if this widget has been account-restricted.
Source:

searchButtonKeyUp()

Source:
To Do:
  • Document the searchButtonKeyUp method.

setValue()

Source:
To Do:
  • Document the setValue method.

valueChanged()

Set the contents of the subcomponents based on the value of the model. Note that we pass through the options object, which might have silent:true as an attribute.
Source: