[
https://jira.jboss.org/jira/browse/JBSEAM-4497?page=com.atlassian.jira.pl...
]
Stuart Douglas commented on JBSEAM-4497:
----------------------------------------
I have a conversation scoped converter like this that works quite well, in the getAsString
method it generates a unique string and sticks the <String,Object> pair into a
hashmap, in the getAsObject method it simply looks up the string in the map. As long as
the objects are serialisable it should work in a clustered environment as well, the main
restriction is that it only works in a long running conversation.
s:convertPojo key="<fieldName>" component
-----------------------------------------
Key: JBSEAM-4497
URL:
https://jira.jboss.org/jira/browse/JBSEAM-4497
Project: Seam
Issue Type: Feature Request
Components: JSF Controls
Affects Versions: 2.2.0.GA
Reporter: deanhiller
Priority: Minor
It would be awesome if we could have an <s:convertPojo key="<unique
field>"> component with a key attribute that identifies a unique key in the
pojo to do translation with. ie. s:convertEntity uses the primary key of the entity but
convertPojo could be used for entities that are not in the database yet if for instance
the name was a unique. Also, it could just be used for pojos from a webservice or
something for that matter. It could even throw a NonUniqueException if in the list of
pojo's it finds two with the same exact key so people use it correctly and an
exceptions is thrown when not used correctly so we know. Anyways, just thought this would
be a nice feature add to an already pretty damn sweet toolbox called seam.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira