Interface: AppRequest

jrt.AppRequest

The app request object stored in jrt.Target#req when a target is requested.

Members

(nullable) formData :FormData

When the request is generated by submitting a form, this contains the form data.

Type:
  • FormData

(nullable) method :string

For page and dialog requests, this can be either "get" or "post" (it's null for action requests). The main difference is that GET requests include the request parameters in the hash URL, while POST requests don't. Request types "load" and "link" always have the GET method. The other request types ("button", "submit", "call" and "history") can use either method.

Type:
  • string

(non-null) params :Object.<!jrt.FormValue>

The request parameters. Note that links can only carry string parameters.

Type:

(nullable) redirect :string

For a "call" request to a page target, this contains the type of redirection taking place, or null if there is no redirection. This will be "request" when redirecting the request from another page request (while it was being processed). This will be "history" when the requested page's URL must replace the current page's URL in the browser history.

Type:
  • string

(nullable) source :jrt.Target

The page, dialog or action from where the request was generated.

Type:

(nullable) sourceElement :HTMLElement

The element that was activated to generate the request. This will be an A or AREA element for the "link" type, a BUTTON element for the "button" type, a FORM element for the "get" and "post" types, and null for all other types.

Type:
  • HTMLElement

(nullable) sourceView :jrt.TargetView

The page or dialog from where the request was generated.

Type:

(non-null) target :jrt.Target

The page, dialog or action that is the target of this request.

Type:

type :string

The type of app request. This can be one of the following:

  • "load": For the initial page request.
  • "link": For a request that follows a HTML link.
  • "button": For a link button request (a button with "button" type and formaction)
  • "submit": For a form submit.
  • "call": For a requested generated in code.
  • "history": For a browser history request.
Type:
  • string