if (preState != null && preState.length() > 0) {
// We are modifying an existing state, preload dataComposer with it
IState state = this.stateUtil.restoreState(preState);
if (state.getPageId() > 0) {
IPage page = this.session.getPage(state.getPageId() + "");
if (page != null) {
dataComposer.startPage(page);
}
}
if (state != null) {
dataComposer.beginRequest(state);
}
} else if (this.reuseExistingPage(request)) {
String hdivStateParamName = (String) request.getSession().getAttribute(Constants.HDIV_PARAMETER);
String hdivState = request.getParameter(hdivStateParamName);
if (hdivState != null) {
IState state = this.stateUtil.restoreState(hdivState);
if (state.getPageId() > 0) {
IPage page = this.session.getPage(Integer.toString(state.getPageId()));
dataComposer.startPage(page);
} else {
dataComposer.startPage();
}
} else {