mixinafPillow::PageMeta

afPillow::PageMeta

(Service) - Returns details about the Pillow page currently being rendered.

PageMeta objects may also be created by the Pages service.

contentType

Source

abstract MimeType contentType()

Returns the Content-Type produced by this page.

Returns PillowConfigIds.defaultContentType if it can not be determined.

eventMethods

Source

abstract Method[] eventMethods()

Returns all the event methods on the page.

eventUrl

Source

abstract Uri eventUrl(Obj event, Obj[]? eventContext := null)

Returns a client URL for a given event - use to create client side URIs to call the event.

event may be either a:

  • Str - the name of the event (*not* the name of the method)
  • Method - the event method itself
httpMethod

Source

abstract Str httpMethod()

Returns the HTTP method this page responds to.

isWelcomePage

Source

abstract Bool isWelcomePage()

Returns true if the page is a welcome page.

pageContext

Source

abstract Obj[] pageContext()

Returns the context used to initialise this page.

pageType

Source

abstract Type pageType()

Returns the page that this Meta object wraps.

pageUrl

Source

abstract Uri pageUrl()

Returns a client URL that can be used to render the given page. The URL takes into account:

  • Any welcome URL -> home page conversions
  • The context used to render this page
  • Any parent WebMods
pageUrlAbs

Source

abstract Uri pageUrlAbs()

Returns an absolute page URL that contains a scheme and host:

http://eggbox.fantomfactory.org/pods/afPillow/

Convenience for:

bedSheetServer.toAbsoluteUrl(pageMeta.pageUrl())

See afBedSheet::BedSheetServer.

redirect

Source

abstract HttpRedirect redirect()

Returns a HttpRedirect.movedTemporarily to this page.

redirectAfterPost

Source

abstract HttpRedirect redirectAfterPost()

Returns a HttpRedirect.afterPost to this page.

routesDisabled

Source

abstract Bool routesDisabled()

Returns true if BedSheet route generation has been disabled for this page.

withContext

Source

abstract PageMeta withContext(Obj[]? pageContext)

Returns a new PageMeta with the given page context.