Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

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