// frames are getting added when:
// a) method is get
// b) method is post and START_REQUEST phase has finished
// e.g. nothing is done when the Frame was requested from within an
// action/actionlistener
YRequestContext yctx = YRequestContext.getCurrentContext();
boolean isPostback = yctx.isPostback();
boolean isStartRequest = ((YRequestContextImpl) yctx).getRequestPhase().equals(
REQUEST_PHASE.START_REQUEST);
boolean addFrameToCurrentPage = !(isPostback && isStartRequest);
if (addFrameToCurrentPage) {
yctx.getPageContext().addFrame(frame);
}
}