}
//3. generate response for invalidated pages
if (_pgInvalid != null) {
for (final Iterator it = _pgInvalid.iterator(); it.hasNext();) {
final Page page = (Page)it.next();
responses.add(new AuOuter(page, redraw(page)));
}
}
/* if (log.finerable())
log.finer("After removing redudant: invalidated: "+_invalidated
+"\nAttached: "+_attached+"\nSmartUpd:"+_smartUpdated);
*/
//4. process special interfaces
//5. generate replace for invalidated
for (Iterator it = _invalidated.iterator(); it.hasNext();) {
final Component comp = (Component)it.next();
responses.add(new AuOuter(comp, redraw(comp)));
}
_ending = true; //no more addSmartUpdate...
//6. add attached components (including setParent)
//Due to cyclic references, we have to process all siblings
//at the same time
final List desktops = new LinkedList();
final Component[] attached = (Component[])
_attached.toArray(new Component[_attached.size()]);
for (int j = 0; j < attached.length; ++j) {
final Component comp = attached[j];
//Note: attached comp might change from another page to
//the one being created. In this case, no need to add
if (comp != null) {
final Page page = comp.getPage();
if (page != null && _exec.isAsyncUpdate(page)) {
final Component parent = comp.getParent();
final Set newsibs = new LinkedHashSet(32);
newsibs.add(comp);
desktops.add(newsibs);