Iterate text box file in panel

vkeerthy

15-10-2015

I have a panel in AEM forms which is configured with repeated settings. I have placed a text box component in this panel to have the end users add 3 different address to their form.

 

I am trying to capture the address value on each instance, so I can use them in a dropdown component for subsequent screens (so the user can pick one of the address value that has been captured from screen one).

Can some one shed light on how to iterate address field value so that I can populate a dropdown component with captured data. Thanks!

Accepted Solutions (0)

Answers (3)

Answers (3)

vkeerthy

15-10-2015

I am able to iterate through panel items for a specific field by obtaining the index value for the panel panel1.instanceIndex and iterating through out that index value to read the value for particular field.

For this I am using SOM expresion.

acem93524919

15-10-2015

I am trying to iterate through all textboxes in a certain panel.

I have an update panel with 6 panels inside it. Each panel has a number of textboxes. What I want to do is is find (and set or read the text) of only the textboxes inside a specified panel. The code below attempts to use find control to find the specific panel and then iterate over the controls and set all textboxes to "Yup"but it does not seem to work. Whats interesting is that when using find control with a specific control ID (the last two lines of code) the text box is found and the text is changed.

        protected void LoadCategory(object sender, CommandEventArgs e){Panel pnl = (Panel)UpdatePanel1.FindControl("pnl1");foreach (Control ctrl in pnl.Controls){if (ctrl is TextBox){TextBox tb = (TextBox)ctrl;tb.Text = "Yup";}}TextBox tbItem = (TextBox)UpdatePanel1.FindControl("tb1010");tbItem.Text = "Yup";}

http://www.trainingintambaram.in/php-training-in-chennai.html | http://http://www.trainingintambaram.in/salesforce-training-in-chennai.html