Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Send custom select field to java classes?

 
Nate Williamson
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34178
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for posting the answer for anyone who has this question in the future.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic