漂亮脸蛋与缝豆
尝试解决这个问题两天了,没有任何运气。 创建的 bean 时,就会出现问题
<url-mapping id="test">
<pattern>/test/#{testBean.param}</pattern>
<view-id>/test.faces</view-id>
</url-mapping>
当我尝试在 Pretty-config.xml 中定义一个 url 映射来中继使用 Seam bean 源
package com.web.jsfbean;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Create;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
@Name("testBean")
@Scope(ScopeType.CONVERSATION)
public class Test {
private String param;
@Create
public void init() {
param = "initialized";
}
public String getParam() {
return param;
}
public void setParam(String param) {
this.param = param;
}
}
:如果我在 faces-config 中定义这个 bean,一切都会按预期工作。
任何想法 ?
预先感谢您的任何帮助。
Trying to solve this problem for two days without any luck.
The problem occur when i try to define a url-mapping in pretty-config.xml that relay on a bean created with Seam
<url-mapping id="test">
<pattern>/test/#{testBean.param}</pattern>
<view-id>/test.faces</view-id>
</url-mapping>
bean source:
package com.web.jsfbean;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Create;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
@Name("testBean")
@Scope(ScopeType.CONVERSATION)
public class Test {
private String param;
@Create
public void init() {
param = "initialized";
}
public String getParam() {
return param;
}
public void setParam(String param) {
this.param = param;
}
}
if i define this bean in faces-config everything works as expected.
Any idea ?
Thanks in advance for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这个特定问题已在 PrettyFaces 3.0.1 版本中得到修复:
现在,当使用 Seam 2.x 时,您将使用以下类型的映射:
然后您将使用 Seam @RequestParameter("paramName") 注释来访问它。
This specific issue has been fixed in versions 3.0.1 of PrettyFaces:
Now, when using Seam 2.x, you would use the following type of mapping:
Then you would access this using the Seam @RequestParameter("paramName") annotation.
您遇到的问题到底是什么? 我对此很感兴趣。 PrettyFaces 应该与 Seam 一起使用。 尝试在用户群组中发布您的问题:http://groups.google.com/group/prettyfaces -用户
What exactly is the problem you are experiencing? I'm intrigued by this. PrettyFaces should work with Seam. Try posting your question on the users group: http://groups.google.com/group/prettyfaces-users
查看 JAX-RS。 Jersey 是 RI,我个人使用 JBoss 的产品 (RESTEasy)。这个框架将让您更简单地做您想做的事情。
Check out JAX-RS. Jersey is the RI and I personally use JBoss's offering (RESTEasy.) This framework will let you do what you want to do a little more simply.
它应该与 Seam 一起使用,尝试更改 web.xml 中过滤器的顺序。
Seam 确实捆绑 UrlRewriteFilter 如果您只想添加书签。
It is supposed to work with Seam, try changing the order of your filters in web.xml.
Seam does bundle UrlRewriteFilter if all you are after is bookmarking.