Hi,

Method selectOption from Select seems not to work...

My code is the following:

    Option[] types = {
      new Option("user_auth", "user_auth", "Utilisateur authentifié"), 
      new Option("moderator", "moderator", "Modérateur"), 
      new Option("administrator", "administrator", "Administrateur")
    };
    int selected = 0;
    int t = userToModify.getType();
    if(t == IType.USER_AUTH)
      selected = 0;
    else if(t == IType.MODERATOR)
      selected = 1;
    else if(t == IType.ADMINISTRATOR)
      selected = 2;
    // I checked: here t is 2 in my example
    Select typesOption = new Select("type", types);
    typesOption.selectOption(selected);

But when displaying HTML page, no item is selected in the Select form.
I checked HTML source code too...

What am I doing wrong?

I'm using this archive:
http://apache.mirror.cygnal.ca/jakarta/ecs/binaries/ecs-1.4.2.tar.gz

Thanks
Jean-François

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to