File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
src/main/java/org/woehlke/simpleworklist/project Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ public final String addNewTopLevelProjectSave(
9494 result ,
9595 locale ,
9696 model ,
97- "project/root "
97+ "redirect:/ project/"
9898 );
9999 }
100100
Original file line number Diff line number Diff line change @@ -134,8 +134,17 @@ public void addNewProjectToRoot(
134134 UserSessionBean userSession ,
135135 Context context ,
136136 Locale locale ,
137- Model model ) {
137+ Model model
138+ ) {
138139 log .info ("addNewProjectToRoot" );
140+ Project project ;
141+ project = new Project ();
142+ project .setId (0L );
143+ Breadcrumb breadcrumb = breadcrumbService .getBreadcrumbForShowRootProject (locale );
144+ model .addAttribute ("breadcrumb" , breadcrumb );
145+ model .addAttribute ("project" , project );
146+ model .addAttribute ("thisProjectId" , project .getId ());
147+ model .addAttribute ("breadcrumb" , breadcrumb );
139148 }
140149
141150 @ Override
@@ -149,6 +158,7 @@ public String addNewProjectToRootPersist(
149158 String s
150159 ) {
151160 log .info ("addNewProjectToRootPersist" );
152- return null ;
161+ project = projectService .saveAndFlush (project );
162+ return s + project .getId ();
153163 }
154164}
You can’t perform that action at this time.
0 commit comments