Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

copy listbox to listbox

Avatar

Former Community Member

Hello all,

I need help to copy items from one listbox to another (they are in different lines of a table) in execution time.

I don't know how to pass the link value of the item to the following one.

Here is my code:

 

lineelems = this.resolveNode("Detalle.Posicion[" + line + "].MATNR_0").resolveNodes("#items.#text[*]");

line = line + 1;

for (i = 0; i < lineelems.length; i++)

{

     this.resolveNode("Detalle.Posicion[" + line + "].MATNR_0").addItem(lineelems.item(i).value, "¿¿¿???");

}

What do I have to write in "¿¿¿???" to have selection value, not text, in there?

Any collaboration is really appreciated,

Eloi

1 Reply

Avatar

Former Community Member

Solved by founding in forums.

Solution:

  

lineelems

= this.resolveNode("Detalle.Posicion[" + line + "].MATNR_0");

line = line + 1;

for (i = 0; i < lineelems.length; i++)

{

     this.resolveNode("Detalle.Posicion[" + line + "].MATNR_0").addItem(lineelems.getDisplayItem(i), lineelems.getSaveItem(i));

}

Thanks all,

Eloi