<params>
A utility class for manipulating name-value pairs
lz.Param provides utilities for manipulating name-value pairs.
For example, lz.Param objects can be used to manage a name/value pairs for an
HTTP request.
<method name="sendData" args="action">
var d=canvas.datasets.dsSendData;
var p=new lz.Param();
p.addValue( "action", action, true);
p.addValue( "firstName", "Bob", true);
p.addValue( "lastName", "Jones", true);
p.addValue( "phone", "415-255-2392", true);
p.addValue( "email", "bob@jones.com", true);
d.setQueryString( p );
d.doRequest();
</method>
Methods
-
-
params.addObject(o : Object);
Adds a series of name/value pairs from an object
-
-
params.addValue(name : String, val : String, enc : Boolean);
Adds a value. Does not replace existing entries with the same name.
-
-
Returns a clone of this lz.Param. Argument is deprecated.
-
-
Get a list of all names, not necessarily in order
-
-
params.getValue(name : String);
-
-
params.getValues(name : String);
-
-
params.remove(name : String);
Remove specified value by name or all values if null
-
-
params.serialize(sep : String, delim : String, uriencode : Boolean);
Returns a string representation using the current separator and delimiter
-
-
params.setDelimiter(d : String);
Set delimiter string used between records in serialize();
-
-
params.setSeparator(s : String);
Set separator string used between name/value pairs in each record in
serialize();
-
-
params.setValue(name : String, val : String, enc : Boolean);
Sets a value. Replaces existing entries with the same name.
-
-
Returns a string representation using the current separator and delimiter
Class Methods
-
-
lz.params.parseQueryString(query);
Parse a URL query string, returns an object with key-value pairs