on 03-09-2010 3:40 AM
Hi All,
The scenario is as follows:
I have a Dynamic page(the page can be repeated) and inside the Dynamic page there is a Dynamic table.
Dynamic table entries have been assigned to the Listbox items. So the values will be displayed in the Listbox whenever I add a new row to the table.
When I add a row to the table the row has been added to the Dynamic table successfully in all the pages but the data is not visible in the Listbox.
In the same form I am getting it correctly in the case of static page.
Thanks,
Chandra Indukuri
It must be called from some exit Event or something. I remember fighting a lot with the listboxes:)) Otto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It came to my mind that if you have a problem when the page is dynamic, maybe there is a problem with addressing the source or the target. What paths do you use to address the form elements involved in this?
Otto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply.
My requirement is to select multiple entries from the Listbox. As I am not able to get the multiple values selected in the Listbox this is just a work around for that.
There is a drop down list and button to add. When ever the user presses the add button the record will be added to the Listbox.
Hi Chandra
I am not sure if this is what you are looking for.
To find out which items are selected in the listbox, the following code can be used:
var listlength = ListBox1.items.nodes.length;
for (var i=0; i<listlength; i++){
if(ListBox1.getItemState(i)==1){
//Do something
}
} //End of for
Thanks
Deepak
Thank you very much for the reply Deepak.
I wrote your code in Change event but it is always returning 0 for all the elements in the listbox. It is returning the previous values.
Suppose there are 1 to 100 in the Listbox and I select 2, 4.
If I save the PDF document(This is offline scenario) and then select any other value then it is getting 2, 4.
Here it is getting the previous values.
Appreciate your help on this.
Thanks,
Chandra Indukuri
Edited by: Chandra Indukuri on Mar 23, 2010 3:06 AM
Thank you very much for all your replies.
Finally I got the solution and awarded points.
Here are the steps that I followed:
1. selected the allow multiple checkbox for the Listbox.
2. Made the form as Dynamic.
3. Wrote the follwoing code in postSave event suggested by Deepak:
var listlength = listbox1.items.nodes.length;
for (var i=0; i<listlength; i++)
{
if(listbox1.getItemState(i)==true) // Items selected in the listbox
{
// Do the required
}
} // End of For
Thanks,
Chandra Indukuri
I bet you have to refresh it somehow manually. Or try any other way to achieve this. By the way, this is the first time I hear about such a requirement and would recommend not to do it at all. Why do you need this?
Otto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hiii .Chandra,
Please check the content mapping ..... for the dynamic table ....
after the new row addition...check the dynamic content mapped to the new row are not ....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.