更新时间:2023-08-28 23:38:28
java.lang.String无法转换为javax.faces.component.UIComponent.
java.lang.String cannot be cast to javax.faces.component.UIComponent.
binding
属性必须引用UIComponent
,而不是普通香草String
.的确,您忘记了属性值周围的#{}
,因此将其视为普通香草String
.
The binding
attribute must refer an UIComponent
, not a plain vanilla String
. And indeed, you forgot the #{}
around the attribute value which would make it to be treated as a plain vanilla String
.
相应修复:
binding="#{saProductCategoryController.dtProductCategory}"