dataTable calls a dialog for editing, but editing does not take effect. (prime faces 5.1)

3

I have a WEB application with 5.1 primefaces of a datatable I call a dialog for editing, but editing is not done.

I will describe with images and at the end put the full xHtml.

I have a p: datatable where I created a button for editing. This button calls a dialog where I want to edit it.

Theeditdialogconsistsof6p:inputTextandaneditabledatatablepercell.

When I edit both the dataTable and the inputText when confirming the value is not updated.

In the case of inputText when I call the event of the record button it continues with the original value.

In the case of the dataTable when the focus exits the edit, the original value returns, but if you focus on the editing, the value continues there (see image sequence).

Note that in the penultimate figure I type the value 55 in the "Qty Common Pas" column, when I leave the edition it returns to the old value "3" (see last figure), but if I enter to edit again the 55 is there.

And on the whole, the TASelected composite object containing the inputText and the List used in the Dialog dataTable, which is the target object of the edit button, is also not updated in MB when I call the record button event.

So far I'm not tending to persist the data I'm trying to treat the object in memory.

My managedBean is like @ViewScoped

Template

<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:p="http://primefaces.org/ui" >

<h:head>
    <title>
        <ui:insert name="titulo">Page Title</ui:insert>
    </title>
    <link rel="stylesheet" href="resources/css/estilo.css"/>
    <link rel="stylesheet" href="../resources/css/estilo.css"/>

</h:head>

<h:body >
    <h:form id="fPrincipal">    

        <p:layout fullPage="true" >

            <p:layoutUnit position="north" size="100" resizable="true" closable="false" collapsible="true" id="cabecalho">
                <ui:insert name="cabecalho">

                    <div class="alvCabecalho">
                        <p:graphicImage name="img/logo_branca.png" style="padding : 10px;height: 30px;width: 187px;" /> 
                        <h:outputLabel value="Sistema Complementar Alvorada" styleClass="outputLabel labelTitulo"/>
                    </div> 

                </ui:insert>
            </p:layoutUnit>

            <p:layoutUnit position="south" size="60" resizable="true" closable="false" collapsible="false" id="rodape">

                <ui:insert name="rodape">
                    <div class="alvRodape" >

                        <h:panelGrid cellpadding="50" columns="3" >

                            <p:commandLink id="fechar" rendered="#{sessionMB.btFechar}"
                                        action="#{sessionMB.fecharSessao}" 
                                        style="padding:00px; margin:00px;  height: 100%; width: 100px;" ajax="false">
                                    <p:graphicImage  rendered="#{sessionMB.btFechar}" name="img/botaoSair.png" style="padding : 5px;height: 30px;width: 30px;"/>
                            </p:commandLink>

                            <h:outputLabel value="Usuario : #{sessionMB.usuario}" styleClass="outputLabel labelRotape" rendered="#{sessionMB.btFechar}"/>

                        </h:panelGrid>

                    </div>
                </ui:insert>

            </p:layoutUnit>

            <p:layoutUnit position="west" size="250" resizable="true" closable="false" collapsible="true" id="menu" rendered="#{render_west}">
                <ui:insert name="menu">menu</ui:insert>
            </p:layoutUnit>

            <p:layoutUnit position="east" size="250" header="Parametros" resizable="true"  closable="false" collapsible="true" effect="drop" rendered="#{render_east}" id="mensagem">
                <ui:insert name="mensagem">Mensagens</ui:insert>
            </p:layoutUnit>

            <p:layoutUnit  position="center" id="corpo">
                <ui:insert name="corpo">
                    <p:graphicImage  rendered="#{sessionMB.btFechar}" name="img/logoFundoAzul.png" styleClass="fundoAlvodara" style="opacity:0.65;position:relative;left:33%;top:50%;"/>

                    <!-- <img src="../resources/img/logoFundoAzul.png" class="fundoAlvodada" />  -->

                </ui:insert>
            </p:layoutUnit>

        </p:layout>

    </h:form>           

