\r
IModel<String> username = new Model<String>("");\r
IModel<String> password = new Model<String>("");\r
+ List<RepositoryModel> repositoryModels = new ArrayList<RepositoryModel>();\r
\r
public RootPage() {\r
super();\r
}\r
}\r
}\r
+ \r
+ protected List<RepositoryModel> getRepositoryModels() {\r
+ if (repositoryModels.isEmpty()) {\r
+ final UserModel user = GitBlitWebSession.get().getUser();\r
+ List<RepositoryModel> repositories = GitBlit.self().getRepositoryModels(user);\r
+ repositoryModels.addAll(repositories);\r
+ }\r
+ return repositoryModels;\r
+ }\r
\r
protected void addDropDownMenus(List<PageRegistration> pages) {\r
\r
protected List<DropDownMenuItem> getRepositoryFilterItems(PageParameters params) {\r
final UserModel user = GitBlitWebSession.get().getUser();\r
Set<DropDownMenuItem> filters = new LinkedHashSet<DropDownMenuItem>();\r
- List<RepositoryModel> repositories = GitBlit.self().getRepositoryModels(user);\r
+ List<RepositoryModel> repositories = getRepositoryModels();\r
\r
// accessible repositories by federation set\r
Map<String, AtomicInteger> setMap = new HashMap<String, AtomicInteger>();\r
}\r
\r
protected List<RepositoryModel> getRepositories(PageParameters params) {\r
- final UserModel user = GitBlitWebSession.get().getUser();\r
if (params == null) {\r
- return GitBlit.self().getRepositoryModels(user);\r
+ return getRepositoryModels();\r
}\r
\r
boolean hasParameter = false;\r
String team = WicketUtils.getTeam(params);\r
int daysBack = params.getInt("db", 0);\r
\r
- List<RepositoryModel> availableModels = GitBlit.self().getRepositoryModels(user);\r
+ List<RepositoryModel> availableModels = getRepositoryModels();\r
Set<RepositoryModel> models = new HashSet<RepositoryModel>();\r
\r
if (!StringUtils.isEmpty(repositoryName)) {\r