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 2013/05/27 10:25:19 UTC

[jira] [Comment Edited] (WICKET-3808) Data, passed from ModalPage to ModalWindow, is not accessible in WindowClosedCallback

    [ https://issues.apache.org/jira/browse/WICKET-3808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13050960#comment-13050960 ] 

Martin Grigorov edited comment on WICKET-3808 at 5/27/13 8:25 AM:
------------------------------------------------------------------

In your application HomePage creates the ModalWindow, then the PageCreator creates ModalPage and passes modalWindow, which implicitly passes a reference to HomePage instance ... You just beg for OutOfMemoryError with this.

Solution: Don't pass the modalWindow and the callback to ModalPage at all. Use PageReference as in wicket-examples.
                
      was (Author: mgrigorov):
    Your application is totally ugly.
HomePage creates the ModalWindow, then the PageCreator creates ModalPage and passes modalWindow, which implicitly passes a reference to HomePage instance ... You just beg for OutOfMemoryError with this.

Solution: Don't pass the modalWindow and the callback to ModalPage at all. Use PageReference as in wicket-examples.
                  
> Data, passed from ModalPage to ModalWindow, is not accessible in WindowClosedCallback
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-3808
>                 URL: https://issues.apache.org/jira/browse/WICKET-3808
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket, wicket-extensions
>    Affects Versions: 1.5-RC4
>         Environment: Win 7, FF
>            Reporter: Mishelle Bonq
>         Attachments: project-2.rar, project.rar
>
>
> Because of changes of pages processing an unacceptable behavior was detected. During such a processing in case if we try to pass some data from page on opened modal window to a modal window (which is an element of background page). The quickstart project was made to show this wrong behavior.
> Steps to reproduce:
> 1. Run quickstart project. Open HomePage. You'll see a link "Show ModalWindow". Click it. As an action on this click a new PageCreator is set for ModalWindow, which creates a new instance of ModalPage & pass a callback to this instance. Inside the callback the visibility of hidden element from HomePage is changed (The text "Hello, World!" became visible).
>  
> 2. So, a ModalWindow will be shown with a ModalPage as content. In ModalPage you'll see another link "Close ModalWindow and show hidden text on HomePage". Click this link.
> This click must leads to setting the callback (which we've already passed in step 1 to ModalPage instance) to ModalWindow & close this ModalWindow. 
> Closing ModalWindow happens in a correct way. But we don't see the hidden text. The reason of this behavior is: when we set the callback from ModalPage to ModalWindow (element of HomePage) the numericId of HomePage is changed and this page is serialized with another id. During ModalWindow closing WindowClosedCallback is called. In this WindowClosedCallback we are trying to call our callback, which had to be set from ModalPage. But script, which handles WindowClosedCallback from browser, references to a HomePage with old numericId & of cource without set callback. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira