'List to store values apart from the post construct method in data table primefaces
I have a post construct method which is used to display data in datatable.but i want another list to store new row values in data table using primefaces and JPA.
<p:panel header="Edit" styleClass="p-mb-3" modal="true" widgetVar="w_edit" visible="false" >
<p:dataTable value="#{bookikgRouteDetailAction.itRoute}" var="bookRou" id="tabb" widgetVar="t_edit">
<p:column headerText="IcStatus">
<p:selectOneMenu value="#{bookikgRouteDetailAction.bookRoute.icStatus}" id="statusId">
<f:selectItem itemLabel="#{bookRou.icStatus.name}" itemValue="#{null}" />
<f:selectItems value="#{bookikgRouteDetailAction.icStatusList}" var="_regg"
itemValue="#{_regg}" itemLabel="#{_regg.name}">
</f:selectItems>
<f:converter converterId="javax.faces.StatusConverter" />
<p:ajax process="@this" event="change" />
</p:selectOneMenu>
</p:column>
<p:column headerText="ItBooking">
<p:selectOneMenu value="#{bookikgRouteDetailAction.bookRoute.itBooking}" id="bookingId">
<f:selectItem itemLabel="#{bookRou.itBooking.status}" itemValue="#{null}" />
<f:selectItems value="#{bookikgRouteDetailAction.itBooking1}" var="_regg1"
itemValue="#{_regg1}" itemLabel="#{_regg1.status}">
</f:selectItems>
<f:converter converterId="javax.faces.BookingConverter"/>
<p:ajax process="@this" event="change" />
</p:selectOneMenu>
</p:column>
</p:dataTable>
<p:commandButton value="Add" icon="ui-icon-add"
action="#{bookikgRouteDetailAction.add()}" process="@this"
update="tabb">
</p:commandButton>
<p:commandButton value="save" action="#{bookikgRouteDetailAction.save()}" process="@this" />
</p:panel>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
