
Variable Collection en user control
Publicado por Israel (1 intervención) el 10/09/2015 18:53:21
Hola
Tengo un problema al momento de ejecutar mi user control; no se como mandar el resultado de mi proceso a una variable collection dentro de genexus:
El user control funciona para leer múltiples archivos XML y mandarlos a una variables de coleccion dentro de genexus, para posteriormente ejecutar un evento.
Al momento de crear mi user control especifique que la variable "ArcvhioXML" fuera basada en un SDT:


Al momento de ejecutar mi user control a nivel web, marca un error en "Nombre", "Tipo","Tamanio" y "Texto", indicando que no existen o no estan declaradas.
En espera de sus comentarios!
Tengo un problema al momento de ejecutar mi user control; no se como mandar el resultado de mi proceso a una variable collection dentro de genexus:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
function Final()
{ this.Width; this.Height; this.ArchivoXML; // Databinding for property ArchivoXML
this.SetArchivoXML = function(data)
{ ///UserCodeRegionStart:[SetArchivoXML] (do not remove this comment.)
this.SetArchivoXML = data;
///UserCodeRegionEnd: (do not remove this comment.)
} // Databinding for property ArchivoXML
this.GetArchivoXML = function()
{ ///UserCodeRegionStart:[GetArchivoXML] (do not remove this comment.)
return this.ArchivoXML; ///UserCodeRegionEnd: (do not remove this comment.)
}this.show = function()
{ ///UserCodeRegionStart:[show] (do not remove this comment.)
var buffer= '<input type="file" id="fileinput" multiple accept="application/xml" />';
this.setHtml(buffer);
var thisObjectUC = this;thisObjectUC.readMultipleFiles();
document.getElementById('fileinput').addEventListener('change', function() { thisObjectUC.readMultipleFiles(); }, false);
///UserCodeRegionEnd: (do not remove this comment.)
} ///UserCodeRegionStart:[User Functions] (do not remove this comment.)
this.readMultipleFiles=function () {
var thisObjectUC = this;var files = document.getElementById('fileinput').files;
if (files.length>0) {
for (var i=0, f; f=files[i]; i++) {
var r = new FileReader();
r.onload = (function(f) {
return function(e) {
thisObjectUC.ArchivoXML[i].Nombre=f.name;
thisObjectUC.ArchivoXML[i].Tipo=f.type;
thisObjectUC.ArchivoXML[i].Tamanio=f.size;
thisObjectUC.ArchivoXML[i].Texto=e.target.result;
};})(f);
r.readAsText(f);
}thisObjectUC.OnComplete();
} } ///UserCodeRegionEnd: (do not remove this comment.):
}El user control funciona para leer múltiples archivos XML y mandarlos a una variables de coleccion dentro de genexus, para posteriormente ejecutar un evento.
Al momento de crear mi user control especifique que la variable "ArcvhioXML" fuera basada en un SDT:


Al momento de ejecutar mi user control a nivel web, marca un error en "Nombre", "Tipo","Tamanio" y "Texto", indicando que no existen o no estan declaradas.
En espera de sus comentarios!
Valora esta pregunta


0