How to get the value of an Object that is inside an array of objects > java?

Asked

Viewed 401 times

-1

I have a list of boletos in my GRID and I need to select some to have only the selected ones printed, so I am passing as parameter lArc_dados(grid) so that I can at the time of logic pick only those that the field Sel is TRUE, but when I get the array of objects this returns me this way:

{pConvenio=3, pTotal=false, pTitulo=Boletos, ModuloID=23, relIDHuman=boleto756, SUBREPORT_DIR=/appsjava/proj/userfiles/reports/, pDataIni=01/08/2019, pAgrupamento=, pDados=[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object], pDataFim=01/09/2019, pFormato=PDF, pOrdem=asc, pFiltros=, pZebrar=false, pInfEspecial=null, pEntidade=1, empresa= EMP1, SessionID=04465432704052428458, relIMGLogoBanco=/appsjava/proj/userfiles/imgs/marca.jpg, relIMGLogo=/appsjava/proj/userfiles/imgs/img.jpg}

And since I can’t access the value of each object within the pDados, can anyone tell me how to do that? MXML parameters

if (event.detail == Alert.YES)
            {
                var vObj_Param : URLVariables = new URLVariables();
                var vArr_mensagemErro : Array = [];
                var vStr_Filtros : String = "";
                var aBoolHaveErro : Boolean = false;
                vObj_Param.pDataIni = dfDataIni.value;
                vObj_Param.pDataFim = dfDataFim.value;
                vObj_Param.pEntidade = cbEntidade.selectedItem.id;
                vObj_Param.pConvenio = cbConvenios.selectedItem.codigo_006;
                vObj_Param.pDados = lArc_Dados;

                vObj_Param.empresa = cbEntidade.selectedItem.nome;

                Util.retornaParametrosPadraoRel(vObj_Param, ConstantesRelatorios.gCon_ImprimirBoleto756, gCon_TituloRel, "", false, cbFormato.selectedItem.formato,"asc", false);

                Controle.onFechaPopUp();
        }

Where you receive in the part of Logica

if (pStr_IDHuman.equals(gCon_ImprimirBoleto756)) {

        //Set<Entry<String, Object>> vHASH_Param =  pHas_Parametros.entrySet();
        Fat_mem_boleto pENT_Boleto = null;
        String vStrAux = "";
        String vCls_Boleto2 = null;
        vCls_Boleto2 = pHas_Parametros.get("pDados").toString();

Thanks in advance

1 answer

0


I made the same MXML front fit and solved the problem, follows solution to case someone one day has this doubt.

vObj_Param.pDados = "'0'";
for each (var vObj_Dados:Object in lArc_Dados) {
    if(Boolean(vObj_Dados.sel)){
        vObj_Param.pDados = vObj_Param.pDados +",'"+ vObj_Dados.identificador_022 +"'";
    }
}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.