</h:body>

Application page using the template above.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui" > 

     <h:outputStylesheet name="/resources/css/estilo.css" library="css" />              

      <ui:composition template="/WEB-INF/templates/t_estrutural.xhtml">

            <ui:param name="render_east" value="true" />        
            <ui:param name="render_west" value="false" />
            <ui:param name="headerTitulo" value="Parametros" />

            <ui:define name="titulo">Calcula TA</ui:define>

            <ui:define name="mensagem">

                    <h:panelGrid columns="1">
                        <p:button id="btHome" outcome="principal" value="Home" icon="ui-icon-home" styleClass="botao-parametro" />

                            <h:outputLabel value="Ano/Mes:" for="anoMes"/>
                            <p:inputMask disabled="#{TA_MB.ctrlEntrada}" id="anoMes" value="#{TA_MB.anoMes}" validatorMessage="Periodo invalido" mask="9999/99" >
                                <f:validateRegex pattern="20[0-9]{2}/[0-9]{2}" />
                            </p:inputMask>

                            <p:commandButton id="consulta" disabled="#{TA_MB.ctrlEntrada}" value="Busca movimento" 
                                     actionListener="#{TA_MB.buscarLinhas}" icon="ui-icon-bookmark"
                                     styleClass="botao-parametro" 
                                     update="anoMes consulta novarequisicao linhasTA calculoTA gravaTA"
                                     onstart="PF('iconeDeProcessamento').show()"
                                     onsuccess="PF('iconeDeProcessamento').hide()" />

                            <p:commandButton id="calculoTA" disabled="#{TA_MB.ctrlProcessamento}" value="Calcular TA" 
                                     actionListener="#{TA_MB.calcularTA}" icon="ui-icon-bookmark"
                                     styleClass="botao-parametro" 
                                     update="linhasTA"
                                     onstart="PF('iconeDeProcessamento').show()"
                                     onsuccess="PF('iconeDeProcessamento').hide()" />

                            <p:commandButton id="gravaTA" disabled="#{TA_MB.ctrlProcessamento}" value="Grava TA" 
                                     actionListener="#{TA_MB.gravarTA}" icon="ui-icon-disk"
                                     styleClass="botao-parametro" 
                                     update="linhasTA"
                                     onstart="PF('iconeDeProcessamento').show()"
                                     onsuccess="PF('iconeDeProcessamento').hide()">
                                     <p:confirm header="Confirma ?" message="Confirma gravação dos Dados?" icon="ui-icon-alert" />
                            </p:commandButton>                                           

                            <p:button id="novarequisicao" disabled="#{TA_MB.ctrlProcessamento}" value="Nova Consulta" styleClass="botao-parametro" icon="ui-icon-refresh" outcome="taCalculo"/>                                                                                         

                    </h:panelGrid>

            </ui:define>

            <ui:define name="corpo">

                    <p:growl id="messages" showDetail="true" showSummary="false" autoUpdate="true" closable="true" />

                    <p:dataTable id="linhasTA" var="linha" value="#{TA_MB.listagemDeLinha}" stickyHeader="false" expandedRow="false">

                        <f:facet name="header">
                               <h:outputText style="font-weight: bold" 
                                value="Valor Total da TA: #{formatadorMB.formataMoeda(TA_MB.valorTotalTA)} " />
                        </f:facet>

                        <p:column style="width:16px">
                            <p:rowToggler />
                        </p:column>
                        <p:column headerText="Linha"  style="width:5%" styleClass="colunaTexto">
                            <h:outputText value="#{linha.linha}" />
                        </p:column>
                        <p:column headerText="Ramal"  style="width:5%" styleClass="colunaTexto">
                            <h:outputText value="#{linha.ramal}" />
                        </p:column>
                        <p:column headerText="Descição"  styleClass="colunaTexto">
                            <h:outputText value="#{linha.origem.descricao} / #{linha.destino.descricao}"    />
                        </p:column>
                        <p:column headerText="Qtd Lug."  style="width:10%" styleClass="colunaNumerica">
                            <h:outputText value="#{linha.lugaresOferecidos}" >
                                <f:convertNumber pattern="#0" />
                            </h:outputText>
                        </p:column>
                        <p:column headerText="Qtd Comb." style="width:10%" styleClass="colunaNumerica">
                            <h:outputText value="#{linha.quantidadeDeCombustivel}" >
                                <f:convertNumber pattern="#0.00" />
                            </h:outputText>
                        </p:column>
                        <p:column headerText="Vg Norm." style="width:10%" styleClass="colunaNumerica">
                            <h:outputText value="#{linha.viagensNormais}" >
                                <f:convertNumber pattern="#0" />
                            </h:outputText>
                        </p:column>
                        <p:column headerText="Vg Ext." style="width:10%" styleClass="colunaNumerica">
                            <h:outputText value="#{linha.viagensExtras}">
                                <f:convertNumber pattern="#0" />
                            </h:outputText>
                        </p:column>
                        <p:column headerText="Qtd Gratuitos" style="width:10%" styleClass="colunaNumerica">
                            <h:outputText value="#{linha.quantidadeDeGratuitos}">
                                <f:convertNumber pattern="#0" />
                            </h:outputText>
                        </p:column>
                        <p:column headerText="Qtd Professores " style="width:10%" styleClass="colunaNumerica">
                            <h:outputText value="#{linha.quantidadeDeProfessores}">
                                <f:convertNumber pattern="#0" />
                            </h:outputText>
                        </p:column>
                        <p:column headerText="TA" style="width:10%" styleClass="colunaNumerica">
                            <h:outputText value="#{linha.valorTA}" >
                                <f:convertNumber pattern="#0.00" />
                            </h:outputText>
                        </p:column>
                        <p:column style="width:32px;text-align: center"> 
                            <p:commandButton update=":fPrincipal:editaLinha linhasTA seccaoTa" oncomplete="PF('editaLinhaDialog').show()" icon="ui-icon-pencil" title="Edita Linha" >
                                <f:setPropertyActionListener value="#{linha}" target="#{TA_MB.composicaoTASelecionada}"   />
                            </p:commandButton>
                        </p:column>

                        <p:rowExpansion>
                            <p:dataTable id="seccaoTa" var = "seccao" value="#{linha.seccoes}">
                                <p:column headerText="Origem"  style="width:10%" styleClass="colunaTexto">
                                    <h:outputText value="#{seccao.origem.id}" />
                                </p:column>
                                <p:column headerText="Destino"  style="width:10%" styleClass="colunaTexto">
                                    <h:outputText value="#{seccao.destino.id}" />
                                </p:column>

                                <p:column headerText="Descição"  styleClass="colunaTexto">
                                    <h:outputText value="#{seccao.origem.descricao} / #{seccao.destino.descricao}"    />
                                </p:column>
                                <p:column headerText="Data Inicio"  style="width:10%" styleClass="colunaTexto">
                                    <h:outputText value="#{seccao.dataInicio}" />
                                </p:column>
                                <p:column headerText="Data Final"  style="width:10%" styleClass="colunaTexto">
                                    <h:outputText value="#{seccao.dataFim}" />
                                </p:column>
                                <p:column headerText="Tarifa"  style="width:10%" styleClass="colunaTexto">
                                    <h:outputText value="#{seccao.tarifaTA}" >
                                        <f:convertNumber pattern="#0.00" />
                                    </h:outputText>
                                </p:column>
                                <p:column headerText="Qtd.Pas. Comum"  style="width:10%" styleClass="colunaTexto">
                                    <h:outputText value="#{seccao.quantidadeDePassagensComuns}" >
                                        <f:convertNumber pattern="#0" />
                                    </h:outputText>
                                </p:column>
                                <p:column headerText="Qtd.Pas. Estudante"  style="width:10%" styleClass="colunaTexto">
                                    <h:outputText value="#{seccao.quantidadeDePassagensEstudantes}" >
                                        <f:convertNumber pattern="#0" />
                                    </h:outputText>
                                </p:column>

                            </p:dataTable>
                        </p:rowExpansion>

                    </p:dataTable>


                    <!--  ***********************************  Dialogo do progresso   ************************************************* -->

                    <p:dialog widgetVar="iconeDeProcessamento" modal="true" draggable="false" closable="false" resizable="false" showHeader="true" appendTo="@(body)"
                            header="Aguarde... Buscando Dados" style="width:20%;height:20%" >
                        <p:graphicImage id="progressoGif"  value="../resources/img/loader_blue.gif" style="width:40%;height:40%; display: block; margin-left: auto; margin-right: auto"/>
                    </p:dialog>

                    <!--  ***********************************  Dialogo da Confirmação de Gravação ************************************************* -->
                    <p:confirmDialog global="true" showEffect="fade" hideEffect="explode">
                        <p:commandButton value="Não" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
                        <p:commandButton value="Sim" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
                    </p:confirmDialog>

                    <!--  ***********************************  Dialogo da Edicao  ************************************************* -->
                    <p:dialog widgetVar="editaLinhaDialog"     modal="true" header="Edicao de Linha"  showEffect="fade" hideEffect="fade" resizable="true" appendTo="@(body)" height="600" width="1200" >
                        <!-- <p:accordionPanel id="editaLinha" multiple="true"> -->
                         <p:outputPanel id="editaLinha" > 


                            <p:fieldset style="margin-bottom:5px"> 
                                <h:panelGrid id="pgFixo" columns="2">
                                    <h:outputText id="outLinha" value="Linha:"/>
                                    <p:inputText id="inLinha" label="Linha" value="#{TA_MB.composicaoTASelecionada.linha}" maxlength="4" size="5" disabled="true" />

                                    <h:outputText id="outRamal" value="Ramal:"/>
                                    <p:inputText id="inRamal" label="Ramal" value="#{TA_MB.composicaoTASelecionada.ramal}" maxlength="1" size="2" disabled="true"/>

                                    <h:outputText id="outDescricao" value="Descricao:"/>
                                    <p:inputText id="inDescricao" label="Descricao" value="#{TA_MB.composicaoTASelecionada.origem.descricao.trim()} / #{TA_MB.composicaoTASelecionada.destino.descricao.trim()}" 
                                       maxlength="150" size="60" disabled="true" />
                                </h:panelGrid>
                            </p:fieldset>

                            <h:panelGrid id="pgLinhaEditavel" columns="4" cellspacing="10">                                 
                                <h:outputText id="outQuantidadeDeLugares" value="Quantidade de Lugares:"/>
                                <p:inputText id="inQuantidadeDeLugares" label="QuantidadeDeLugares" value="#{TA_MB.composicaoTASelecionada.lugaresOferecidos}" maxlength="12" size="6" dir="ltr">
                                    <f:convertNumber pattern="#0" />
                                </p:inputText>

                                <h:outputText id="outQuantidadeDeCombustivel" value="Quantidade de Combustivel:"/>
                                <p:inputText mask="9999999" id="inQuantidadeDeCombustivel" label="QuantidadeDeCombustivel" value="#{TA_MB.composicaoTASelecionada.quantidadeDeCombustivel}" maxlength="12" size="6" dir="ltr">
                                    <f:convertNumber pattern="#0.00" />
                                </p:inputText>  

                                <h:outputText id="outQuantidadeDeViagensNormais" value="Quantidade de Viagens Normais:"/>
                                <p:inputText id="inQuantidadeDeViagensNormais" label="QuantidadeDeViagensNormais" value="#{TA_MB.composicaoTASelecionada.viagensNormais}" maxlength="12" size="6" dir="ltr" >
                                    <f:convertNumber pattern="#0" />
                                </p:inputText>

                                <h:outputText id="outQuantidadeDeViagensExtra" value="Quantidade de Viagens Extra:"/>
                                <p:inputText id="inQuantidadeDeViagensExtra" label="QuantidadeDeViagensExtra" value="#{TA_MB.composicaoTASelecionada.viagensExtras}" maxlength="12" size="6" dir="ltr" >
                                    <f:convertNumber pattern="#0" />
                                </p:inputText>

                                <h:outputText id="outQuantidadeDeGratuitos" value="Quantidade de Viagens Gratuitos:"/>
                                <p:inputText id="inQuantidadeDeGratuitos" label="QuantidadeDeGratuitos" value="#{TA_MB.composicaoTASelecionada.quantidadeDeGratuitos}" maxlength="12" size="6" dir="ltr" >
                                    <f:convertNumber pattern="#0" />
                                </p:inputText>

                                <h:outputText id="outQuantidadeDeProfessores" value="Quantidade de Viagens Professores:"/>
                                <p:inputText id="inQuantidadeDeProfessores" label="QuantidadeDeProfessores" value="#{TA_MB.composicaoTASelecionada.quantidadeDeProfessores}" maxlength="12" size="6" dir="ltr" >
                                    <f:convertNumber pattern="#0" />
                                </p:inputText>

                            </h:panelGrid>


                            <p:scrollPanel  style="width:100%;height:250px" >    
                                <p:dataTable id="itensLinha" var="itens" value="#{TA_MB.composicaoTASelecionada.seccoes}" editable="true" editMode="cell" >

                                    <p:ajax event="cellEdit" listener="#{TA_MB.onCellEditSeccao}" update=":fPrincipal:messages itensLinha" />

                                    <p:column headerText="Descição"  styleClass="colunaTexto">
                                        <h:outputText value="#{itens.origem.descricao} / #{itens.destino.descricao}"    />
                                    </p:column>
                                    <p:column headerText="Data Inicio"  style="width:10%" styleClass="colunaTexto">
                                        <h:outputText value="#{itens.dataInicio}" />
                                    </p:column>
                                    <p:column headerText="Data Final"  style="width:10%" styleClass="colunaTexto">
                                        <h:outputText value="#{itens.dataFim}" />
                                    </p:column>
                                    <p:column headerText="Qtd.Pas. Comum"  style="width:10%" styleClass="colunaTexto">
                                        <p:cellEditor>
                                                    <f:facet name="output"><h:outputText value="#{itens.quantidadeDePassagensComuns}" /></f:facet>
                                                    <f:facet name="input">
                                                        <p:inputText id="modelInput" value="#{itens.quantidadeDePassagensComuns}" style="width:90%"  >
                                                            <f:convertNumber pattern="#0" />
                                                        </p:inputText>  
                                                    </f:facet>
                                                </p:cellEditor>
                                    </p:column>
                                    <p:column headerText="Qtd.Pas. Estudante"  style="width:10%" styleClass="colunaTexto">
                                        <p:cellEditor>
                                            <f:facet name="output"><h:outputText value="#{itens.quantidadeDePassagensEstudantes}" /></f:facet>
                                            <f:facet name="input">
                                                <p:inputText value="#{itens.quantidadeDePassagensEstudantes}" >
                                                    <f:convertNumber pattern="#0" />
                                                </p:inputText>
                                            </f:facet>
                                        </p:cellEditor>     
                                    </p:column> 
                                </p:dataTable>
                            </p:scrollPanel>

                            <p:fieldset style="margin-bottom:1px"> 
                                <h:panelGrid id="rodapeEdicao" columns="1">
                                    <p:commandButton id="gravaEdicaoDaLinha" value="Grava"
                                         actionListener="#{TA_MB.gravaEdicaoDaLinha}" icon="ui-icon-disk"
                                         styleClass="botao-parametro"
                                         oncomplete="PF('editaLinhaDialog').hide();" />
                                </h:panelGrid>
                            </p:fieldset>

                        </p:outputPanel>    
                    </p:dialog>


            </ui:define>
      </ui:composition> 

