aspose file tools*
The moose likes JSF and the fly likes Converter and richfaces orderingList Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Converter and richfaces orderingList" Watch "Converter and richfaces orderingList" New topic
Author

Converter and richfaces orderingList

bostian tov
Ranch Hand

Joined: Mar 11, 2010
Posts: 32
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

Joined: Jun 25, 2001
Posts: 16012
    
  19

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
bostian tov
Ranch Hand

Joined: Mar 11, 2010
Posts: 32
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

Joined: Jun 25, 2001
Posts: 16012
    
  19

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Converter and richfaces orderingList