Resource resource = getResourceModel().getObject();
Contract contract = resource.getContract();
if(resource.getId() != null) {
return getString(MKEY_PAGE_TITLE, new Model(
new PipedMap().putObject(KEY_RESOURCE_TITLE, resource.getTitle()).
putObject(KEY_CONTRACT_TITLE, contract.getTitle())));
} else {
return getString(MKEY_NEW_PAGE_TITLE, new Model(
new PipedMap().putObject(KEY_CONTRACT_TITLE, contract.getTitle())));
}
}