Package javango.polls.forms

Examples of javango.polls.forms.VoteForm.bind()


 
  public HttpResponse vote(HttpRequest request, Long poll_id) throws HttpException {
    Poll p = javango.getObjectOr404(Poll.class, poll_id);
   
    VoteForm form = javango.newForm(VoteForm.class).setPoll(p);
    form.bind(request.getParameterMap());     
   
    if (!form.isValid()) {
      Map<String, Object> context = new HashMap<String, Object>();
      context.put("poll", p);
      context.put("error_message", "You didn't select a valid choice");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.