-2
我的錯誤:javax.el.PropertyNotWritableException非法語法設定操作
javax.el.PropertyNotWritableException: /rapport.xhtml @295,93 value="#
{userReporting.getNameType(userReporting.selected)}": Illegal Syntax
for Set Operation
我XHTML:
<p:selectManyMenu id="type" value="#{userReporting.getNameType(userReporting.selected)}">
<f:selectItem itemLabel="do" itemValue="do" />
<f:selectItem itemLabel="ro" itemValue="ro" />
<f:selectItem itemLabel="go" itemValue="go" />
</p:selectManyMenu>
我的豆:
public String[] getNameType(int id){
String[] strings = (String[]) this.genTypeFacade.getNameType(id).stream().toArray(String[]::new);
return strings;
}
我不能提交表單
請閱讀此答案:https://stackoverflow.com/a/2090062/1144326 –