-
1. Re: Converters in version 2.1.1
norman Mar 23, 2009 6:42 PM (in response to thorgull)I don't recall what the issue was, but according to the JIRA there was a reason we couldn't easily support that behavior. You should contact the person who did the work to find out the issues. Perhaps you'll be able to contribute a solution to the problem and restore this behavior.
-
2. Re: Converters in version 2.1.1
danielc.roth Mar 23, 2009 11:18 PM (in response to thorgull)I think it works like this (I'm not really really sure though): The instantiation of a converter is done from JSF and not Seam. Seam has some set with all @Converter where it tries to match requests from JSF.
Since C/V aren't intercepted, it's better to force the programmer to get deployment error than getting an error that might be hard to debug. The same thoughts are behind the
make sure C/V implement Validator/Converter interface
bug. It helps the developer.If injection could be solved to work with C/V, file a patch so we could add it. This would be quite nice.
Regarding the filmConverter, it doesn't look to be used anywhere and it probably never worked...
Cheers
-
3. Re: Converters in version 2.1.1
thorgull Mar 24, 2009 9:42 AM (in response to thorgull)This JIRA entry is classified as
New Feature
not as BugThe initial comment was
Although it may be possible to make them work with injection its not trivial, so much better to force the user of programmatic lookup
Have a nice day.
-
4. Re: Converters in version 2.1.1
thorgull Mar 24, 2009 9:48 AM (in response to thorgull)Hi,
Thank you for this quick response.What you said sounds pretty odd to me, because with Seam 2.0.1.GA injection in Converter actually work... in many of our applications.
We only encouter probleme with Scope of converters.When you said that filmConverter is used nowhere, I can agree, because the annotation is @org.jboss.seam.annotations.faces.Converter(forClass=Film.class) and this mean that the converter will be used for any value of type Film if no converter is specified explicitly. And if you look in the file /examples/ui/view/selectItems.xhtml you'l find this
<s:decorate template="decorateField.xhtml"> <ui:define name="label">Favourite Film</ui:define> <ui:define name="description">Film uses <code>@Converter(forClass="...")</code> - there is no converter specified in the facelet</ui:define> <h:selectOneListbox value="#{person.favouriteFilm}"> <s:selectItems value="#{films.resultList}" var="film" label="#{film.name} directed by #{film.director}" noSelectionLabel="Please Select..."/> </h:selectOneListbox> </s:decorate>
The #{person.favouriteFilm} value binding is of type Film and then the filmConvert should be used.
Also note the comment of the Field "Film uses <code>"@Converter(forClass \= "...")"</code> - there is no converter specified in the facelet"
Maybe there is another change in Seam 2.1 that make this not working anymore, I our application with Seam 2.1 but without the JBSEAM-2402 correction to see what append. If the patch is truely needed, I think an explanation of 'why' will un-frustrate some user.
Cheers.