</html>

My ManagedBean

package br.com.transportesalvorada.controller.mb;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.sql.SQLException;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;

import javax.annotation.PostConstruct;
import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.bean.ViewScoped;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.servlet.ServletContext;

import org.primefaces.context.RequestContext;
import org.primefaces.event.CellEditEvent;
import org.primefaces.event.FileUploadEvent;
import org.primefaces.model.UploadedFile;

import br.com.transportesalvorada.model.DAO.conexao.AlvoradaException;
import br.com.transportesalvorada.model.DAO.trafego.ComposicaoTADAO;
import br.com.transportesalvorada.model.DAO.trafego.LinhaTADAO;
import br.com.transportesalvorada.model.DAO.trafego.SeccaoTADAO;
import br.com.transportesalvorada.model.bean.trafego.ComposicaoTA;
import br.com.transportesalvorada.model.bean.trafego.DeterTA;
import br.com.transportesalvorada.model.bean.trafego.FactoryTA;
import br.com.transportesalvorada.model.bean.trafego.SeccaoTA;

@ManagedBean(name="TA_MB")
@ViewScoped
public class TA_MB {

    protected boolean ctrlEntrada        = false;
    protected boolean ctrlProcessamento  = true;

    private int quantidadeDeUpLoads = 0;
    private UploadedFile upLoadFiles;

