• Number Spinner Constraints

    By Andrew J Reeve 1 decade ago

    Two problems with NumberSpinner control

    1) Any constaint with a value of 0 does not appear to be rendered (I have tried Min, Max, Places)

    2) If the value is calculated, the control is rendered as a HTML span

    Neither problem happens if I use a native dojo numberspinner rather than the xpages control

    • Sample XPage

      By Darin Egan 1 decade ago

      Could you provide a sample XPage and I will investigate it further?

      • Sample Page

        By Andrew J Reeve 1 decade ago



            
                
            

            
                
                    Min Constraint not rendered when set to 0
                    
                        
                            
                        

                    

                

                
                    Max Constraint not rendered when set to 0
                    
                       
                            
                       

                    

                

                
                    Places Constraint not rendered when set to 0
                    
                        
                            
                        

                    

                

                
                    Control rendered as span when value is computed
                    
                        
                            
                        

                    

                

                
                    Problems do not occur when using native dojo widget
                    
                        
                    

                

            

        • Response

          By Darin Egan 1 decade ago

          Andrew,

          Regarding the situation when min, max and places are omitted when specified as zero values, I've logged this as an (DEGN8MYFQM) issue and will investigate. In relation to the places property, when unspecified Dojo assumes a default value of zero which should be a workaround in the meantime. Furthermore, I've also logged the (DEGN8MYFGP) issue regarding the control being rendered as a span element when the value is computed which is quite perplexing. Thanks for bring these to our attention.

          Darin.

          • Follow up

            By Darin Egan 1 decade ago

            Andrew, after further consultation with a colleague regarding your query and some testing, it would appear that regardless of the XSP tag used if the value property is dynamically computed the behaviour is the same as your are seeing with the djNumberSpinner. The value property is used to assign a data binding. In relation to what you are attempting to do you could try the defaultValue property like follows. I trust this helps.

             

            <xe:djNumberSpinner id="djNumberSpinner1" defaultValue="#{javascript:return Math.random();}"/>