【发布时间】:2011-10-24 09:21:15
【问题描述】:
我正在使用 3.0 M3 。当我在 faces-config.xml 中声明我的托管 bean 时,它运行良好,但是当我尝试使用相同的代码时 注释 @Managed bean @Request Scoped,它表示目标 UN-reachable。
我也试过 2.2,但它又说同样的问题。 我正在使用玻璃鱼 v3
@ManagedBean
@SessionScoped
public class Profile implements Serializable{
private String userId;
private String password;
private int code;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
我是这样称呼他们的
<h:form>
<p:panel style="margin-top: 200px;margin-left: 300px;margin-right: 300px;" header="Welcome">
<h:outputText value="Your Code ? "/>
<h:inputText required="true" requiredMessage="Enter user id" value="#{Profile.userId}"/>
<h:outputText value="Password "/>
<h:inputSecret required="true" requiredMessage="Enter password id" value="#Profile.password}"/>
<h:commandButton action="#{Profile.varify}" value="Next"/>
</p:panel>
</h:form>
【问题讨论】:
标签: jsf-2 primefaces