 |
|
 |
Subject: Unable to set scope variables when using repeat inside of a repeat |
 |
 |
 |
Product Area: Domino Server |
 |
Technical Area: Application Development |
 |
Platform: Windows |
 |
Release: 8.5.1 |
 |
Reproducible: Always |
 |
 |
 |
 |
I have come across an interesting problem involving repeat controls and scope variables. When I use a repeat control and have a button or link appear in the repeat, you can set a scope variable in the onclick event and have it work with no problem. That is the normal behavior.
However, as soon as you have a repeat inside of a repeat, scope variables stop getting set. I actually have an unusual set of requirements where I'm using a data table inside of a repeat inside of a repeat. That's three levels. I'm trying to have an edit link appear next to the data in the data table so I can then do some dialog box pop up to be able to edit each individual row. I can't get that far because I noticed this.
I noticed I was having problems setting scope variables when I had a button appear on every row of the data table, which is at the third level. After a frustrating few hours, I did a couple of tests to see where this is failing.
Inside the first repeat I have a button, let's call it "button1". I have an onclick event for that button just set a sessionScope variable to a basic text value "hi there". Because it's in a repeat, it shows three times because of the data I'm binding it to. I have it do a partial refresh of a panel that contains a label that shows the value of the sessionScope variable. When I click the button, the panel refreshes and I see the value of "hi there" in the label.
Now here's where the problem occurs. If I then put a button called "button2" inside the second repeat and assign the same onclick event. I have it refresh the same panel and I assign "bye" to the sessionScope variable, it doesn't work. The panel refreshes - I see in Firebug it does a POST - but the sessionScope variable doesn't get set.
I even took Declan Lynch's suggestion to create custom controls showing all your scope variables and am refreshing that and I see the scope variables never get set. It seems to work on that first repeat but for some reason doesn't when a button, or link, or anything has an onclick event that sets a scope variable in the second level repeat.
Just wondering if anyone noticed this.
 
Feedback number WEBB8CYTZN created by ~Wendy Nimjipykonyoopsi on 01/10/2011

Status: Open
Comments:

|
|  |
|