ActionListener is called multiple times (Bug?) - Mojarra 2.1.3

后端 未结 2 1126
醉话见心
醉话见心 2021-01-15 13:12

I have the following button:

   

        
2条回答
  •  走了就别回头了
    2021-01-15 14:08

    The similar issue takes place when component is using binding and validator or valueChangListener and backing bean is of View, Session or Application scope. Then corresponding listeners are called many times but not once during request (+1 time with every new request).

    One possible solution is to override jsf class AttachedObjectListHolder which is used for storing component listeners. Current implementation simply add new listener to component even though the same listener is already there. So the proposed fix is to check that listener does not exist before adding it.

    Details of the fix you can see here

提交回复
热议问题