Pessoal, gostaria de fazer o seguinte,
editar o campo qtd, porem este campo não faz parte da minha entidade, conforme a imagem , tentei fazer da forma abaixo, porem a qtd = 0
segue abaixo meu codigo e a imagem ,
<h:form id="formindexlogin">
<p:dataTable var="car" value="#{carBean.cars}" selection="#{carBean.selectedCars}"
rowKey="#{car.year}" >
<p:column selectionMode="multiple"/>
<p:column>
<f:facet name="header">
<h:outputText value="Qtd" />
</f:facet>
<p:inputText id="txtqtd1" value="#{carBean.qtd}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Year" />
</f:facet>
<h:outputText value="#{car.year}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="model" />
</f:facet>
<h:outputText value="#{car.model}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Manu" />
</f:facet>
<h:outputText value="#{car.manufacturer}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="color" />
</f:facet>
<h:outputText value="#{car.color}" />
</p:column>
</p:dataTable>
<p:inputText id="txtqtd" value="#{carBean.qtd}"/>
<p:commandButton actionListener="#{carBean.itensselecionados}" value="Enviar" />
</h:form>
***********************************************
@ManagedBean
@ViewScoped
public class CarBean {
private List<Car> cars;
private Car selectedCar;
private Car[] selectedCars;
private int qtd;
public void itensselecionados() {
for (Car room : selectedCars) {
System.out.println(room.getYear());
System.out.println(room.getModel());
System.out.println("qtd"+getQtd());
}
}