I have a dropdown choice  with values from enum . In form validation if the
selected value from list is monetarty , then amount field also needs value ,
now my  problem is   how would I get the selected   value in the  validator
object

<code>

                       add(new
DropDownChoice<FindingTypeEnum>("findingType",Arrays.asList(FindingTypeEnum.values())));
//validator
 if(FindingTypeEnum.Monetry.equals(getFormComponent("findingType").getValue())){

if(StringUtils.isBlank(getFormComponent("findingAmt").getValue())){
                               addErrorMessage("Finding Amount is required
for finding type monetary");
                            }
                    }

</code>

here in the code   getFormComponent("findingType").getValue()  return index
of selected value but not the selected  object  , please tell me If I can
retrieve the  selected object  from dropdownchoice  ?

Reply via email to