I have this 3 fields in a JSF page
If this is simple calculation, which doesn't need server call then you should go with client side javascript solution
But As you love to do it using Ajax here you go..
You can use
and render
attribute to make this thing happen using AJAX .
@ManagedBean(name = "managedBean")
public class Bean {
private String val1; // getter and setter
private String val2; // getter and setter
private String res; // getter and setter
...
public void someThingToDoListener(AjaxBehaviorEvent event) {
//res = some processing
}
}
See Also