OpenWGA 7.10 - TMLScript reference

Cookie
Method :

setValue(value[, encode])

On object Cookie
Usage Sets the value of a cookie and optionally encodes it.
Description

Since version 7.8.1 this method can be called with an optional encoder to encode the value

Possible encoders currently are

  • "hex" to convert the value to a hex string
  • "base64" to convert the value as base46 string
Parameters

value (String)

The value to be set

encode (String - optional) - since 7.8.1

Encodes the value with the specified encoder

Return value Since 7.8.1 this methods returns the Cookie object for further method chaining.
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • Content type events
Examples
WGA.Call.createCookie("my-cookie")
.setValue("some-value", "base64")
.write()