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 (JIRA)" <ji...@apache.org> on 2019/03/15 10:20:00 UTC
[jira] [Commented] (WICKET-6619) Trying to close more than 2
ModalWindows in the same request gives exception
[ https://issues.apache.org/jira/browse/WICKET-6619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16793512#comment-16793512 ]
Martin Grigorov commented on WICKET-6619:
-----------------------------------------
The problem here is that the modal windows contain each other, like matryoshka doll.
So when the grandparent is closed it is actually made invisible in Wicket component tree. Then if you try to close any of its (grand)children then since they are also invisible (isVisibleInHierarchy() == false) Wicket doesn't allow any action on them and throws org.apache.wicket.authorization.UnauthorizedActionException which leads to the AccessDeniedPage.
I've reworked your quickstart to it closes the modal windows from grandchildren up to the parent, one by one.
> Trying to close more than 2 ModalWindows in the same request gives exception
> ----------------------------------------------------------------------------
>
> Key: WICKET-6619
> URL: https://issues.apache.org/jira/browse/WICKET-6619
> Project: Wicket
> Issue Type: Bug
> Components: wicket, wicket-extensions
> Affects Versions: 8.1.0
> Reporter: Oddgeir Bell
> Priority: Major
> Labels: ModalWindow
> Attachments: 6619.tgz, multipleModals.zip
>
>
> We have an application where you can open a ModalWindow which allows you to open another ModalWindow, etc...
> If you perform a certain operation in the topmost window, we need to close all the windows in the same request. This works with 1-2 open windows, but if the user opens 3 or more, we get a warning in the log:
> "Handling the following exception: org.apache.wicket.core.request.handler.ListenerInvocationNotAllowedException: Behavior rejected interface invocation. Component: [ModalWindow [Component id = modal]] Behavior: org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow$WindowClosedBehavior@52e7e937"
> and the user is redirected to org.apache.wicket.markup.html.pages.AccessDeniedPage.
>
> I made a quickstart (will upload after creating this issue, since it seems uploading before that doesn't work) where you can see this. Click the "Open new Modal" button 3 times, followed by "Close modals" and it fails...
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)