Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next
Subject: Unable to set scope variables when using repeat inside of a repeat
Feedback Type: Problem
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:





Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS