WAS 5 (Websphere Application Server 5) で JSF 1.1 を使用しています。HtmlDataTable のどの列がクリックされたかを知る必要があります。さまざまな方法で試しましたが、成功の結果が得られません。必要なのはパラメータをアクションに渡す。
私は次のようなものを持っています
<h:form>
<h:datatable value=#{bean.list} var="row">
<h:column>
<f:facet name="header">
<h:outputText value=""/>
</f:facet>
<h:commandButton value="Test!" action="#{bean.saludar}">
<f:param name="cod" value="#1"/>
</h:commandButton>
</h:column>
</h:datatable>
</h:form>
私のBackingBeanには
public class Bean {
......
......
public String saludar() {
FacesContext context = FacesContext.getCurrentInstance();
Object value = context.getExternalContext().getRequestMap().get("cod");
//value IS NULL !!!!!!!!!!!!!!!!!!! HELP HERE OR BEFORE ....
}
}
私は多くの方法を試しましたが、問題が HtmlDataTable 内にあるかどうかはわかりません。de テーブルを 1 つの HtmlDataTable にバインドし、メソッド table.getRowData(); にアクセスすることで、選択された行を知ることができます。私はほぼ3日を過ごし、解決策を見つけることができません。Glassfish 3.1を使用してJSF 1.2でテストしましたが、動作しましたが、Java 1.4を使用したWAS 5で作業する方法がわかりません
ありがとう!!