[ https://issues.apache.org/jira/browse/WICKET-1543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601348#action_12601348 ]
Kent Tong commented on WICKET-1543: ----------------------------------- For example, a form with a text field, if the user presses Enter, it is desired that the form be submitted using ajax. > 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.