Well topic covers it all...
@ :"+strObjectId); } row_dataprovider++; } while(dp.nextRow()); row_index++; }
with this i get the content of the dataprovider.. all is fine.. BUT!!!
on the other hand when i try to get the info directly from the datagrid with code like this
List<DatagridRow> listarows = datagrid.getDatagridRows(); Iterator<DatagridRow> it_list = listarows.iterator(); logger.debug("inizio a ciclare"); logger.debug("datagrid ha righe: "+listarows.size()); // cycling rows while (it_list.hasNext()) { logger.debug("ciclo la riga"); DatagridRow current = it_list.next(); Iterator<Control> it_control = current.getContainedControls(); Image curr_image = null; Label curr_label = null; // cycling columns while (it_control.hasNext()) { logger.debug("ciclo i controlli"); Control current_control = it_control.next(); if (current_control.getTypeName().equalsIgnoreCase("Image")) { curr_image = (Image) current_control; } if (current_control.getTypeName().equalsIgnoreCase("Argument") && current_control.getName().equalsIgnoreCase("logo")) { curr_label = (Label) current_control; } } }well it_list(aka cycling row) works..
I get 5 rows..
when i invoke getcontainedcontrols on the datagridrow nothing is returned, apparently no control are contained inside it_control iterator elements... for no rows..
the grid i'm pointing to is the VERY same that i'm pointing to in the first method, and obviously even in the first method if i try to access the elements of the row with getcontainedcontrols i get nothing in return..
btw the jsp for the datagris has this structure:
<dmf:panel name='company_grid'><dmf:button label="BottoneTest" onclick="voidaction" /><dmf:datagrid name="mygrid" paged="true" pagesize="10" cellspacing='0' cellpadding='6' bordersize='1'> <tr> <th>Codice Company</th> <th>Corporate name</th> <th>Sufix</th> <th>Ragione Sociale</th> <th>Logo</th> <th>Status</th> <th>Action</th> </tr> <dmf:datagridRow> <td><dmf:label datafield="id_company" /></td> <td><dmf:label datafield="corporate_name" /></td> <td><dmf:label datafield="sufix" /></td> <td><dmf:label datafield="ragione_sociale" /></td> <td><dmf:label datafield="logo" /><dmf:image src=''/></td> <td><dmf:label datafield="attivo" /></td> <td> <dmf:button label="Modifica" onclick="onEdit"> <dmf:argument name="id_company" datafield="id_company" /> <dmf:argument name="corporate_name" datafield="corporate_name" /> <dmf:argument name="sufix" datafield="sufix" /> <dmf:argument name="ragione_sociale" datafield="ragione_sociale" /> <dmf:argument name="logo" datafield="logo" /> <dmf:argument name="attivo" datafield="attivo" /> </dmf:button> </td> </dmf:datagridRow> <dmf:row> <td colspan=7 align="center" style="{COLOR: #000000}"><dmf:datapaging name="paginazione" /></td> </dmf:row> </dmf:datagrid> </br> <dmf:label name="current_action" /> </br></dmf:panel>Either this is a major mistep on my end or there's something that's not working, because i've even tried using the code that is listed on the development guide (after fixing it, becase there are a few ERRORS on the top of it not working on my end).
Thanks in advance to whoever manage to somehow help me or point me toward a new direction...