You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Maarten Billemont (JIRA)" <ji...@apache.org> on 2010/03/24 09:53:27 UTC
[jira] Updated: (WICKET-2797) AjaxFormSubmitBehavior should be able
to find the form when added to a form.
[ https://issues.apache.org/jira/browse/WICKET-2797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maarten Billemont updated WICKET-2797:
--------------------------------------
Description:
When adding an AjaxFormSubmitBehavior to a Form specifying null as the component, the object is unable to find the Form component because it only searches its component's children:
// try to find form in the hierarchy of owning component
Component component = getComponent();
__form = component.findParent(Form.class);
should be something like:
// try to find form in the hierarchy of owning component
Component component = getComponent();
if (component.isInstance(Form.class))
__form = (Form<?>) component;
else
__form = component.findParent(Form.class);
was:
When adding an AjaxFormSubmitBehavior to a Form specifying null as the component, the object is unable to find the Form component because it only searches its component's children:
<verbatim>
// try to find form in the hierarchy of owning component
Component component = getComponent();
__form = component.findParent(Form.class);
</verbatim>
should be something like:
<verbatim>
// try to find form in the hierarchy of owning component
Component component = getComponent();
if (component.isInstance(Form.class))
__form = (Form<?>) component;
else
__form = component.findParent(Form.class);
</verbatim>
> AjaxFormSubmitBehavior should be able to find the form when added to a form.
> ----------------------------------------------------------------------------
>
> Key: WICKET-2797
> URL: https://issues.apache.org/jira/browse/WICKET-2797
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4.7
> Reporter: Maarten Billemont
>
> When adding an AjaxFormSubmitBehavior to a Form specifying null as the component, the object is unable to find the Form component because it only searches its component's children:
> // try to find form in the hierarchy of owning component
> Component component = getComponent();
> __form = component.findParent(Form.class);
> should be something like:
> // try to find form in the hierarchy of owning component
> Component component = getComponent();
> if (component.isInstance(Form.class))
> __form = (Form<?>) component;
> else
> __form = component.findParent(Form.class);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.