Hi Tom,
In each event in a field on an XPage you have the option to create Client Side and Server Side Javascript. If you want to run server side code when the user presses return then in the client side then do something like:
if (thisEvent.keyCode==13) {
return true;
}else{
return false;
}
This will then send the keypress onto the server side event (if there is one) to execute.
In the server side event you can then get a handle onto whichever field you're working with to get the value which was submitted using either:
getComponent("myfield").getValue();
or
getComponent("myfield").getSubmittedValue();
Hope this helps.
Matt