[jboss-user] [JBoss Seam] - Force OnChange with selectDate selection

james_hays@mac.com do-not-reply at jboss.com
Wed Apr 11 16:00:10 EDT 2007


Just curios, but I'm attempting to add ajax support to my textField that is populated with a date from the SelectDate component.  Normally, I would attach an <a4j:support event="onchange"...  tag to my textField.  

Since I couldn't find a way to force an onchange event from javascript, I added focus/blur combination to the existing method.

function __clickCalendar(calName, year, month, day) {
  |   getObject(calName).value = __calendarFactory.formatDate(year, month + 1, day);
  |   getObject(calName).focus();
  |   getObject(calName).blur();
  | 
  | }
  | 

This allows me to easily add an <a4j:support event="onblur" component to my textfield and get the desired result.

If there is a better way, please let me know.  Otherwise, I propose we add this to source to gain the a4j support.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036520#4036520

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036520



More information about the jboss-user mailing list