Bonjour ,
Je developpe dans le cadre d'un stage de fin d'étude une application en GWT spring hibernate ,
j'ai crée plusieurs interfaces ce qui implique plusieurs Entrypoints , je veux faire la rederiction à partir de la page d'authentification à l'aide d'un comboBox , et j'arrive pas à recuperer la valeur en int ,il prend jamais les valeurs selectionné du combobox ni 1 ni 2 ni 3 .....
j'ai essayé avec
switch(profil.intvalue())
avec Integer profil=(Integer) cmbprofils.getvalue();
voici un bou de code du loginEntry.java

public class LoginEntry implements EntryPoint
{

public void onModuleLoad()
{

final TabSet theTabs = new TabSet();
theTabs.setWidth(500);
theTabs.setHeight(350);

Tab item = new Tab();
item.setTitle("Connexion");


// DataSource dataSource = new DataSource();

TextItem login = new TextItem("login", "Username");
PasswordItem password = new PasswordItem("password", "Password");
CheckboxItem rememberField = new CheckboxItem("remember", "Se souvenir du mot de passe.");

// Liste des profils de connexion
final SelectItem cmbProfils = new SelectItem() ;
cmbProfils.setTitle("Profil");
cmbProfils.setName("profil");
cmbProfils.setValueField("roleID");
cmbProfils.setDisplayField("roleLibelle");
cmbProfils.setOptionDataSource(RoleDS.getInstance()) ;


// TextBox txt=new TextBox();
// txt.setText(cmbProfils.getValueField());
// txt.getText();

final DynamicForm form = new DynamicForm();
form.setFields(login, password, cmbProfils, rememberField);

IButton validateItem = new IButton("Log in");
validateItem.setIcon("connect.png");
validateItem.addClickHandler(new ClickHandler()
{
public void onClick(ClickEvent event)
{
if (form.validate(false))
{
AuthenticationServiceAsync service = GWT.create(AuthenticationService.class);
String login = form.getValueAsString("login");
String password = form.getValueAsString("password");
Integer profil = (Integer) form.getValue("profil");
service.authenticate(login, password, profil, new AsyncCallback<ReturnMemento>(){

public void onSuccess(ReturnMemento result)
{
if (result.getCode() == ReturnMemento.CODE_SUCCESS){

String path = Window.Location.getPath();
String modulePath = "/com.mp.Login/Login.html";
int index = path.indexOf(modulePath);
String contextPath = path.substring(0,index);

Integer prof = (Integer) form.getvalue("profil");

switch(prof){
case 1:Window.open(contextPath+"/com.mp.Directeur/Directeur.html?locale=fr", "_self", "");
case 2:Window.open(contextPath+"/com.mp.Ressource/Ressource.html?locale=fr", "_self", "");
// case 3:Window.open(contextPath+"/com.mp.Chef_P/Chef_P.html?locale=fr", "_self", "");



}


}
else{
form.setErrors(result.getErrors(), true);
}
}

public void onFailure(Throwable arg0)
{
SC.say("Erreur de connexion : " + arg0);
}
});
}

}
});



merci pour votre aide !