Avalados por :

Cómo colocar datos de una tabla en un array usando xml.view y controller.js con ui.commons.table

  • Creado 01/03/2024
  • Modificado 01/03/2024
  • 1 Vistas
0
Cargando...

Estoy usando xml.view y controlando la vista usando controller.js.

y estoy utilizando ui.commons.table

Quiero colocar los datos de la tabla en un array, pero mi código no funciona

var otable = document . getElementById ( "dataTable" );
var tableArr = [];
for ( var i = 1 ; i < otable . rows . length ; i ++ ) {
tableArr
. push ({
category
: otable . rows [ i ]. cells [ 0 ]. innerHTML ,
brandName
: otable . rows [ i

Pedro Pascal
Se unió el 07/03/2018
Pinterest
Telegram
Linkedin
Whatsapp

3 Respuestas

0
Cargando...

¿Por qué no usar simplemente un modelo JSON?

Respondido el 15/04/2024
LUCIANO RIOJA GHIOTTO
Se unió el 13/07/2019
0
Cargando...

c si esto ayuda

var otab = this.byId("tab");

var rows = otab.getRows();

var tableArr = [];

for (var i = 1; i < rows.length; i++) {

tableArr.push({

category: rows[i].getCells()[0].getText(),

brandName: rows[i].getCells()[1].getText(),

});

}

Respondido el 15/04/2024
LUCIANO RIOJA GHIOTTO
Se unió el 13/07/2019
0
Cargando...

¿Podrías dejar de usar palabras como YO QUIERO y POR FAVOR AYUDA?

Te recomendaría que te tomes un tiempo y revises el tutorial de OpenUI5. Te será de gran ayuda.

Respondido el 15/04/2024
LUCIANO RIOJA GHIOTTO
Se unió el 13/07/2019

contacto@primeinstitute.com

(+51) 1641 9379
(+57) 1489 6964

© 2024 Copyright. Todos los derechos reservados.

Desarrollado por Prime Institute

¡Hola! Soy Diana, asesora académica de Prime Institute, indícame en que curso estas interesado, saludos!
Hola ¿Puedo ayudarte?