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

Kent Tong commented on WICKET-1543:
-----------------------------------

There could be some other input elements and one of which may be focused.

> AjaxFormSubmitBehavior fails to find the form if it is added directly to the 
> form
> ---------------------------------------------------------------------------------
>
>                 Key: WICKET-1543
>                 URL: https://issues.apache.org/jira/browse/WICKET-1543
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.3
>            Reporter: Kent Tong
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> In the getForm() method in AjaxFormSubmitBehavior, when it is looking for the 
> enclosing Form, it starts from the parent of the associated component. This 
> will fail if the associated component itself is the Form:
>       protected Form getForm()
>       {
>               if (form == null)
>               {
>                       Component component = getComponent();
>                       form = (Form)component.findParent(Form.class); //fails 
> if "component" itself is the Form
>                       ...
>               }
>       }

-- 
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