Pregunta

I get values from Db using jdbc and store them in a String Array object. I have a combobox in an xpage and computed its values using ssjs.

The java class has a function,

String[] array = new String[20];
    public String[] getName(){
return array;
}

The ssjs code is,

    var v = new com.vijay.Test1();
var ar = new Array();

for(i=0;i<@count(ar);i++)
ar[i]= "["+v.getName[i]+"]";

return ar;

But when previewed, the combobox has no values.

¿Fue útil?

Solución

You need to return a Vector and not an Array.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top