Using backing bean value in javascript

前端 未结 2 955
半阙折子戏
半阙折子戏 2021-01-26 06:20
   
                              
                        &l         


        
2条回答
  •  后悔当初
    2021-01-26 06:56

    That's just because alert(#{test.i}); is evaluated when the commandButton is rendered. You can see the changed value by telling JSF to render the script again:

    
        
    
    
        
             alert(#{testClass.i});
        
    
    

提交回复
热议问题