Pular para o conteúdo

Ajuda com OpenSwing Controle de Acesso

Responder tópico
  • Denunciar
  • Indicar

1. Ajuda com OpenSwing Controle de Acesso

Enviado em 04/11/2013 - 22:30h

Pessoal sou novo aki no fórum, estou tentando fazer o controle de acesso em um projeto MDI, no metodo authenticateUser está dando erro no segundo if. Segue abaixo o codigo;

public boolean authenticateUser(Map loginInfo) throws Exception {

username = (String) loginInfo.get("username");
String password = (String) loginInfo.get("password");
if (username == null || password == null) {
return false;
}

username = username.toUpperCase();
password = password.toUpperCase();
loginInfo.put("username", username);
loginInfo.put("password", password);

Response response = ClientUtils.getData("login", new String[]{username, password});

if (response.isError()) { // Esta entrando aki neste If - dando erro
throw new Exception(response.getErrorMessage());
}

String languageId = ((TextResponse) response).getMessage();

ButtonsAuthorizations buttonsAuthorizations = (ButtonsAuthorizations) ((VOResponse) ClientUtils.getData("getButtonAuthorizations", new Object[0])).getVo();

Hashtable xmlFiles = new Hashtable();
xmlFiles.put("EN", "Resources_en.xml");
xmlFiles.put("IT", "Resources_it.xml");
ClientSettings clientSettings = new ClientSettings(
new XMLResourcesFactory(xmlFiles, true),
domains,
buttonsAuthorizations,
false);
ClientSettings.PERC_TREE_FOLDER = "folder3.gif";
ClientSettings.BACKGROUND = "background4.jpg";
ClientSettings.TREE_BACK = "treeback2.jpg";

ClientSettings.getInstance().setLanguage(languageId);
return true;

}

Me ajudem

Responder tópico

Responder tópico

Responder tópico

Entre na sua conta para responder.

Fazer login para responder