Hi,
I have a curious problem with repeating subforms.
My repeating subform looks something like this:
myRepeatingSubform
someField
aPositionedSubform
myImage
myRemoveButton (which is not filled)
Now when I say
_myRepeatingSubform.addInstance(true);
everything is fine. I get another line at the end and I get to see my image.
But when I say
_myRepeatingSubform.insertInstance(0);
or
_myRepeatingSubform.moveInstance(_myRepeatingSubform.count - 1, 0);
then the image disappears. The button is still there. But the image is not visible anymore.
Does anyone have an explanation for that?
Is it perhaps an error of some kind?
Uli
Views
Replies
Total Likes
Update:
This forum's search function currently isn't working properly. I did find out that someone had a similar problem in 2008: "missing image in repeating subform"
I also checked out the images' presence with this line:
for (var i = 0; i< _myRepeatingSubform.count; i++) {
console.println(i + ": " + resolveNode("myRepeatingSubform[" + i + "].aPositionedSubform.myImage").presence);
}
As expected I get "visible" for every instance of the image. (Which is of cource a lie, as obviously the image is NOT visible ....)
Appears like a bug in my eyes. Does anyone have a good workaround?
A someone quirky workaround that actually works is:
for (var i = 0; i< _myRepeatingSubform.count; i++) {
resolveNode("myRepeatingSubform[" + i + "].aPositionedSubform.myImage").presence = "visible";
}
You can actually write
if (resolveNode("myRepeatingSubform[" + i + "].aPositionedSubform.myImage").presence == "visible")
resolveNode("myRepeatingSubform[" + i + "].aPositionedSubform.myImage").presence = "visible";
This makes a difference!
Views
Replies
Total Likes