f:setPropertyActionListener doesn't set the value however action is triggered

前端 未结 1 680
忘掉有多难
忘掉有多难 2021-01-21 01:10

I need to set a boolean field whenever p:fieldset is toggled. I tried out following code but the field is never set by f:setPropertyActionListener although p:ajax

相关标签:
1条回答
  • 2021-01-21 01:43

    The <f:setPropertyActionListener> works as being an ActionListener implementation only on components implementing ActionSource interface, such as UICommand, i.e. <h:commandXxx>, <p:commandXxx>, etc. The <p:ajax> does not implement this interface and therefore the <f:setPropertyActionListener> is basically completely ignored.

    As to your workaround, you could do so although I'd rather just use a concrete view scoped bean or wrap it in a composite with a backing component.

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