Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

selections from drop down list into list box

Avatar

Level 1

Hello all, I have a ddlist that is filled from xml data. On select I would like selection to appear in the list box. I am not able to figure this out, can somone supply me with some direction.

1 Accepted Solution

Avatar

Correct answer by
Level 10

This simliest way is this script in the change:Event of the dropdown box:

View solution in original post

5 Replies

Avatar

Correct answer by
Level 10

This simliest way is this script in the change:Event of the dropdown box:

Avatar

Level 1

That worked great. On a side note...is there something needed to get the a reset button to remove the data from the list box?

Avatar

Level 1

Thanks much for the help. Still not able to clear the list box. Can you verify that I entered correctly?

<?templateDesigner expand 1?></subform>

         <field name="ResetButton1" y="82.55mm" x="117.475mm" w="28.575mm" h="6mm" relevant="-print">

            <?templateDesigner isResetFieldsObject true?>

            <ui>

               <button highlight="inverted"/>

            </ui>

            <font typeface="Myriad Pro"/>

            <caption>

               <value>

                  <text>Reset Form</text>

               </value>

               <para hAlign="center" vAlign="middle"/>

               <font typeface="Myriad Pro"/>

            </caption>

            <border hand="right">

               <?templateDesigner StyleID apbx2?>

               <edge stroke="raised"/>

               <fill>

                  <color value="212,208,200"/>

               </fill>

            </border>

            <bind match="none"/>

            <event name="event__click" activity="click">

               <script contentType="application/x-javascript">xfa.host.resetData(); ListBox1.ClearItems();</script>

            </event>

         </field>

         <?templateDesigner expand 1?></subform>

Avatar

Level 10

The correct syntax is clearItems(); not ClearItems();