我index.xhtml
看起来像JSF/Primefaces选择一个菜单导致问题
<p:selectOneMenu value="#{tBean.selectedChartType}"
converter="entityConverter">
<f:selectItems value="#{tBean.chartTypes}" var="chart"
itemLabel="#{chart}" />
</p:selectOneMenu>
这从我的托管bean
private List<ChartType> chartTypes = Arrays.asList(ChartType.values());
我枚举
public enum ChartType {
Line("line"), Spiral_Line("spline"), Area("area"), Spiral_Area("areaspline");
private String code;
private ChartType(String code) {
this.code = code;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
}
呈现ENUM列表现在,当我运行这在浏览器上的.jsf有时会抛出错误:
XML Parsing Error: undefined entity
Location: http://xxxx/index.sf
Line Number 54, Column 733:
当我看源代码,我发现
这是造成这个错误,我猜。
我使用JSF 2.2.0
和Primefaces 3.5
可能有人请帮助我这个问题?
可能重复的[JSF和类型安全](http://stackoverflow.com/questions/16433250/jsf-and-type-safety) – skuntsel
@skuntsel它怎么可能重复? – Makky
这是一个肯定的错误投票,但我不能不幸取消它。 – skuntsel