• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Converter and richfaces orderingList

 
bostian tov
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get this:

INFO: Converter for component [adminForm:j_id_jsp_1820320_20] cannot be discovered, so default implementation of converter will be used. Component items will be converted to String on decoding.


I am trying to pass list<SelectItem> into orderingList. I get this problem... so how should i create converter?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18226
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't believe you need a SelectItem list there. An ordinary collection will do.

I went more than a little insane trying to get that stuff to work, and what it seems to all boil down to is that there's no server-side storage of the model for the RichFaces orderingList. Instead, it has to be serialized to text (String) form, written to the client, then the client has to send it back again. In text form. So you need a converter that will do the job, both converting the collection to a serialized string, and reconstructing the elements from the serialized string.
 
bostian tov
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your reply. I am using List<SelectItem> and i made converter that convert list in string and string back to list. But i get jsf error:

sourceId=adminForm:listShuttle[severity=(ERROR 2), summary=("Component adminForm:listShuttle has invalid value expression javax.faces.model.SelectItem@12b71eb"), detail=("Component adminForm:listShuttle has invalid value expression javax.faces.model.SelectItem@12b71eb")]


So i think the problem is in converter, when i convert string back to object value of SelectItem object.



So should i do like this?

 
Tim Holloway
Saloon Keeper
Pie
Posts: 18226
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll have to direct you to their examples. Not the ones in the online documentation/PDF - which don't go into details . The ones in the distributed source code. My memory isn't good enough to say for sure. But you're on the right general track.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic