You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Matej Knopp (JIRA)" <ji...@apache.org> on 2007/03/25 22:47:32 UTC

[jira] Created: (WICKET-418) Ajax requests don't detach component models

Ajax requests don't detach component models
-------------------------------------------

                 Key: WICKET-418
                 URL: https://issues.apache.org/jira/browse/WICKET-418
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.3
            Reporter: Matej Knopp
         Assigned To: Matej Knopp


After ajax request the component models are not detached. Page onDetach should detach those models, but since the page itself is not attached, the onDetach method is not called.

It's necessary to always call page.detachModels after request. And we should only call page.detach from the request target. The ajax request target should not page.detach, as the behaviorrequesttarget should do that. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-418) Ajax requests don't detach component models

Posted by "Matej Knopp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12483977 ] 

Matej Knopp commented on WICKET-418:
------------------------------------

Looking at page#onDetach, I'd say it should be called if at least one component on page was attached. Or after every request. Because right now the versionManager.endVersion is not called for ajax request. 

> Ajax requests don't detach component models
> -------------------------------------------
>
>                 Key: WICKET-418
>                 URL: https://issues.apache.org/jira/browse/WICKET-418
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3
>            Reporter: Matej Knopp
>         Assigned To: Matej Knopp
>
> After ajax request the component models are not detached. Page onDetach should detach those models, but since the page itself is not attached, the onDetach method is not called.
> It's necessary to always call page.detachModels after request. And we should only call page.detach from the request target. The ajax request target should not page.detach, as the behaviorrequesttarget should do that. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-418) Ajax requests don't detach component models

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484000 ] 

Igor Vaynberg commented on WICKET-418:
--------------------------------------

see my commit, it probably fixes this

> Ajax requests don't detach component models
> -------------------------------------------
>
>                 Key: WICKET-418
>                 URL: https://issues.apache.org/jira/browse/WICKET-418
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3
>            Reporter: Matej Knopp
>         Assigned To: Matej Knopp
>
> After ajax request the component models are not detached. Page onDetach should detach those models, but since the page itself is not attached, the onDetach method is not called.
> It's necessary to always call page.detachModels after request. And we should only call page.detach from the request target. The ajax request target should not page.detach, as the behaviorrequesttarget should do that. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-418) Ajax requests don't detach component models

Posted by "Matej Knopp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matej Knopp resolved WICKET-418.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3

> Ajax requests don't detach component models
> -------------------------------------------
>
>                 Key: WICKET-418
>                 URL: https://issues.apache.org/jira/browse/WICKET-418
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3
>            Reporter: Matej Knopp
>         Assigned To: Matej Knopp
>             Fix For: 1.3
>
>
> After ajax request the component models are not detached. Page onDetach should detach those models, but since the page itself is not attached, the onDetach method is not called.
> It's necessary to always call page.detachModels after request. And we should only call page.detach from the request target. The ajax request target should not page.detach, as the behaviorrequesttarget should do that. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-418) Ajax requests don't detach component models

Posted by "Matej Knopp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12483978 ] 

Matej Knopp commented on WICKET-418:
------------------------------------

I see possible solution in removing page.onDetach and 
creating page.detachPage() {

	detach();

	detachModels();
		
	endVersion();
		
	super.onDetach();
}

this should be called from every detach() of request target that operates on a page. Also the page.detach() from AjaxRequestTarget should be removed.

> Ajax requests don't detach component models
> -------------------------------------------
>
>                 Key: WICKET-418
>                 URL: https://issues.apache.org/jira/browse/WICKET-418
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3
>            Reporter: Matej Knopp
>         Assigned To: Matej Knopp
>
> After ajax request the component models are not detached. Page onDetach should detach those models, but since the page itself is not attached, the onDetach method is not called.
> It's necessary to always call page.detachModels after request. And we should only call page.detach from the request target. The ajax request target should not page.detach, as the behaviorrequesttarget should do that. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.