When to use valueChangeListener or f:ajax listener?

前端 未结 2 1799
余生分开走
余生分开走 2020-11-22 02:50

What\'s the difference between the following two pieces of code - with regards to listener placement?


    

        
2条回答
  •  孤独总比滥情好
    2020-11-22 03:17

    for the first fragment (ajax listener attribute):

    The "listener" attribute of an ajax tag is a method that is called on the server side every time the ajax function happens on the client side. For instance, you could use this attribute to specify a server side function to call every time the user pressed a key

    but the second fragment (valueChangeListener) :

    The ValueChangeListener will only be called when the form is submitted, not when the value of the input is changed

    *you might like to view this handy answer

提交回复
热议问题