Skip to main content

CotomyPageController

Base class for page-level orchestration and form management.

Static Methods

MethodDescription
set(type)Initializes and registers a page controller instance.
get()Returns the current controller instance.

Properties

PropertyTypeDescription
bodyCotomyElementRoot document body element.

Protected Members (for subclassing)

MemberDescription
defaultBindNameGeneratorGets/sets the default bind name generator used by forms/renderers on the page.
setForm(form)Registers and initializes a form.
getForm(id, type?)Retrieves a registered form by id.
formsList of registered forms.
restoreAsync()Reloads forms on BFCache restoration or back_forward navigation restoration.
initializeAsync()Initialization hook for subclasses.
urlCotomyUrl for the current location.

During initialization, Cotomy listens for pageshow. It calls restoreAsync() when pageshow.persisted is true or when the current navigation entry reports type === "back_forward".