1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0//EN">
6 <style type=
"text/css">
9 font-family: verdana
, sans-serif
;
29 text-decoration:underline
;
34 text-decoration: none
;
47 border-bottom-width:1px;
48 border-bottom-style:dotted
;
64 <table width=
"90%" border=
"0" cellspacing=
"1" cellpadding=
"5">
67 <big><tt>Global.helma.Html.isSelected
(value,
selectedValue)
</tt></big><br>
73 Static helper method used in helma.Html.checkBox
74 and helma.Html.dropDown to check if a current value
75 matches against one or more selected values passed
79 <li><b>Parameter
</b> <code>{String}
</code>:
<br/>
80 value The current value to check
<li><b>Parameter
</b> <code>{String|Array}
</code>:
<br/>
81 selectedValue Either a single value to check against the current value, or an array containing values.
82 <li><b>Returns
</b><br>
83 True in case the value is among the selected values, false otherwise
94 <table width=
"90%" border=
"0" cellspacing=
"1" cellpadding=
"5">
96 <td>Sourcecode in /root/helma-
1.6.1/modules/helma/Html.js:
97 <pre><font color=
"#aaaaaa">88:
</font> helma.Html.isSelected = function(value, selectedValue) {
98 <font color=
"#aaaaaa">89:
</font> if (selectedValue == null || value == null)
99 <font color=
"#aaaaaa">90:
</font> return false;
100 <font color=
"#aaaaaa">91:
</font> if (selectedValue instanceof Array)
101 <font color=
"#aaaaaa">92:
</font> return selectedValue.contains(value);
102 <font color=
"#aaaaaa">93:
</font> return value == selectedValue;
103 <font color=
"#aaaaaa">94:
</font> }