This content has been marked as final. Show 2 replies
How is the flow working? How are you invoking your JSF pages from Flex? are you using HTTPService component to send the request?
I created jsp pages and embeded Flex application within these pages. I do use HTTPService to pass the data between the Flex components and the back bean.
I ran into two major problems though. I couldn't get FacesContext consistantly meaning that I got null when the servlet tries to call FacesContext.getCurrentInstance() or
FacesContextFactory contextFactory =
LifecycleFactory lifecycleFactory =
Lifecycle lifecycle = lifecycleFactory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE);
facesContext = contextFactory.getFacesContext(
this.getServletContext(), request, response, lifecycle);
I may have solved this problem by getting the bean directly from the HttpServletRequest. But if the back bean tries to use other faces context such as ExternalContext, then it gets null.
The second problem I ran into is that I can't to create two instances of the same Flex application. I try to use SWFObject to create two instances of the same Flex application in two different jfp pages. The initial HTTPService is not called for the second page. It appears that the application re-uses the same data for the second page. I asked this question in this Forum before but I didn't get any answer.