OpenWGA 7.0 - TMLScript reference

WGA
Method :

urlBuilder([tmlContext], [url])

On object WGA
Usage Creates a WGA URLBuilder object to contruct and modify URLs
Description

The URLBuilder object is  a Java utility object which allows you to edit URLs in a structured way. It allows you to add/edit/delete query parameters or modify separated parts of the URL, like the host name.

On construction it takes an URL as parameter which it analyzes and stores internally. The parts of the URL may then be modified via the methods of the object. To retrieve the complete modified URL again as String use the method rebuild() or simply convert the object to a String.

The object returned here is of concrete class de.innovationgate.wgpublisher.webtml.utils.URLBuilder , but inherits all functionalities from class de.innovationgate.utils.URLBuilder, which is the base URL builder class from the WGAPI.

Parameters

tmlContext (TMLContext, optional):

A WebTML context which is used as application context for the URL to generate (for example to retrieve configurations about protocol ports to use). Defaults to the context of the running script if not specified.

If this argument is specified but argument "url" is omitted then the url builder will be initialized with the content URL pointing to this context document.

url (String, optional):

Some URL that you want the URLBuilder to modify. It may be an absolute URL or a relative one that will be complemented with the URL of the current request. Omit this parameter to use the URL of the current request entirely.

Return value WGA URLBuilder object storing the given URL data
Allowed in script types
  • WebTML pages and normal WebTML actions