This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jul 15, 2011, 7:09 PM
24 Posts

Value Change Listener

  • Category: Managed Beans in NSF
  • Platform: All
  • Release: 8.5.3
  • Role: Developer
  • Tags:
  • Replies: 2
 I'm trying to implement a Value Change Listener with my Managed Bean.  It looks pretty simple, but I keep having errors.
 
Here is the test method in my bean: 
 
public void processValueChange(ValueChangeEvent event) throws AbortProcessingException {
String id = event.getComponent().getId();
String oldVal = event.getOldValue().toString();
String newVal = event.getNewValue().toString();
System.out.println("Component:" + id + " value changed from " + oldVal + " to " + newVal);
}
 
I'm binding it to the Edit Control with the valueChangeListener property, myBean.processValueChange 
 
I'm getting an very unhelpful error message below on the server  
 
myBean.processValueChange(javax.faces.event.ValueChangeEvent) com.sun.faces.lifecycle.ProcessValidationsPhase
2011-07-15T14:27:05.628-04:00 SEVERE CLFAD0134E: Exception processing XPage request  
2011-07-15T14:43:37.368-04:00 SEVERE processValueChange: myBean.processValueChange(javax.faces.event.ValueChangeEvent) com.sun.faces.lifecycle.ProcessValidationsPhase 
 
 Has anyone implemented ValueChangeListener with a managed Bean
 
Any help is always appreciated. 
 
Thanks, 
 
-- Jeff 
Jul 19, 2011, 5:10 PM
24 Posts
Re: Value Change Listener
 As usual, the above code wasn't the issue.  It actually works just fine.
 
I had another piece of code that was preventing my Java Code from Compiling successfully.   
 
You gotta watch for those little red "x"s and read the error messages! 
 
-- Jeff 
Jul 19, 2011, 8:11 PM
24 Posts
Re: Value Change Listener
 Ok, Now I have a different issue with the Value Change Listener.
 
If the user moves between the Inputs Fields with the Tab Key, the listener isn't invoked.  If the user clicks into the next field with a mouse, the listener is invoked. 
 
If anyone has had issues with this behavior, please let me know how you worked around it,.
 
Thanks, 
 
-- Jeff 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal