dw.web
Class HttpParameter
![](https://sfcclearning.com/infocenter/DWAPI/scriptapi/html/api/images/inherit.gif.pagespeed.ce.4vPrGmNumQ.gif)
Represents an HTTP parameter.
Properties
booleanValue
:
boolean
(Read Only)
The value of the current HttpParameter attribute as a boolean. If
there is more than one value defined, only the first one is returned. For an
undefined attribute it returns null.
dateValue
:
Date
(Read Only)
The value of the current HttpParameter attribute as a date. If
there is more than one value defined, only the first one is returned. For
an undefined attribute and if attribute is not a date it return null.
doubleValue
:
Number
(Read Only)
The value of the current HttpParameter attribute as a number. If
there is more than one value defined, only the first one is returned. For
an undefined attribute it returns 0.0.
empty
:
boolean
(Read Only)
Identifies if there is a value for the http parameter attribute
and whether the value is empty.
A value is treated as empty if it's not blank.
intValue
:
Number
(Read Only)
The value of the current HttpParameter attribute as int. If there
is more than one value defined, only the first one is returned. For an
undefined attribute it returns null.
rawValue
:
String
(Read Only)
The raw value for this HttpParameter instance.
The raw value is the not trimmed String value of this HTTP parameter.
If there is more than one value defined, only the first one is returned. For an
undefined attribute the method returns a null.
rawValues
:
Collection
(Read Only)
A Collection of all raw values for this HTTP parameter.
The raw value is the not trimmed String value of this HTTP parameter.
stringValue
:
String
(Read Only)
The value of the current HttpParameter attribute. If there is
more than one value defined, only the first one is returned. For an
undefined attribute the method returns a null.
stringValues
:
Collection
(Read Only)
A Collection of all defined values for this HTTP parameter.
submitted
:
boolean
(Read Only)
Identifies if the parameter was submitted. This is equivalent to the
check, whether the parameter has a value.
value
:
String
(Read Only)
The value of the current HttpParameter attribute. If there is
more than one value defined, only the first one is returned. For an
undefined attribute the method returns null.
values
:
Collection
(Read Only)
A Collection of all defined values for this current HTTP parameter.
Constructor Summary
This class does not have a constructor, so you cannot create it directly.
Method Summary
containsStringValue(value
:
String)
:
boolean
Identifies if the given value is part of the actual values.
getBooleanValue()
:
boolean
Returns the value of the current HttpParameter attribute as a boolean.
getBooleanValue(defaultValue
:
boolean)
:
boolean
Returns the value of the current HttpParameter attribute as a boolean.
getDateValue()
:
Date
Returns the value of the current HttpParameter attribute as a date.
getDateValue(defaultValue
:
Date)
:
Date
Returns the value of the current HttpParameter attribute as a date.
getDoubleValue()
:
Number
Returns the value of the current HttpParameter attribute as a number.
getDoubleValue(defaultValue
:
Number)
:
Number
Returns the value of the current HttpParameter attribute as a number.
getIntValue()
:
Number
Returns the value of the current HttpParameter attribute as int.
getIntValue(defaultValue
:
Number)
:
Number
Returns the value of the current HttpParameter attribute as an integer.
getRawValue()
:
String
Returns the raw value for this HttpParameter instance.
getRawValues()
:
Collection
Returns a Collection of all raw values for this HTTP parameter.
getStringValue()
:
String
Returns the value of the current HttpParameter attribute.
getStringValue(defaultValue
:
String)
:
String
Returns the value of the current HttpParameter attribute.
getStringValues()
:
Collection
Returns a Collection of all defined values for this HTTP parameter.
getValues()
:
Collection
Returns a Collection of all defined values for this current HTTP parameter.
isChecked(value
:
String)
:
boolean
Identifies if the given String is an actual value of this http parameter.
isEmpty()
:
boolean
Identifies if there is a value for the http parameter attribute and whether the value is empty.
isSubmitted()
:
boolean
Identifies if the parameter was submitted.
Methods inherited from class
Object
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values
Method Detail
containsStringValue
containsStringValue(value
:
String)
:
boolean
Identifies if the given value is part of the actual values.
Parameters:
value
-
the value to check.
Returns:
true if the value is among the actual values, false otherwise.
getBooleanValue
getBooleanValue()
:
boolean
Returns the value of the current HttpParameter attribute as a boolean. If
there is more than one value defined, only the first one is returned. For an
undefined attribute it returns null.
Returns:
the actual value as a boolean or null of no value is available.
getBooleanValue
getBooleanValue(defaultValue
:
boolean)
:
boolean
Returns the value of the current HttpParameter attribute as a boolean. If there
is more than one value defined, only the first one is returned. For an
undefined attribute it returns the given default value.
Parameters:
defaultValue
-
the default value to use.
Returns:
the value of the parameter or the default value if empty.
getDateValue
getDateValue()
:
Date
Returns the value of the current HttpParameter attribute as a date. If
there is more than one value defined, only the first one is returned. For
an undefined attribute and if attribute is not a date it return null.
Returns:
the actual value as date or null if empty.
getDateValue
Returns the value of the current HttpParameter attribute as a date. If
there is more than one value defined, only the first one is returned. For
an undefined attribute it returns the given default value and if
the attributes is not a date it returns null.
Parameters:
defaultValue
-
the default value to use.
Returns:
the data value of the attribute or the default value if empty
getDoubleValue
getDoubleValue()
:
Number
Returns the value of the current HttpParameter attribute as a number. If
there is more than one value defined, only the first one is returned. For
an undefined attribute it returns 0.0.
Returns:
the actual value as double or null if the parameter has no value.
getDoubleValue
Returns the value of the current HttpParameter attribute as a number. If
there is more than one value defined, only the first one is returned. For
an undefined attribute it returns the given default value.
Parameters:
defaultValue
-
the default value to use.
Returns:
the actual value as double or the default value if empty.
getIntValue
getIntValue()
:
Number
Returns the value of the current HttpParameter attribute as int. If there
is more than one value defined, only the first one is returned. For an
undefined attribute it returns null.
Returns:
the actual value as an integer or null of no value is available.
getIntValue
Returns the value of the current HttpParameter attribute as an integer. If there
is more than one value defined, only the first one is returned. For an
undefined attribute it returns the given default value.
Parameters:
defaultValue
-
the default value to use.
Returns:
the value of the parameter or the default value if empty.
getRawValue
getRawValue()
:
String
Returns the raw value for this HttpParameter instance.
The raw value is the not trimmed String value of this HTTP parameter.
If there is more than one value defined, only the first one is returned. For an
undefined attribute the method returns a null.
Returns:
the actual value or null.
See Also:
getRawValues
getRawValues()
:
Collection
Returns a Collection of all raw values for this HTTP parameter.
The raw value is the not trimmed String value of this HTTP parameter.
Returns:
the raw values as a Collection of String, might be empty
See Also:
getStringValue
getStringValue()
:
String
Returns the value of the current HttpParameter attribute. If there is
more than one value defined, only the first one is returned. For an
undefined attribute the method returns a null.
Returns:
the actual value or null.
getStringValue
Returns the value of the current HttpParameter attribute. If there is
more than one value defined, only the first one is returned. For an
undefined attribute the method returns the given default value.
Parameters:
defaultValue
-
the default value to use.
Returns:
the actual value or the default value.
getStringValues
getStringValues()
:
Collection
Returns a Collection of all defined values for this HTTP parameter.
Returns:
the actual values as Collection.
getValue
getValue()
:
String
Returns the value of the current HttpParameter attribute. If there is
more than one value defined, only the first one is returned. For an
undefined attribute the method returns null.
Returns:
the actual value or null.
getValues
getValues()
:
Collection
Returns a Collection of all defined values for this current HTTP parameter.
Returns:
the actual values as Collection.
See Also:
isChecked
isChecked(value
:
String)
:
boolean
Identifies if the given String is an actual value of this http parameter.
Parameters:
value
-
the value to check.
Returns:
true if the value is among the actual values, false otherwise.
isEmpty
isEmpty()
:
boolean
Identifies if there is a value for the http parameter attribute
and whether the value is empty.
A value is treated as empty if it's not blank.
Returns:
true if a value is empty, false otherwise.
isSubmitted
isSubmitted()
:
boolean
Identifies if the parameter was submitted. This is equivalent to the
check, whether the parameter has a value.
Returns:
true if a value is there, false otherwise.
toString
toString()
:
String
Returns the value of the current HttpParameter attribute. If there is
more than one value defined, only the first one is returned. For an
undefined attribute the method returns an empty string.
Returns:
the actual value or an empty String.