You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Kent Tong (JIRA)" <ji...@apache.org> on 2007/09/22 05:20:50 UTC
[jira] Created: (WICKET-997) AjaxButton using null as the form in
the onSubmit() callback
AjaxButton using null as the form in the onSubmit() callback
------------------------------------------------------------
Key: WICKET-997
URL: https://issues.apache.org/jira/browse/WICKET-997
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.3.0-beta3
Reporter: Kent Tong
Priority: Minor
If the following constructor is used:
public AjaxButton(String id)
{
this(id, null);
}
Then the "form" field is null. This is fine if we use getForm() to find its form. But the code below
is using its "form" field when calling the callbacks:
public AjaxButton(String id, final Form form)
{
super(id);
this.form = form;
add(new AjaxFormSubmitBehavior(form, "onclick")
{
protected void onSubmit(AjaxRequestTarget target)
{
AjaxButton.this.onSubmit(target, form); //BUG: using the field, not getForm()
}
protected void onError(AjaxRequestTarget target)
{
AjaxButton.this.onError(target, form); //BUG: using the field, not getForm()
}
......
});
}
So either getForm() should be used or that constructor should be removed (consistent with AjaxFallbackButton).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (WICKET-997) AjaxButton using null as the form in
the onSubmit() callback
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-997?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg reassigned WICKET-997:
------------------------------------
Assignee: Igor Vaynberg
> AjaxButton using null as the form in the onSubmit() callback
> ------------------------------------------------------------
>
> Key: WICKET-997
> URL: https://issues.apache.org/jira/browse/WICKET-997
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.0-beta3
> Reporter: Kent Tong
> Assignee: Igor Vaynberg
> Priority: Minor
>
> If the following constructor is used:
> public AjaxButton(String id)
> {
> this(id, null);
> }
>
> Then the "form" field is null. This is fine if we use getForm() to find its form. But the code below
> is using its "form" field when calling the callbacks:
> public AjaxButton(String id, final Form form)
> {
> super(id);
> this.form = form;
> add(new AjaxFormSubmitBehavior(form, "onclick")
> {
> protected void onSubmit(AjaxRequestTarget target)
> {
> AjaxButton.this.onSubmit(target, form); //BUG: using the field, not getForm()
> }
> protected void onError(AjaxRequestTarget target)
> {
> AjaxButton.this.onError(target, form); //BUG: using the field, not getForm()
> }
> ......
> });
> }
> So either getForm() should be used or that constructor should be removed (consistent with AjaxFallbackButton).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (WICKET-997) AjaxButton using null as the form in
the onSubmit() callback
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-997?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg closed WICKET-997.
--------------------------------
Resolution: Fixed
Fix Version/s: 1.3.0-beta4
> AjaxButton using null as the form in the onSubmit() callback
> ------------------------------------------------------------
>
> Key: WICKET-997
> URL: https://issues.apache.org/jira/browse/WICKET-997
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.0-beta3
> Reporter: Kent Tong
> Assignee: Igor Vaynberg
> Priority: Minor
> Fix For: 1.3.0-beta4
>
>
> If the following constructor is used:
> public AjaxButton(String id)
> {
> this(id, null);
> }
>
> Then the "form" field is null. This is fine if we use getForm() to find its form. But the code below
> is using its "form" field when calling the callbacks:
> public AjaxButton(String id, final Form form)
> {
> super(id);
> this.form = form;
> add(new AjaxFormSubmitBehavior(form, "onclick")
> {
> protected void onSubmit(AjaxRequestTarget target)
> {
> AjaxButton.this.onSubmit(target, form); //BUG: using the field, not getForm()
> }
> protected void onError(AjaxRequestTarget target)
> {
> AjaxButton.this.onError(target, form); //BUG: using the field, not getForm()
> }
> ......
> });
> }
> So either getForm() should be used or that constructor should be removed (consistent with AjaxFallbackButton).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.