Xpages add values into Combo Box

后端 未结 1 1115
迷失自我
迷失自我 2021-01-24 07:58

I have a Combo Box and I would like to have the possibility to add new values in the Combo Box using a button and an Input Field. I tried with:

var value = getCo         


        
1条回答
  •  猫巷女王i
    2021-01-24 08:30

    Use a viewScope e.g. viewScope.selectItems variable.

    • Use this viewScope as the selectItems list.
    • Add the initial values to it.
    • Later, add a additional new item to this viewScope and then it will appear in combobox's selection item list.

    This is a working example:

    
        
            
        
    
    
    
    
        
            
        
    
    

    0 讨论(0)
提交回复
热议问题