Class: urlParamAdapter

Oracle® JavaScript Extension Toolkit (JET)
5.0.0

E90577-01

.Router. urlParamAdapter

Version:
  • 5.0.0
Since:
  • 1.1.0
Module:
  • ojrouter
Url adapter used by the oj.Router to manage URL in the form of /index.html?root=book&book=chapter2. This adapter can be used if the urlPathAdapter doesn't meet the application's needs.
This adapter is well-suited for single-page applications whose entry point is always a single document, i.e., "index.html" which restores its router state from additional parameters. The router state is encoded as URL parameters and then restored after the page is loaded. This is ideal for applications which cannot handle multiple entry points, as recommended by urlPathAdapter.
There are two available URL adapters, this one and the urlPathAdapter.
To change the URL adapter, use the urlAdapter property.

Constructor

new urlParamAdapter()

See:
Example

Change the default URL adapter to urlParamAdapter instead of urlPathAdapter:

oj.Router.defaults['urlAdapter'] = new oj.Router.urlParamAdapter();