You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Johan Compagner (JIRA)" <ji...@apache.org> on 2008/03/24 12:21:25 UTC

[jira] Closed: (WICKET-1414) findSubmittingButton will fail when button without form is added before form

     [ https://issues.apache.org/jira/browse/WICKET-1414?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johan Compagner closed WICKET-1414.
-----------------------------------

    Resolution: Fixed

Button.getForm() will not throw an exception

> findSubmittingButton will fail when button without form is added before form
> ----------------------------------------------------------------------------
>
>                 Key: WICKET-1414
>                 URL: https://issues.apache.org/jira/browse/WICKET-1414
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.1
>            Reporter: Petr Sakar
>            Assignee: Johan Compagner
>            Priority: Minor
>             Fix For: 1.3.3
>
>         Attachments: myproject.zip, myproject.zip
>
>
> Form submitting button is not found when page contains another button, which is not part of form and is added to the page hierarchy before form. When it is added after the form, it is working. The problem is in the method of Form class:
> 	public final IFormSubmittingComponent findSubmittingButton()
> 	{
> 		IFormSubmittingComponent submittingComponent = (IFormSubmittingComponent) getPage().visitChildren(
> 			IFormSubmittingComponent.class, new IVisitor()
> which is serching for the submitting button in the whole page instead of the form only. I think correctly should be
> 	public final IFormSubmittingComponent findSubmittingButton()
> 	{
> 		IFormSubmittingComponent submittingComponent = (IFormSubmittingComponent)visitChildren(
> 			IFormSubmittingComponent.class, new IVisitor()

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