I found the problem with this eventually, it was related to using NTLM 
authentication. IE doesn't perform any POST on forms until you've negotiated 
the password hashes again. Something which we seem to not do :)

Alex

-----Opprinnelig melding-----
Fra: Alexander Landsnes Keül [mailto:[EMAIL PROTECTED] 
Sendt: 3. juli 2008 12:21
Til: users@wicket.apache.org
Emne: TextField in IE and Opera

I'm having a wee bit of a problem getting TextFields to cooperate in our 
project. I'm baffled by the problem, because it's something that's been working 
fine for months.

 

The panel I'm working with is very a simple, a form with two text fields; 
username and password. If I submit the form in Opera it processes the input 
correctly and I can proceed with the login. If I submit with IE 7, both 
TextFields are submitted with a null value which isn't terribly useful to me.

 

The code is as follows:

 

public LoginPanel ( final String id )

      {

            super(id, new ResourceModel("message.login_header"));

            setOutputMarkupId(true);

 

            final FeedbackPanel feedback = new FeedbackPanel("feedback");

            feedback.setOutputMarkupId(true);

            add(feedback);

 

            final Form form = new Form("form");

            form.setOutputMarkupId(true);

            add(form);

 

            final FormComponent username = new TextField("username", new 
Model(), String.class);

            username.setLabel(new ResourceModel("label.username"));

            username.setRequired(true);

            form.add(username);

            form.add(new SimpleFormComponentLabel("username_label", username));

 

            final FormComponent password = new PasswordTextField("password", 
new Model());

            password.setLabel(new ResourceModel("label.password"));

            password.setRequired(true);

            form.add(password);

            form.add(new SimpleFormComponentLabel("password_label", password));

 

            final AjaxFallbackButton submit = new AjaxFallbackButton("submit", 
form)

            {

                  private static final long serialVersionUID = 1L;

 

                  @Override

                  public void onSubmit( final AjaxRequestTarget target, final 
Form form )

                  {

                        String user = (String) username.getConvertedInput();

                        String pwd = (String) password.getConvertedInput();

                        String abc = username.getRawInput();

                        

                        loginAction(user, pwd, target);

                  }

 

                  @Override

                  public void onError( final AjaxRequestTarget target, final 
Form form )

                  {

                        error("BAD!");

                  }

            };

 

            submit.setModel(new ResourceModel("button.login"));

            form.add(submit);

      }

 

I've tried to create class member models for the TextFields, I've tried to 
fetch the values from the TextFields with getModelObject(), 
getModelObjectAsString(), getInput()...none of them work. I've tried to 
downgrade from wicket 1.3.4 to wicket 1.3.3, which I know worked with IE, and 
still no joy.

 

I don't think my code will help overly much, but it's worth pasting it at 
least. The panel replaces another panel when I click on an ajax link, might be 
related to that but again it's worked like this before.

 

Alex


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

Reply via email to