• Post Reply Bookmark Topic Watch Topic
  • New Topic

Primefaces Chips Web Component  RSS feed

 
marcel vieira
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone!

I have a CRUD and I want to change the inputTexArea to the new Primefaces chips component

The entity class:


When I click on Save, occurs an Exception:

Does anyone knows how can I resolve it ?
Thanks in advance.
 
Rob Spoor
Sheriff
Posts: 20895
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you need to have getTags and setTags as Lists and not as Strings?

The value that's set by the UI is a String (or some other version of CharSequence), and your setTag method only accepts a List. I'd either change the two methods to return/accept String, or overload setTag to also take a String:
 
marcel vieira
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Spoor wrote:Do you need to have getTags and setTags as Lists and not as Strings?

The value that's set by the UI is a String (or some other version of CharSequence), and your setTag method only accepts a List. I'd either change the two methods to return/accept String, or overload setTag to also take a String:


Hi Rob!
I already tried to use the way you showed (setting to Strings), but I got the same exception.
Today I saw the https://www.primefaces.org/docs/guide/primefaces_user_guide_6_1.pdf and they gave the example below when using chips component:



Even like these example, I still got the Exception.
In my case, I'm saving the registries in a database and I don't know how to do that.
Please, help.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!