[
https://issues.apache.org/jira/browse/DELTASPIKE-446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gerhard Petracek reassigned DELTASPIKE-446:
-------------------------------------------
Assignee: Mark Struberg
> windowhandler.js doesn't handle nested ajax calls
> -------------------------------------------------
>
> Key: DELTASPIKE-446
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-446
> Project: DeltaSpike
> Issue Type: Bug
> Components: JSF-Module
> Affects Versions: 0.5
> Environment: JBoss AS 7.2 / EAP 6.1
> Reporter: Gerald Turner
> Assignee: Mark Struberg
>
> I get the exception "org.jboss.weld.context.ContextNotActiveException:
> WELD-001303 No active contexts for scope type
> org.apache.deltaspike.core.api.scope.WindowScoped" from a commandButton ajax
> call that is nested in a form that had been updated by another commandLink
> ajax call.
> These pages had been working with CODI.
> Scenario is a "delete confirmation" dialog, using PrimeFaces (p:dialog
> dynamic="true" may be the culprit):
> I have a p:dataTable, with a column with a p:commandLink ("Delete"), this
> link updates a p:dialog ("Are you sure?"). The p:dialog contains a
> p:commandButton ("Yes").
> Both the contents of the dialog and the actionListener of the commandButton
> access a @WindowScoped bean.
> Tracing the XHR POSTs, I see dsPostWindowId being sent when the first delete
> button is click, and it is not present with the final confirmation button is
> clicked.
> Scrutinizing over windowhandler.js, I can imagine that when the page is first
> loaded, 'jsf.ajax.addOnEvent(ajaxOnClick)' works it's magic and
> 'applyWindowId()' is effective for the first ajax call, but then the page has
> new elements which have not been decorated, so the second/nested ajax call
> doesn't have the dsPostWindowId parameter.
--
This message was sent by Atlassian JIRA
(v6.1#6144)