}
viewId = ((EndState) state).getViewId();
redirect = ((EndState) state).isRedirect();
break;
} else if (state instanceof SubdialogState) {
SubdialogState sstate = (SubdialogState) state;
if (log().isTraceEnabled()) {
log().trace("-->SubdialogState(dialogName="
+ sstate.getDialogName() + ")");
}
Dialog subdialog = (Dialog) dialogs(context).get(sstate.getDialogName());
if (subdialog == null) {
throw new IllegalStateException("Cannot find dialog definition '"
+ sstate.getDialogName() + "'");
}
start(subdialog);
position = peek();
state = position.getState();
continue;