| Author |
Send custom select field to java classes?
|
Nate Williamson
Greenhorn
Joined: Jul 06, 2011
Posts: 6
|
|
Hello,
I am trying to add a custom field (a select with options) to the "New Post" page (templates/default/post_form.htm). Adding the new field is not a problem but I can't figure out a way to get the selected value of that field to the java classes in the back end. Does anyone know how this can be done? I am more familiar with JSF and haven't worked with freemaker before.
Thanks!
|
 |
Nate Williamson
Greenhorn
Joined: Jul 06, 2011
Posts: 6
|
|
|
I guess the actual question is, how do I assign the value of the selected option to a value in the java classes (Post.java for example).
|
 |
Nate Williamson
Greenhorn
Joined: Jul 06, 2011
Posts: 6
|
|
Figured it out..
All I needed to do was set the name of my select and then get it in the insertSave method of PostAction.
this.request.getParameter("name_of_select");
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26216
|
|
|
Thanks for posting the answer for anyone who has this question in the future.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
 |
|
|
subject: Send custom select field to java classes?
|
|
|