バッキング Bean にキー値を送信して、コレクション ユーザー内の誰が更新しようとしているかを把握したいと考えています。そのためには f:param を使用する必要があると思いますが、どういうわけか機能しません。h:commandButton の代わりに af:commandButton を使用すると、問題なく値が送信されます。
これが私のボタンです:
<h:commandButton styleClass="cntctmBtn" value="Update" action="#{pullForm.updateDependent}">
<f:param name="selectedIndex" value="#{loop.index}" />
<f:param name="selectedEDI" value="#{eachOne.identifier.dodEdiPnId}" />
</h:commandButton>
これが、送信された値を取得しようとしている方法です。
FacesContext context = FacesContext.getCurrentInstance();
Map map = context.getExternalContext().getRequestParameterMap();
String edi_tmp = (String)map.get("selectedEDI");
しかし、ArrayIndexOutOfBound 例外が発生しました。助けてください、ありがとう。