I have a dataTable displaying data of type Action. I have a column named “Status” which will be set by the user. After setting this column I want to retrieve the value from a HashMap with Action class as key and the status as value.
How could I do it directly in the dataTable status column? I attempted the following:
<p:dataTable var="currentExecutedTestAction" value="#{projectCampaignManagementMB.currentExecutedTestActionList}">
<p:column>
<f:facet name="header">
<h:outputText value="Status" />
</f:facet>
<h:outputText value="#{projectCampaignManagementMB.actionMap(currentExecutedTestAction,statusValue)}" />
</p:column>
</p:dataTable>
Just use the action as a key (I suppose that the action is some
String/Integeretc that can be used as a key).JSF will use the action as a key to get the value, and than after you will submit some new value it will use action again to set the new value.