This seems like a step backwards from JSP. Here's the problem I'm facing:
I have a signup form where users can select their country. There are about 200 countries,
and a I have an enum that lists them all, and within that enum class there is also a
static member which is a Map<String,String> that maps keys of country codes
("US") to values of country names ("United States"). Pretty basic
stuff.
It seems like I should be able to use that Map as the value of a selectItems component.
But I cannot find any way to get that Java Map visible within the JSF!
I have a SFSB that also is the bean that processes the form. I put in a getCountryMap()
method in that that always returns this map. But whenever I try to display the page, that
doesn't work, because when the page is first displayed, that SFSB has not yet been
instantiated, even though it has an EVENT scope.
So... this is ridiculous. There must be some way to display simple Java objects within
JSF. Is there some way I could inject that Map into one of Seam's contexts?
Hard things, like redisplaying a form, are very easy in Seam, but simple things, like
display some dumb Java objects, are difficult or impossible it appears.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966632#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...