Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
will1771 committed Mar 11, 2015
1 parent 52dda80 commit 5d91743
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Expand Up @@ -28,7 +28,7 @@ public class AdminConferenceController {

private static final Logger logger = LoggerFactory.getLogger(AdminConferenceController.class);

public static String CONFERENCE_VIEW = "conference";
public static final String CONFERENCE_VIEW = "conference";

@Autowired
private ConferenceService conferenceService;
Expand All @@ -42,9 +42,7 @@ public String getConferenceView(ModelMap model) {
}

@RequestMapping(method = RequestMethod.POST)
public String addConference(Conference conference, BindingResult result, @RequestParam Map<String,String> params) {

logger.info("PARAMS:\n\n\n " + params.toString());
public String addConference(Conference conference, BindingResult result) {
if(result.hasErrors()){
logger.info(result.getAllErrors().toString());
}
Expand All @@ -54,7 +52,6 @@ public String addConference(Conference conference, BindingResult result, @Reques

@RequestMapping(method = RequestMethod.DELETE)
public String deleteConference(@RequestParam Integer id) {

conferenceService.deleteConference(id);
return "redirect:" + CONFERENCE_VIEW;
}
Expand Down
7 changes: 4 additions & 3 deletions src/main/resources/templates/conference.html
Expand Up @@ -68,19 +68,20 @@ <h3>Edit an Existing Conference</h3>
th:value="${conference.id}"
th:text="${conference.name}"></option>
</select>
<br/>
Name:<input type="text" name="name" /><br/>
Short Desc:<input type="text" name="shortDesc" /><br/>
Full Desc:<input type="text" name="fullDesc" /><br/>
Start Date (MM-dd-yyyy) :<input type="date" name="startDate"/><br/>
End Date (MM-dd-yyyy):<input type="date" name="endDate"/><br/>
Start Date (mm-dd-yyyy) :<input type="date" name="startDate"/><br/>
End Date (mm-dd-yyyy):<input type="date" name="endDate"/><br/>
Location:
<select name="location.id">
<option th:each="location : ${locations}"
th:value="${location.id}"
th:text="${location.shortDesc}"></option>
</select>
<br/>
<input type="submit" value="Add" /><br/>
<input type="submit" value="Edit" /><br/>
</form>


Expand Down

0 comments on commit 5d91743

Please sign in to comment.