Hi All
           I  have a require ment where i need to show the errror tool tips
in  a single alert for all the invalid feilds but not undestanding how to
get the error tool tip. the below funtion is called vn i click a button. can
any one help


public function validatePrimaryDetails1(event:MouseEvent):void{
                prospectusNoVal.source = prospectusNo;
                var prospectusNoValidation:ValidationResultEvent =
prospectusNoVal.validate();
                 classCBVal.source = classCB;
                 var classCBValidation:ValidationResultEvent =
classCBVal.validate();
                 sectionCBVal.source  = sectionCB;
                 var sectionCBValidation:ValidationResultEvent =
sectionCBVal.validate();
                 courseCBVal.source = courseCB;
                 var courseCBValidation:ValidationResultEvent =
courseCBVal.validate();
                 studentSurNameVal.source = surname;
                 var studentSurNameValidation:ValidationResultEvent =
studentSurNameVal.validate();
                 studentNameVal.source = studentName;
                 var studentNameValidation:ValidationResultEvent =
studentNameVal.validate();
                 studentPhoneVal.source = stdPhoneNo;
                 var studentPhoneValidation:ValidationResultEvent =
studentPhoneVal.validate();
                 presentAddressVal.source = presentAddress;
                 var presentAddressValidation:ValidationResultEvent =
presentAddressVal.validate();
                 presentPhoneVal.source = presentPhoneNo;
                 var presentPhoneValidation:ValidationResultEvent =
presentPhoneVal.validate();
                 dobVal.source = dob;
                 dobVal.compareDateSource = admissionDate;
                 var dobValidation:ValidationResultEvent =
dobVal.validate();
                 fatherNameVal.source = fathername;
                 var fatherNameValidation:ValidationResultEvent =
fatherNameVal.validate();
                 motherNameVal.source = motherName;
                 var motherNameValidation:ValidationResultEvent =
motherNameVal.validate();
                 gaurdianNameVal.source = gaurdianName;
                 var gaurdianNameValidation:ValidationResultEvent =
gaurdianNameVal.validate();
                   if(prospectusNoValidation.type ==
ValidationResultEvent.INVALID
                            || classCBValidation.type ==
ValidationResultEvent.INVALID
                            || sectionCBValidation.type ==
ValidationResultEvent.INVALID
                            || courseCBValidation.type ==
ValidationResultEvent.INVALID
                            || studentNameValidation.type ==
ValidationResultEvent.INVALID
                            || studentSurNameValidation.type ==
ValidationResultEvent.INVALID
                            || studentPhoneValidation.type ==
ValidationResultEvent.INVALID
                            || presentAddressValidation.type ==
ValidationResultEvent.INVALID
                            || presentPhoneValidation.type ==
ValidationResultEvent.INVALID
                            || dobValidation.type ==
ValidationResultEvent.INVALID
                            || fatherNameValidation.type ==
ValidationResultEvent.INVALID
                            || motherNameValidation.type ==
ValidationResultEvent.INVALID
                            || gaurdianNameValidation.type ==
ValidationResultEvent.INVALID){
                            var errorStr:String = "";//I want to put this in
the alert but not undestanding how to get the error tool tip

                          Alert.show("Please fill in the required fields
accordingly","Error",0,null,null,who_steps.alertErrorIcon);

                   }else{
                       getPatientDetails.saveDetails(event);

                   }
      }

<mx:NumberValidator id="prospectusNoVal" invalidCharError="Input should
contain only numbers" property="text" required="true" negativeError="Cannot
contain negative numbers" minValue="1" lowerThanMinError="Number should be
greater than 0" allowNegative="false" />
         <ns:DateOfBirthValidator id="dobVal" triggerEvent="click"
trigger="{primaryValidator}" compareDateProperty="text" property="text"
inputFormat="MM/DD/YYYY" operation="validateBasedOnEndDate"
required="true"/>
<mx:NumberValidator id="courseCBVal" trigger="{primaryValidator}"
triggerEvent="click" minValue="1" lowerThanMinError="Please select course."
source="{courseCB}" property="selectedIndex" />
          <mx:NumberValidator id="sectionCBVal" trigger="{primaryValidator}"
triggerEvent="click" minValue="1" lowerThanMinError="Please select section."
source="{sectionCB}" property="selectedIndex" />
          <mx:NumberValidator id="classCBVal" trigger="{primaryValidator}"
triggerEvent="click" minValue="1" lowerThanMinError="Please select class."
source="{classCB}" property="selectedIndex" />
        <ns:AdvancedStringValidator id="studentSurNameVal" property="text"
required="true" allowSpaces="true" allowNumbers="true"
allowSpecialCharacters="true"/>
        <ns:AdvancedStringValidator id="studentNameVal" property="text"
required="true" allowSpaces="true" allowSpecialCharacters="true"
allowNumbers="true"/>
        <mx:PhoneNumberValidator id="studentPhoneVal" property="text"
required="true"/>
        <ns:AdvancedStringValidator id="fatherNameVal" property="text"
required="true" allowSpaces="true" allowNumbers="true"
allowSpecialCharacters="true"/>
        <ns:AdvancedStringValidator id="motherNameVal" property="text"
required="true" allowSpaces="true" allowNumbers="true"
allowSpecialCharacters="true"/>
        <ns:AdvancedStringValidator id="gaurdianNameVal" property="text"
required="true" allowSpaces="true" allowNumbers="true"
allowSpecialCharacters="true"/>
        <ns:AdvancedStringValidator id="presentAddressVal" property="text"
required="true" maxCharacters="300" allowSpecialCharacters="true"
allowNumbers="true" allowSpaces="true" />
        <mx:PhoneNumberValidator id="presentPhoneVal" property="text"
required="true"/>

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to