• Post Reply Bookmark Topic Watch Topic
  • New Topic

FacesConverter and <h:selectManyListbox>  RSS feed

 
Sven Moschel
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a problem with converting the items of a "selectManyListbox". In the getAsObject method I receive the key of my selected object. But where can I get this object? I don´t want to load it again from database. The objects are already assigned to the listbox. Is there a generic way to get this objects from the component?

I need something like that:



Best,
Sven
 
Tim Holloway
Bartender
Posts: 18663
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The HTML components are exactly what their name says. Components that work as HTML.

Binary objects and HTML don't mix, since HTML is a text format. The only way to resolve that would be to encode a serialized copy of the binary object as text. Which is exactly what email attachments do.

However, that's not something that you normally see in web browsers. For one thing, it can really bulk up the size of your network transmissions. Plus, any time you send internal information out to the client and bak, it can be hacked.

A good ORM system can minimize the overhead for retrieving objects by key. If that's not a viable solution, you can store the object in your session or application scope.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!