• dominoNABNamePicker & pickerValidator

    By Todd Harris 1 decade ago

    When using a dominoNABNamePicker data provider with the nameList property set to peopleByLastName, the associated pickerValidator fails on all names returned by the namePicker.

    • Thanks for reporting this Todd...

      By Paul Hannan 1 decade ago

      ...and I've logged PHAN98NEDG to track this issue.

      Thanks again.

      Regards,

      Paul.

      • Workaround using a second picker for validation

        By Maire Kehoe 1 decade ago

        The workaround is to use a second non-visible picker for the validation, with that validation picker configured to look up "people" instead of "peopleByLastName".

        For example, to reproduce this issue you could:
        Use the XPagesExt.nsf demo app, and in Domino_Pickers.xsp, change namePicker11 so that the inner xe:dominoNABNamePicker tag has nameList="peopleByLastName".
        Then to work around the problem, you would change the code from:
         

                                    
                                        
                                            
                                                
                                                     if(!picker.isValidValue(value)) {
            return "Invalid value: "+value
        }}]]>

                                                

                                            

                                                                                     minChars="1" preventFiltering="true">
                                                
                                            

                                        

                                                                             for="inputText21">
                                            
                                                
                                            

                                        

                                    

         

        to code like so:

                                   
                                        
                                            
                                                
                                                     var picker = getComponent('namePicker15');// use the rendered=false non-LastName picker
        if(!picker.isValidValue(value)) {
            return "Invalid value: "+value;
        }}]]>

                                                

                                            

                                                                                     minChars="1" preventFiltering="true">
                                                
                                            

                                        

                                                                             for="inputText21">
                                            
                                                
                                            

                                        

                                        
                                            
                                            
                                                
                                            

                                        

                                    

         

        That updated code has a new namePicker15, with rendered="false", and the inner xe:dominoNABNamePicker configured with nameList="people",
        and the validation code in the xp:customValidator tag has been changed to use the new namePicker15 for the validation.