[FIXED HUDSON-6701] make getView fallback to subview of primary view,

if that view is a ViewGroup.. this allows a Nested View to be used as
the default/primary view.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@31776 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
mindless committed 2010-06-05 16:47:05 +00:00
1 parent 5e9b55d927
commit ad87c2e646
1 file changed
+4
@@ -1249,6 +1249,10 @@ public final class Hudson extends Node implements ItemGroup<TopLevelItem>, Stapl
if(v.getViewName().equals(name))
return v;
}
// Fallback to subview of primary view if it is a ViewGroup
View pv = getPrimaryView();
if (pv instanceof ViewGroup)
return ((ViewGroup)pv).getView(name);
return null;
}