    private String anoMes;
    private List<ComposicaoTA> listagemDeLinha;

    private ComposicaoTA composicaoTASelecionada;

//-------------------------------------- COMUM -----------------------------------------

@PostConstruct
public void init() {
    quantidadeDeUpLoads = 0;
    listagemDeLinha = new ArrayList<ComposicaoTA>();
    composicaoTASelecionada = new ComposicaoTA();
}

public void setComposicaoTASelecionada(ComposicaoTA composicaoTASelecionada) {
    this.composicaoTASelecionada = composicaoTASelecionada;
}

public ComposicaoTA getComposicaoTASelecionada() {
    return composicaoTASelecionada;
}

public String getAnoMes() {
    return anoMes;
}

public void setAnoMes(String anoMes) {
    this.anoMes = anoMes;
}

public List<ComposicaoTA> getListagemDeLinha() {
    return listagemDeLinha;
}

public void setListagemDeLinha(List<ComposicaoTA> listagemDeLinha) {
    this.listagemDeLinha = listagemDeLinha;
}

public UploadedFile getUpLoadFiles() {
    return upLoadFiles;
}

public void setUpLoadFiles(UploadedFile upLoadFiles) {
    this.upLoadFiles = upLoadFiles;
}

public boolean isCtrlEntrada() {
    return ctrlEntrada;
}

public void setCtrlEntrada(boolean ctrlEntrada) {
    this.ctrlEntrada = ctrlEntrada;
}

public boolean isCtrlProcessamento() {
    return ctrlProcessamento;
}

public void setCtrlProcessamento(boolean ctrlProcessamento) {
    this.ctrlProcessamento = ctrlProcessamento;
}

public void processaTa(ActionEvent actionEvent){
    ctrlEntrada        = true;
    ctrlProcessamento  = false;
}

public float getValorTotalTA(){
    float retorno = 0f;
    for(ComposicaoTA linha : listagemDeLinha){
        retorno += linha.getValorTA();
    }
    return retorno;
}



//-------------------------------------- RECEBER ARQUIVO DETER -----------------------------------------

public void uploadArquivo(FileUploadEvent event){
    RequestContext context = RequestContext.getCurrentInstance();
    if(quantidadeDeUpLoads==0) 
        context.execute("PF('iconeDeProcessamento').show()");

    this.quantidadeDeUpLoads++;
    try {
        System.out.printf( "\n********************* entrei no upload  %s ",this.quantidadeDeUpLoads);
        recebeAraquivo(event.getFile().getInputstream(),event.getFile().getFileName());

        System.out.printf( "\n********************* Finalizei upload %s ",this.quantidadeDeUpLoads);
    } catch (Exception ex) {
        System.out.println("Erro no upload " + ex);
    }        

    this.quantidadeDeUpLoads-- ;

    if(this.quantidadeDeUpLoads==0){
        context.execute("PF('iconeDeProcessamento').hide()");
        /*
        try {
            FacesContext.getCurrentInstance().getExternalContext().redirect("principal.xhtml");
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }*/
    }


}

private void recebeAraquivo(InputStream inputstreamDoAquivo, String nomeDoAquivo) {
    InputStreamReader inputStreamReader = null;         
    BufferedReader bufferedReader= null;    
    String line;
    List<DeterTA> listaDeter = new ArrayList<DeterTA>();
    try {
        inputStreamReader = new InputStreamReader(inputstreamDoAquivo);
        bufferedReader = new BufferedReader(inputStreamReader);
        while ((line = bufferedReader.readLine()) != null) {
            DeterTA obj = new FactoryTA().getDeterTA(nomeDoAquivo,line);
            listaDeter.add(obj);
        }
        bufferedReader.close();
        String ok = (new FactoryTA().getDeterTA(nomeDoAquivo)).gravaDeterTA(listaDeter); 
        if(  ok.trim().length()>2 ){
            FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(ok));
            System.out.printf("\n   %s",ok);
        }   

    } catch (IOException e) {
        e.printStackTrace();
    }

}

