You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (Resolved) (JIRA)" <ji...@apache.org> on 2012/04/16 10:44:36 UTC
[jira] [Resolved] (WICKET-4495) AjaxFallbackButton , onclick
Behaviour ist registered per Default for onSubmit Functionlaity
[ https://issues.apache.org/jira/browse/WICKET-4495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov resolved WICKET-4495.
-------------------------------------
Resolution: Incomplete
Closing as "Incomplete" until a failing test case is provided.
> AjaxFallbackButton , onclick Behaviour ist registered per Default for onSubmit Functionlaity
> --------------------------------------------------------------------------------------------
>
> Key: WICKET-4495
> URL: https://issues.apache.org/jira/browse/WICKET-4495
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.5
> Reporter: otto
> Priority: Minor
> Labels: newbie
>
> Why does AjaxFallbackButton register per default an onclick Behaviour,
> and not an onsubmit behaviour ?
> With this, FormTester.submit , emulating a submit Behaviour, does not find the correct beaviour to execute in
> WicketTesterHelper.findAjaxEventBehavior(Component component, String event)
> Bug may be related to WICKET 2783 ?
> public AjaxFallbackButton(String id, IModel<String> model, Form<?> form)
> {
> super(id, model);
> mForm = form;
> add(new AjaxFormSubmitBehavior(form, "onclick")
> {
> private static final long serialVersionUID = 1L;
> @Override
> protected void onSubmit(AjaxRequestTarget target)
> {
> AjaxFallbackButton.this.onSubmit(target, AjaxFallbackButton.this.getForm());
> }
> @Override
> protected void onError(AjaxRequestTarget target)
> {
> AjaxFallbackButton.this.onError(target, AjaxFallbackButton.this.getForm());
> }
> @Override
> protected CharSequence getEventHandler()
> {
> return new AppendingStringBuffer(super.getEventHandler()).append("; return false;");
> }
> @Override
> protected IAjaxCallDecorator getAjaxCallDecorator()
> {
> return AjaxFallbackButton.this.getAjaxCallDecorator();
> }
> @Override
> protected AjaxChannel getChannel()
> {
> return AjaxFallbackButton.this.getChannel();
> }
> @Override
> public boolean getDefaultProcessing()
> {
> return AjaxFallbackButton.this.getDefaultFormProcessing();
> }
> });
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira