I'm using JSF 1.1 in WAS 5 (Websphere Application Server 5), and I need to know what Column in my HtmlDataTable was clicked, I have tried by many ways but I can not get a Success result, the only thing I need is to pass a parammeter to an action.
I have something like
<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>
In my BackingBean I have
public class Bean {
......
......
public String saludar() {
FacesContext context = FacesContext.getCurrentInstance();
Object value = context.getExternalContext().getRequestMap().get("cod");
//value IS NULL !!!!!!!!!!!!!!!!!!! HELP HERE OR BEFORE ....
}
}
I have tried many ways, I don't know if the problem is because I am inside a HtmlDataTable or something like that, I can know the selected Row by binding de table to one HtmlDataTable and accesing to the method table.getRowData(); I have almost 3 days And i can not find a solution, I have tested in JSF 1.2 With Glassfish 3.1 and it worked, but I dont know how to get work that in WAS 5 with Java 1.4
Thnkxx !!