[ 
https://issues.apache.org/jira/browse/WICKET-1362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576793#action_12576793
 ] 

Alex Jacoby commented on WICKET-1362:
-------------------------------------

It doesn't say this in the javadocs -- perhaps they could be updated?  Also, 
the fact that it does work in FF makes it seem like it should be possible.

The benefit to adding it to the form itself, rather than the component, is that 
you don't need to attach the behavior to multiple components that could submit 
the form.  Could this be changed to an RFE?  Or is there some inherent reason 
that makes the desired behavior impossible?

Thanks,
Alex

> AjaxFormSubmitBehavior doesn't work in Safari
> ---------------------------------------------
>
>                 Key: WICKET-1362
>                 URL: https://issues.apache.org/jira/browse/WICKET-1362
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-final, 1.3.1
>         Environment: Safari 3.0.4 (OS X)
>            Reporter: Alex Jacoby
>            Assignee: Matej Knopp
>            Priority: Minor
>             Fix For: 1.3.2
>
>
> Create a simple form.  Add an AjaxFormSubmitBehavior to it.  The onSubmit of 
> the AjaxFormSubmitBehavior is never called when using Safari, though it works 
> in FF.
> Sample code:
> public class TestPage extends WebPage {
>     private static final long serialVersionUID = 1L;
>     private String _text;
>     public String getText() { return _text; }
>     public void setText(String text) { _text = text; }
>     
>     public TestPage() {
>         Label dummyLabel = new Label("dummy", new PropertyModel(this, 
> "text"));
>         dummyLabel.setOutputMarkupId(true);
>         add(dummyLabel);
>         
>         Form form = new Form("form", new CompoundPropertyModel(this));
>         add(form);
>         form.add(new TextField("text"));
>         form.setOutputMarkupId(true);
>         form.add(new AjaxFormSubmitBehavior(form, "onsubmit") {
>             @Override
>             protected void onSubmit(AjaxRequestTarget target) {
>                 System.out.println("onSubmit!"); // NEVER CALLED!
>             }
>             @Override
>             protected void onError(AjaxRequestTarget target) {
>                 System.out.println("onError!"); // NEVER CALLED!
>             }
>             private static final long serialVersionUID = 1L;
>         });
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to