I created a callback function in a .js file that is included in the .jsp for the action.
function userPickerCallback(objects, pickerID, attr, displayFieldId) {
var pickedObjs = objects.pickedObject;
if (pickedObjs != null) {
var updateHiddenField = document.getElementsByName(pickerID)[0];
var updateDisplayField;
var fields = document.getElementsByTagName("input");
for (p=0;p<fields.length; p++) {
var currInput = fields[p];
if (currInput.name.indexOf("userPickerId")>-1
&& currInput.name.indexOf("textbox___old")<0) {
updateDisplayField = currInput;
}
}
for (var i = 0; i < pickedObjs.length; i++) {
if (pickedObjs[i] != null) {
var userOid = pickedObjs[i].oid;
var displayAttr = eval("pickedObjs[i].fullName");
updateHiddenField.value=userOid;
updateDisplayField.value=displayAttr;
}
}
}
}