Hi All,
I have run into one more validations i need to implement lest the error throws up on my console.
I have a list box
<tr><td align="right">
<dmf:listbox width="180" name="<%=DummyComponent.TARLANG_LISTBOX_CONTROL_NAME%>" size='5' multiselect='true' cssclass='BrowseNumberList' onselect="getListBoxSelectedValues" runatclient='true' id='searchlistbox'>
<dmf:option id = "item1" value="fr-fr" label="French(France)" />
<dmf:option id = "item2" value="zh-cn" label="Chinese(Simplified)" />
<dmf:option id = "item3" value="zh-cn1" label="Chinese(Simplified)1" />
<dmf:option id = "item4" value="zh-cn2" label="Chinese(Simplified)2" />
...
</td></tr>
Now prior to the click on a link on the page (which carries the user selected values), i need to confirm that the user has selected at least one Target language from the above listbox.
I have searched and found a tag as seen below which forces an upperlimi to the number of selections that can be made.I tried the same example on my Page but even the upperlimit test did not work. I was able to select more than 3 options.
<dmf:listbox name="colors" size="7" multiselect="true">
<dmf:option value="1" label="Red"/>
<dmf:option value="2" label="Orange"/>
<dmf:option value="3" label="Yellow"/>
<dmf:option value="4" label="Green"/>
<dmf:option value="5" label="Blue"/>
<dmf:option value="6" label="Indigo"/>
<dmf:option value="7" label="Violet"/>
</dmf:listbox>
<bfval:listboxselectlimitvalidator
name="val_limitselection_colors"
controltovalidate="colors"
errormessage="You can't select more than three options."/>
maxselected="3"
validateatclient="true"
displayclientalert="true"
My Question is whether there exists a validator using which i can enforce the lower limit i.e. urge the user to select at least one listbox option befor the final click? I have no such issues with dropdownboxes because they select the default value if nothing is particularly selected by the user.
Looking forward for your help
Thanks & Regards
Vishnu