Name

params (LzParam) — A utility class for manipulating name-value pairs

Synopsis

LZX: params
JavaScript: LzParam
Type: Class
Access: private
Topic: LFC.Data
Declared in: WEB-INF/lps/lfc/data/LzParam.lzs

Description

LzParam provide utilities for manipulating name-value pairs. For example, LzParam 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 LzParam();
         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", "[email protected]", true);
         d.setQueryString( p );
         d.doRequest();
     </method>
 
 

Development Note

LzParam objects hold onto parameters (name/value pairs) and provide methods and utilities to reserialize them. They are used whenever case matters for keys or parameter names (objects don't work here...)

Superclass Chain

node (LzNode) » params (LzParam)

Known Subclasses

Details

Properties (2)

dlm
<attribute name="dlm" />
public var dlm = &;
sep
<attribute name="sep" />
public var sep = =;

Setters (1)

Setters for virtual properties, to be used with setAttribute. A setter may or may not have a corresponding getter method; consult the Methods list in this section.

$hasdefaultattrs

Methods (15)

addObject()
<method name="addObject" args="o" />
public function addObject(o : Object);
Adds a series of name/value pairs from an object
addValue()
<method name="addValue" args="name, val, enc" />
public function addValue(name : String, val : String, enc : Boolean);
Adds a value. Does not replace existing entries with the same name.
clone()
<method name="clone" args="o" />
public function clone(o) : LzParam;
Returns a clone of this LzParam
construct()
<method name="construct" args="parent, args" />
private function construct(parent, args);
createChildren()
<method name="createChildren" args="children" />
private function createChildren(children);
findKey()
<method name="findKey" args="name" />
private function findKey(name);
getNames()
<method name="getNames" />
public function getNames();
Get a list of all names, not necessarily in order
getValue()
<method name="getValue" args="name" />
public function getValue(name : String);
Get a value by name
getValueNoCase()
<method name="getValueNoCase" args="name" />
public function getValueNoCase(name : String);
Get a value by name irrespective of case.
parseQueryString()
<method name="parseQueryString" args="query" />
public function parseQueryString(query) : Object;
Parse a URL query string, returns an object with key-value pairs
remove()
<method name="remove" args="name" />
public function remove(name : String);
Remove specified value by name or all values if null
serialize()
<method name="serialize" args="sep, delim, uriencode" />
public function serialize(sep : String, delim : String, uriencode : Boolean);
Returns a string representation using the current separator and delimiter
setDelimiter()
<method name="setDelimiter" args="d" />
public function setDelimiter(d : String) : String;
Set delimiter string used between records in serialize();
setSeparator()
<method name="setSeparator" args="s" />
public function setSeparator(s : String);
Set separator string used between name/value pairs in each record in serialize();
setValue()
<method name="setValue" args="name, val, enc" />
public function setValue(name : String, val : String, enc : Boolean);
Sets a value. Replaces existing entries with the same name.

Prototype Properties (1)

toString
<attribute name="toString" />
private var toString;

LZX Synopsis

<class name="LzParam" extends=" LzNode ">
  <attribute name=" dlm " />
  <attribute name=" sep " />
  <method name=" addObject " args="o" />
  <method name=" addValue " args="name, val, enc" />
  <method name=" clone " args="o" />
  <method name=" construct " args="parent, args" />
  <method name=" createChildren " args="children" />
  <method name=" findKey " args="name" />
  <method name=" getNames " />
  <method name=" getValue " args="name" />
  <method name=" getValueNoCase " args="name" />
  <method name=" parseQueryString " args="query" />
  <method name=" remove " args="name" />
  <method name=" serialize " args="sep, delim, uriencode" />
  <method name=" setDelimiter " args="d" />
  <method name=" setSeparator " args="s" />
  <method name=" setValue " args="name, val, enc" />
</class>

JavaScript Synopsis

private LzParam extends  LzNode  {
  public var dlm  = &;
  public var sep  = =;
  prototype public function addObject (o : Object);
  prototype public function addValue (name : String, val : String, enc : Boolean);
  prototype public function clone (o) : LzParam;
  prototype private function construct (parent, args);
  prototype private function createChildren (children);
  prototype private function findKey (name);
  prototype public function getNames ();
  prototype public function getValue (name : String);
  prototype public function getValueNoCase (name : String);
  prototype public function parseQueryString (query) : Object;
  prototype public function remove (name : String);
  prototype public function serialize (sep : String, delim : String, uriencode : Boolean);
  prototype public function setDelimiter (d : String) : String;
  prototype public function setSeparator (s : String);
  prototype public function setValue (name : String, val : String, enc : Boolean);
  prototype private var toString ;
}