SetAttributeAction setFirstname = new SetAttributeAction("firstname", "value", e.getFirstname());
// Create an ajax action for setting the "value" attribute of the "surname" html element:
SetAttributeAction setSurname = new SetAttributeAction("surname", "value", e.getSurname());
// Create the ajax response:
AjaxResponse response = new AjaxResponseImpl();
// Add the actions to the response:
response.addAction(setFirstname);
response.addAction(setSurname);
return response;
}