私はまた<h:commandButton ... actionListener="#{something.clicked(Object obj)}" ...>
オブジェクトとActionEventをh:commandbuttonによって渡す方法actionListener?
による方法void clicked(Object obj)
までのオブジェクトを渡すことができますしかし、どのように私は、単一の呼び出しで両方を渡すん<h:commandButton ... actionListener="#{something.clicked}" ...>
による方法void clicked(ActionEvent event)
までJSFページからのActionEventを渡すことができますvoid clicked(ActionEvent event, Object obj)
のような方法に変更しますか?
<h:commandButton actionListener="#{something.clicked}">
<f:setPropertyActionListener target="#{something.obj}" value="#{obj}">
</h:commandButton>
そして、それはリスナーを呼び出す前に、OBJとsomething.objプロパティを埋める: