12/1/2010 11:27:36 PM
Title:
Popup Window
I have a requirement as mentioed below
I have an arrray collection, need to check for a boolean present in arraycollection, if the boolean value is flase i need to display a popup window asking for some details for the user to be filled. After user filling the details on click of ok, need to check the next value in the arraycollection.
If i try to put the collection in for loop & call a popup window, it is firing multiple popups. I need to call a popup, fill the details & call other popup.Can you please let me know how should i call the popup.
1. Popup is fired from mxml.
2. Popup container is basewindow
Please find the sample code below.
Arraycollection - testCollection
BenefitDetailsForProduct - Basewindow
for(var j:Number=0;j<testCollection.length;j++){
var object:Object=(Object)testCollection.get(j);
if(!object.checkstatus){
var helpWindow:IFlexDisplayObject =PopUpManager.createPopUp(this, BenefitDetailsForProduct, false);
}
}
12/2/2010 3:17:54 AM
lets say you have 10 objects in arraycollection .first start the loop to find the object with false boolean . Say you found false at 10th place. Then do the following
1)store 10 in a public variable
2) end the loop.
3) show the popup window
now on click of ok or cancel of your popup window you again need to run the loop from where you left it plus one (10+1 = 11).