How do I get the value of a text field when I'm not submitting a form? I'm
currently using AjaxEventBehavior("onChange"), which does throw me the event
when i want it, but I cannot figure out how to get the value from the text
field. My current code:

 Account acct = ...;

 Form vacationForm = new Form("vacationForm", new
CompoundPropertyModel(acct));
 final TextField startDate = (TextField) new
TextField("vacationStartDate").add(DateValidator.minimum(new Date()));

 startDate.add(new AjaxEventBehavior("onChange") {
   protected void onEvent(AjaxRequestTarget ajaxRequestTarget) {

     // Where is the value of the text field "vacationStartDate"?

     // Want to: DataStaticService.getHibernateSession().save(acct);
     DataStaticService.getHibernateSession().flush();
     DataStaticService.getHibernateSession().getTransaction().commit();
   }
 });

 vacationForm.add(startDate);
 vacationForm.add(new PopupDatePicker("startDatePicker", startDate));

 add(vacationForm);

Thanks.

Jason
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to