trouble calling rerender on an inputtext element with ajax4jsf
I'm trying to do something with Ajax4jsf that seems like it should be very simple. I have an input field ("longitude") and, when an onkeyup event fires within it, I want to change the value of another input field ("ownership"). The idea is that the onkeyup in "longitutde" fires the "loadOwnership" method that sets the "ownership" property. Currently it sets it to a current datstamp for testing purposes and outputs a notice that I have hit the method. However, when I type in the "longitutde" field, the "ownership" field does not change and nothing prints to standard out. I do have the bean set to "session" scope, can anyone see what I'm doing wrong?
Thanks,
Alex
JSP page
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
<HTML>
<HEAD> <title>Facility Form</title> </HEAD>
<body bgcolor="white">
<f:view>
<h2>Facility Form</h2>
<h:form id="locationForm">
<h:panelGrid columns="3" style="margin-top:10px;">
<h:outputText value="Longitude:" />
<h:inputText id="longitude" value="#{locationForm.longitude}" >
<a4j:support event="onkeyup" action="#{locationForm.loadOwnership}" reRender="ownership" />
</h:inputText>
<h:outputText value=" " escape="false"/>
<h:inputText id="ownership" value="#{locationForm.ownership}" />
<h:outputText value=" " escape="false"/>
<h:commandButton value="Submit" action="#{locationForm.submitNewLocation}" />
<h:outputText value=" " escape="false"/>
<h:outputText value=" " escape="false"/>
</h:panelGrid>
<h:outputText value="#{locationForm.confirmText}" escape="false" />
</h:form>
</f:view>
</body>
</html>
Bean Source
package forms;
import javax.faces.context.FacesContext;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import java.sql.*;
import control.Connector;
import java.util.*;
import java.io.*;
import javax.faces.component.html.HtmlDataTable;
publicclass Location{
public Location(){
}
publicvoid loadOwnership(){
System.out.println("in loadOwnership");
this.ownership =new java.util.Date().toString();
}
/* --
Get Methods
*/
public Double getLongitude(){
return this.longitude;
}
public String getOwnership(){
return this.ownership;
}
/* --
Set Methods
*/
publicvoid setLongitude(Double longitude){
this.longitude = longitude;
}
publicvoid setOwnership(String ownership){
this.ownership = ownership;
}
}

