Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Intro to Java Web Development with Spark!
You have completed Intro to Java Web Development with Spark!
Preview
This is how I added the Detail page to our application? How did you do?
Directions from previous step
- Add a new page that responds to
/ideas/:slug/. The controller should get the model by the slug passed in the url and pass it as the model for the template created in step 2.
- Add a new template for the idea detail page. Make it inherit from our base template.
- The content of the new idea detail page should list everyone who voted. You might need a new keyword.
- Add a form that allows voting for this specific idea. Route it to the existing vote route.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
How'd you do?
0:00
First, I exposed a property on our
CourseIdea model that returns the voters.
0:01
Now, since I am making a copy of this set
of voters anyway, I decided to use a list.
0:05
No need to show them how the users of
this API, how I'm keeping things unique.
0:12
So I'm just gonna give a list
just like everything else.
0:18
Everything else out of
here will return a list.
0:21
So and we're gonna get the voters.
0:23
It's asking if it's a java.util.List.
0:27
It indeed is.
0:29
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up