[
https://issues.apache.org/jira/browse/DELTASPIKE-1393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16982189#comment-16982189
]
Mark Struberg commented on DELTASPIKE-1393:
-------------------------------------------
Didn't work out anyway, it now bombs up with a NPE in {{WindowIdHtmlRenderer}}
:(
It seems not as easy than I thought. Even if we would switch to 'lazy' then it
would be wrong.
If you do a post and you have a window.name set in the browser (which contains
the DeletaSpike Window Id - dswid) then we would generate a fresh dswid if we
don't get any in the POST. So we would trash the current windowId. Doesn't
sound good either.
Can you touch the code on the sites which do the POST to the JSF page? It would
probably be enough to just hand over the parameter containing the dswid in the
form.
> POST request from a non-JSF to a JSF page fails with when ds:windowId is used
> -----------------------------------------------------------------------------
>
> Key: DELTASPIKE-1393
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1393
> Project: DeltaSpike
> Issue Type: Task
> Security Level: public(Regular issues)
> Components: JSF-Module
> Reporter: Christian Beikov
> Assignee: Mark Struberg
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> When doing a POST request to a JSF page, I'm getting the following exception.
> This worked before withouth the ds:windowId tag. I will provide a PR showing
> the issue, but I'm not sure how this can be fixed yet. Obviously, one should
> use a GET request, but I have some legacy code that uses POST and it's hard
> to identify all cases. Would be great if we could solve this for other people.
> {noformat}
> org.jboss.weld.context.ContextNotActiveException: WELD-001303: No active
> contexts for scope type org.apache.deltaspike.core.api.scope.WindowScoped
> at
> org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:689)
> at
> org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:90)
> at
> org.jboss.weld.bean.ContextualInstance.getIfExists(ContextualInstance.java:63)
> at
> org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:83)
> at
> org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:125)
> at
> org.apache.deltaspike.jsf.impl.token.PostRequestTokenManager$Proxy$_$$_WeldClientProxy.createNewToken(Unknown
> Source){noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)