• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Send custom select field to java classes?

 
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");
 
author & internet detective
Posts: 40035
809
Eclipse IDE VI Editor Java
  • 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.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic