I just realized that a converter class can be specified by value binding. (I
assume this is a JSF behavior and not just a MyFaces details) Here's an
example from the non-seam DVD Store:
| <h:selectOneMenu converter="#{catalog.converter}"
| value="#{catalog.product.category}">
| <f:selectItems value="#{catalog.categoryItems}" />
| </h:selectOneMenu>
|
Here, the converter instance is created by the catalog in the same scope as the
categoryItems value, so it's easy to make use of that exact data set rather
than some application-scoped data. (which only makes sense for select menus
based on static application-scope data)
In Seam, this can obviously be easier because the converter itself could be a
Seam component. We wouldn't need to couple the converter so closely with the
app code. So, if you have a #{items} somewhere, you should be able to have a
#{itemsConverter} which injects #{items} and converts from there.
Of course, I haven't yet tried this with Seam. As I said, I'm working with a
pure EJB3 app today. I'll try and put this in the Seam DVD Store this weekend
and see if there are any issues.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3914980#3914980
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3914980
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user