Discussion:
[jira] [Created] (ISIS-1963) Wicket UI: IllegalArgumentExceptions after persistent field update using AJAX
Andi Huber (JIRA)
7 years ago
Permalink
Andi Huber created ISIS-1963:
--------------------------------

Summary: Wicket UI: IllegalArgumentExceptions after persistent field update using AJAX
Key: ISIS-1963
URL: https://issues.apache.org/jira/browse/ISIS-1963
Project: Isis
Issue Type: Bug
Components: Core: Viewer: Wicket
Affects Versions: 2.0.0-M1
Reporter: Andi Huber
Fix For: 2.0.0-M1


Possibly related to the latest Isis upgrade using Wicket 8 instead of 7.9.

{noformat}

java.lang.IllegalArgumentException
Cannot update component because its page is not the same as the one this handler has been created for. Component: [PropertyEditForm [Component id = inputForm]]
org.apache.wicket.ajax.AjaxRequestHandler#add(AjaxRequestHandler.java:245)
org.apache.isis.viewer.wicket.ui.panels.PromptFormAbstract#onOkSubmittedOf(PromptFormAbstract.java:239)
org.apache.isis.viewer.wicket.ui.panels.PromptFormAbstract#access$0(PromptFormAbstract.java:223)
org.apache.isis.viewer.wicket.ui.panels.PromptFormAbstract$1#onSubmit(PromptFormAbstract.java:123)
org.apache.wicket.ajax.markup.html.form.AjaxButton$1#onSubmit(AjaxButton.java:113)
org.apache.wicket.ajax.form.AjaxFormSubmitBehavior$AjaxFormSubmitter#onSubmit(AjaxFormSubmitBehavior.java:223)
org.apache.wicket.markup.html.form.Form#delegateSubmit(Form.java:1271)
org.apache.wicket.markup.html.form.Form#process(Form.java:964)
org.apache.isis.viewer.wicket.ui.panels.FormAbstract#process(FormAbstract.java:77)
org.apache.wicket.markup.html.form.Form#onFormSubmitted(Form.java:788)
org.apache.wicket.ajax.form.AjaxFormSubmitBehavior#onEvent(AjaxFormSubmitBehavior.java:176)
org.apache.wicket.ajax.AjaxEventBehavior#respond(AjaxEventBehavior.java:127)
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior#onRequest(AbstractDefaultAjaxBehavior.java:598)
org.apache.wicket.core.request.handler.ListenerRequestHandler#internalInvoke(ListenerRequestHandler.java:306)
org.apache.wicket.core.request.handler.ListenerRequestHandler#invoke(ListenerRequestHandler.java:280)
org.apache.wicket.core.request.handler.ListenerRequestHandler#invokeListener(ListenerRequestHandler.java:222)
org.apache.wicket.core.request.handler.ListenerRequestHandler#respond(ListenerRequestHandler.java:208)
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor#respond(RequestCycle.java:912)
org.apache.wicket.request.RequestHandlerExecutor#execute(RequestHandlerExecutor.java:65)
{noformat}




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
Andi Huber (JIRA)
7 years ago
Permalink
[ https://issues.apache.org/jira/browse/ISIS-1963?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andi Huber reassigned ISIS-1963:
--------------------------------

Assignee: Andi Huber
...
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
Andi Huber (JIRA)
7 years ago
Permalink
[ https://issues.apache.org/jira/browse/ISIS-1963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16513639#comment-16513639 ]

Andi Huber commented on ISIS-1963:
----------------------------------

Pre Wicket-8 behavior [1] in Wicket's RequestHandler was simply to ignore cases of 'page is not the same as the one this handler has been created for', which do now result in an IllegalArgumentException being thrown.

So a quickfix on our side could be to simply catch these IllegalArgumentExceptions and ignore them.

[1] https://issues.apache.org/jira/browse/WICKET-6140
...
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
Andi Huber (JIRA)
7 years ago
Permalink
[ https://issues.apache.org/jira/browse/ISIS-1963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16513652#comment-16513652 ]

Andi Huber commented on ISIS-1963:
----------------------------------

This might be related to an earlier discovery by [~danhaywood] [1] finding that the actual page object gets replaced in the background, during an AJAX request response cycle, which causes similar issues, where we simply ignore the errors as reported by Wicket (XmlPartialPageUpdate warnings) on our side.

[1] https://issues.apache.org/jira/browse/ISIS-1613?focusedCommentId=16012227&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16012227
...
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
Andi Huber (JIRA)
7 years ago
Permalink
[ https://issues.apache.org/jira/browse/ISIS-1963?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andi Huber resolved ISIS-1963.
------------------------------
Resolution: Workaround

Seems safe to assume, that we do not introduce any new issues by just ignoring these exceptions.

However, we should keep in mind that we sometime have to tackle the root cause of this.
...
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
Dan Haywood (JIRA)
7 years ago
Permalink
[ https://issues.apache.org/jira/browse/ISIS-1963?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Haywood closed ISIS-1963.
-----------------------------
...
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Loading...