I have a problem with the <p:chips> component. I am using Primefaces 6.1.16 and the compont could properly display values in the list, but fails at saving them back in the list. Here are the code snippets:
XHTML
Code: Select all
<p:chips id="chips" value="#{manageEditServicesBean.extAttributeFeature.chips}" />
<p:commandButton
id="btnTest"
value="Test"
actionListener="#{manageEditServicesBean.extAttributeFeature.chpimunk}"
process="chips, @this"/>
Code: Select all
public class ExtAttributeFeature {
@Getter
@Setter
private List<String> chips = new ArrayList<>();
....
Code: Select all
ullAjaxExceptionHandler: An exception occurred during processing JSF ajax request. Error page '/app/pages/error500.xhtml' will be shown.
java.lang.ClassCastException: java.lang.String cannot be cast to [Ljava.lang.String;
at org.primefaces.component.chips.ChipsRenderer.getConvertedValue(ChipsRenderer.java:198)
at javax.faces.component.UIInput.getConvertedValue(UIInput.java:1045)
at javax.faces.component.UIInput.validate(UIInput.java:975)
Kind regards,
Felix