CmsObject cms = m_controller.getCmsObject();
if (recursive == null || "tree".equalsIgnoreCase(recursive)) {
navigationIterator = new TreeNavigationIterator(cms);
} else if ("flat".equalsIgnoreCase(recursive)) {
navigationIterator = new FlatRecursiveNavigationIterator(cms);
} else {
throw new UnsupportedOperationException("Only two valid arguments for recursive is tree|flat");
}
try {
BeanUtils.populate(navigationIterator, attributes);