public void fechar(String sequencia){
    System.out.printf("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %s",sequencia);
}


//-------------------------------------- CALCULO TA -----------------------------------------

public void buscarLinhas(){
    this.listagemDeLinha.clear();
    this.listagemDeLinha = new ComposicaoTADAO().buscaLinhas( anoMes.replace("/", "") );
    ctrlEntrada        = true;
    ctrlProcessamento  = false;
}

public void calcularTA(){
    new ComposicaoTA().calcularTa(getListagemDeLinha());
}

public void onCellEditSeccao(CellEditEvent event) {

    Object oldValue = event.getOldValue();
    Object newValue = event.getNewValue();

    System.out.printf("------ Entrou no Evento old %s new %s ",oldValue,newValue);

    if(newValue != null && !newValue.equals(oldValue)) {
        FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, "Cell Changed", "Old: " + oldValue + ", New:" + newValue);
        FacesContext.getCurrentInstance().addMessage(null, msg);
    }
}



public void gravarTA(){
    System.out.printf("\n ---------- Entrou no GravarTA() ---- : %s ",getListagemDeLinha().size());

}

public void gravaEdicaoDaLinha(){
    System.out.printf("\n ---------- Entrou no gravaEdicaoDaLinha() ---- : ");
    System.out.printf("\n --- Linha %s  %s %s ", this.getComposicaoTASelecionada().getLinha(),this.getComposicaoTASelecionada().getRamal(), this.composicaoTASelecionada.getLugaresOferecidos());

}


public void testeEvento(String msg){
    System.out.printf("\n entrou no %s ",msg);
}

}

    
asked by anonymous 29.12.2014 / 13:25

1 answer

2

After much research, I discovered the problem. The appendTo property of the dialog was as appendTo="@ (body)", this was throwing the data into the h: Body of xHtml and out of h: form which was not submitting the data.

Changing the appendTo="@ (form)" program behaved as desired.

Apparently a simple concept but if it is not well understood it can complicate.

Hope it helps those facing the same problem.

    
06.01.2015 / 11:50