问题描述
我有一个问题,整合JSF2.0作为视图技术来访问Spring WebFlow。我设法得到它差不多的工作,唯一剩下的是配置为JSF2.0的Ajax支持。
I have a problem integration JSF2.0 as a view technology to spring webflow.I managed to get it "almost" working, the only thing left is configuring ajax support for JSF2.0.
Ajax请求被发送,接收来自服务器的响应,但响应不会触发重新渲染的组分。
Ajax requests are sent, responses from the server are received, but the response doesn't trigger re-rendering of the component.
一些线索,以帮助解决问题:
Few clues to help to solve the problem:
-
当谈到生成的.js资源链接,JSF的行为是错误的。 JSF尝试访问以下链接:
When it comes to generating .js links to resources, JSF behavior is wrong. JSF tries to access the following link:
的${context_path}/${flow_name}/javax.faces.resource/jsf.js?ln=javax.faces这使404回。我只好硬code模板中的以下链接以获得一些Ajax支持的:
http://localhost:8080/${context_path}/${flow_name}/javax.faces.resource/jsf.js?ln=javax.facesThis gives 404 back. I had to hard-code the following link in the template to get some of the ajax support:
的${context-path}/javax.faces.resource/jsf.js.faces?ln=javax.faces (我发现这个链接交换的网络流量关闭,调查普通的JSF处理页面的源代码code)之后
http://localhost:8080/${context-path}/javax.faces.resource/jsf.js.faces?ln=javax.faces (I found this link after switching the web-flow off and investigating the source code of plain JSF processed page)
我想,那JSF的配置是否正确。如果我从加工链条掉落的Webflow,一切都将按预期。链接都OK,重新渲染的成分是确定
I assume, that the configuration of JSF is correct. If I drop the webflow from the processing chain, everything works as expected. Links are OK, re-rendering of the component is OK
如果我暴露我的服务@ManagedBean(JSF本地方法),不要使用Spring的bean重新绘制工作正常,但我不能与Webflow的互动和流量范围变量(基于网络流没有看到本土@ManagedBeans)和我还是必须使用硬codeD链接。
If I expose my services as @ManagedBean (JSF native approach) and don't use Spring backed beans re-rendering works fine, but I'm not able to interact with webflow and flow scoped variables (web-flow doesn't see native @ManagedBeans) and still I have to use the hard-coded links.
我没有任何春资源的servlet /过滤器。我不使用urlRewrite规则转发到我的流量。
I don't have any Spring resource servlet / filter. I don't use urlRewrite rules to forward to my flows.
如果配置文件是必需的 - 我将发布他们的问题
If config files are required - I will post them in the question.
任何帮助是AP preciated。看来,这是一个使用整个技术堆栈的阻塞问题。
Any help is appreciated. Seems that this is a blocking issue of using the whole technology stack.
推荐答案
资源应该呈现的罚款。你可以在这里找到一些工作示例:的
Resources should render fine. You can find some working samples here:https://src.springframework.org/svn/spring-samples/webflow-primefaces-showcase/
也看到了分布预订,脸样本。
Also see the booking-faces sample in the distribution.
这篇关于如何配置Spring Webflow的使用JSF 2.0?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!