setContent(bundleSectionView);
}
} else {
// we are navigating to bundle detail or bundle group detail
String currentPath = viewPath.getCurrent().getPath();
ViewPath nextViewPath = viewPath.next(); // the ID segment
if ("Bundle".equals(currentPath)) {
// set new bundle detail if we are changing detail
if (!nextViewPath.getCurrent().equals(currentBundleViewId)) {
// only cache the bundle id if bundle detail is the target view
currentBundleViewId = nextViewPath.isEnd() ? nextViewPath.getCurrent() : null;
bundleView = new BundleView(globalPermissions);
bundleGroupView = null;
currentBundleGroupViewId = null;
}
setContent(bundleView);
bundleView.renderView(nextViewPath);
} else if ("BundleGroup".equals(currentPath)) {
// set new bundle detail if we are changing detail
if (!nextViewPath.getCurrent().equals(currentBundleGroupViewId)) {
// only cache the bundle id if bundle detail is the target view
currentBundleGroupViewId = nextViewPath.isEnd() ? nextViewPath.getCurrent() : null;
bundleGroupView = new BundleGroupEditView(globalPermissions, Integer.parseInt(nextViewPath
.getCurrent().getPath()));
bundleView = null;
currentBundleViewId = null;
}
setContent(bundleGroupView);