have to press command button twice

后端 未结 5 677
不知归路
不知归路 2020-12-06 12:11

I\'m working on building a web page and notice now that I have to press the command button twice. Any command button has the same problem, so I figured I would add and actio

5条回答
  •  鱼传尺愫
    2020-12-06 12:45

    That can happen when a parent component of the given has been rendered/updated by another command button/link with . The given form will then lose its view state which it would only get back after submitting the form for the first time. Any subsequent submits will then work the usual way. This is caused by a bug in JSF JS API as descibred in JSF issue 790 which is fixed in the upcoming JSF 2.2.

    You need to fix the another command button/link with to explicitly include the client ID of the given in the render.

    
    

    Another way is to replace this by a PrimeFaces or so that you don't need to explicitly include the client ID of all the forms. PrimeFaces's own JS API has namely already incorporated this fix.

提交回复
热议问题