Overriding Method issues
I get an error:
The method deleteOK method of type UserBean must overide a superclass method
but as far as I can see, I am overriding a superclass method.
subclass method:
@Override
public String deleteOk()
{
String outcome = super.deleteOK();
List<Node> users = getUsers();
for(Node user : users)
{
System.out.println(user.getName());
logger.info("DAVE" + user.getName());
}
return outcome;
}
superclass method:
public String deleteOK()
{
FacesContext context = FacesContext.getCurrentInstance();
try
{
String userName = (String)getPerson().getProperties().get("userName");
// we only delete the user auth if Alfresco is managing the authentication
Map session = context.getExternalContext().getSessionMap();
if (session.get(LoginBean.LOGIN_EXTERNAL_AUTH) ==null)
{
// delete the User authentication
try
{
authenticationService.deleteAuthentication(userName);
}
catch (AuthenticationException authErr)
{
Utils.addErrorMessage(Application.getMessage(context, ERROR_USER_DELETE));
}
}
// delete the associated Person
this.personService.deletePerson(userName);
// re-do the search to refresh the list
search();
}
catch (Throwable e)
{
// rollback the transaction
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(context,
ERROR_DELETE), e.getMessage()), e);
}
return DIALOG_CLOSE;
}
Can anybody point out the schoolboy mistake I am making?

