You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Thomas Andraschko (JIRA)" <de...@myfaces.apache.org> on 2011/01/25 16:56:49 UTC
[jira] Created: (EXTCDI-127) Injection in FacesConverter does not
work
Injection in FacesConverter does not work
-----------------------------------------
Key: EXTCDI-127
URL: https://issues.apache.org/jira/browse/EXTCDI-127
Project: MyFaces CODI
Issue Type: Bug
Components: JEE-JSF20-Module
Affects Versions: 0.9.2
Environment: Myfaces 2.0.3, CODI 0.9.2, ExtVal 2.0.4, OWB 1.0.0, PrimeFaces 2.2-RC2
Reporter: Thomas Andraschko
The bean which sould be injected in my converter is always null.
I also added some logging to CODI, to see where the problem is.
The bean was created and injected into the converter but it seems as the used converter is not the converter which was created by CODI.
Is there something wrong in my setup or is this really a bug?
-----------------------------------------------------------
@Advanced
@FacesConverter("localeConverter")
public class LocaleConverter implements Converter {
@Inject private LocaleService localeService;
-----------------------------------------------------------
<h:form>
<h:selectOneMenu
id="selectLocaleMenu"
value="#{localeController.selectedLocale}"
onchange="this.form.submit()"
converter="localeConverter">
<f:selectItems
value="#{allLocalesController.locales}"
var="locale"
itemLabel="#{locale.name}"
itemValue="#{locale}"/>
</h:selectOneMenu>
</h:form>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (EXTCDI-127) Injection in FacesConverter does not
work
Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/EXTCDI-127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986597#action_12986597 ]
Jakob Korherr commented on EXTCDI-127:
--------------------------------------
PostRestoreStateEvent sounds like a good idea!
In addition I have already thought of wrapping the Converter (maybe via proxy) in order to perform a custom state saving algorithm. However, if PostRestoreStateEvent works, it should be preferred IMO.
Thanks for the input, Leo!
> Injection in FacesConverter does not work
> -----------------------------------------
>
> Key: EXTCDI-127
> URL: https://issues.apache.org/jira/browse/EXTCDI-127
> Project: MyFaces CODI
> Issue Type: Bug
> Components: JEE-JSF20-Module
> Affects Versions: 0.9.2
> Environment: Myfaces 2.0.3, CODI 0.9.2, ExtVal 2.0.4, OWB 1.0.0, PrimeFaces 2.2-RC2
> Reporter: Thomas Andraschko
> Assignee: Jakob Korherr
>
> The bean which sould be injected in my converter is always null.
> I also added some logging to CODI, to see where the problem is.
> The bean was created and injected into the converter but it seems as the used converter is not the converter which was created by CODI.
> Is there something wrong in my setup or is this really a bug?
> -----------------------------------------------------------
> @Advanced
> @FacesConverter("localeConverter")
> public class LocaleConverter implements Converter {
> @Inject private LocaleService localeService;
> -----------------------------------------------------------
> <h:form>
> <h:selectOneMenu
> id="selectLocaleMenu"
> value="#{localeController.selectedLocale}"
> onchange="this.form.submit()"
> converter="localeConverter">
> <f:selectItems
> value="#{allLocalesController.locales}"
> var="locale"
> itemLabel="#{locale.name}"
> itemValue="#{locale}"/>
> </h:selectOneMenu>
> </h:form>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (EXTCDI-127) Injection in FacesConverter does not
work
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/EXTCDI-127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986590#action_12986590 ]
Leonardo Uribe commented on EXTCDI-127:
---------------------------------------
I think it is possible to use PostRestoreStateEvent to inject the required field on the converter. The other alternative is use a delegate pattern over converters that has inject fields, and put some code on converter wrapper restoreState() method.
> Injection in FacesConverter does not work
> -----------------------------------------
>
> Key: EXTCDI-127
> URL: https://issues.apache.org/jira/browse/EXTCDI-127
> Project: MyFaces CODI
> Issue Type: Bug
> Components: JEE-JSF20-Module
> Affects Versions: 0.9.2
> Environment: Myfaces 2.0.3, CODI 0.9.2, ExtVal 2.0.4, OWB 1.0.0, PrimeFaces 2.2-RC2
> Reporter: Thomas Andraschko
> Assignee: Jakob Korherr
>
> The bean which sould be injected in my converter is always null.
> I also added some logging to CODI, to see where the problem is.
> The bean was created and injected into the converter but it seems as the used converter is not the converter which was created by CODI.
> Is there something wrong in my setup or is this really a bug?
> -----------------------------------------------------------
> @Advanced
> @FacesConverter("localeConverter")
> public class LocaleConverter implements Converter {
> @Inject private LocaleService localeService;
> -----------------------------------------------------------
> <h:form>
> <h:selectOneMenu
> id="selectLocaleMenu"
> value="#{localeController.selectedLocale}"
> onchange="this.form.submit()"
> converter="localeConverter">
> <f:selectItems
> value="#{allLocalesController.locales}"
> var="locale"
> itemLabel="#{locale.name}"
> itemValue="#{locale}"/>
> </h:selectOneMenu>
> </h:form>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (EXTCDI-127) Injection in FacesConverter does not
work
Posted by "Gerhard Petracek (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/EXTCDI-127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12996659#comment-12996659 ]
Gerhard Petracek commented on EXTCDI-127:
-----------------------------------------
if this feature isn't used it's possible to reduce the overhead via:
public void vetoRestoreInjectionPointsObserver(@Observes ProcessAnnotatedType processAnnotatedType)
{
if(processAnnotatedType.getAnnotatedType().getJavaClass().equals(RestoreInjectionPointsObserver.class))
{
processAnnotatedType.veto();
}
}
(in a cdi extension - see javax.enterprise.inject.spi.Extension)
> Injection in FacesConverter does not work
> -----------------------------------------
>
> Key: EXTCDI-127
> URL: https://issues.apache.org/jira/browse/EXTCDI-127
> Project: MyFaces CODI
> Issue Type: Bug
> Components: JEE-JSF20-Module
> Affects Versions: 0.9.2
> Environment: Myfaces 2.0.3, CODI 0.9.2, ExtVal 2.0.4, OWB 1.0.0, PrimeFaces 2.2-RC2
> Reporter: Thomas Andraschko
> Assignee: Jakob Korherr
> Priority: Minor
> Fix For: 0.9.3
>
>
> The bean which sould be injected in my converter is always null.
> I also added some logging to CODI, to see where the problem is.
> The bean was created and injected into the converter but it seems as the used converter is not the converter which was created by CODI.
> Is there something wrong in my setup or is this really a bug?
> -----------------------------------------------------------
> @Advanced
> @FacesConverter("localeConverter")
> public class LocaleConverter implements Converter {
> @Inject private LocaleService localeService;
> -----------------------------------------------------------
> <h:form>
> <h:selectOneMenu
> id="selectLocaleMenu"
> value="#{localeController.selectedLocale}"
> onchange="this.form.submit()"
> converter="localeConverter">
> <f:selectItems
> value="#{allLocalesController.locales}"
> var="locale"
> itemLabel="#{locale.name}"
> itemValue="#{locale}"/>
> </h:selectOneMenu>
> </h:form>
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (EXTCDI-127) Injection in FacesConverter does not
work
Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/EXTCDI-127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986583#action_12986583 ]
Jakob Korherr commented on EXTCDI-127:
--------------------------------------
Workaround for this problem:
create this method in your localeController:
public Converter getConverter()
{
return FacesContext.getCurrentInstance().getApplication().createConverter("localeConverter");
}
and use converter="#{localeController.converter}" in your h:selectOneMenu.
> Injection in FacesConverter does not work
> -----------------------------------------
>
> Key: EXTCDI-127
> URL: https://issues.apache.org/jira/browse/EXTCDI-127
> Project: MyFaces CODI
> Issue Type: Bug
> Components: JEE-JSF20-Module
> Affects Versions: 0.9.2
> Environment: Myfaces 2.0.3, CODI 0.9.2, ExtVal 2.0.4, OWB 1.0.0, PrimeFaces 2.2-RC2
> Reporter: Thomas Andraschko
> Assignee: Jakob Korherr
>
> The bean which sould be injected in my converter is always null.
> I also added some logging to CODI, to see where the problem is.
> The bean was created and injected into the converter but it seems as the used converter is not the converter which was created by CODI.
> Is there something wrong in my setup or is this really a bug?
> -----------------------------------------------------------
> @Advanced
> @FacesConverter("localeConverter")
> public class LocaleConverter implements Converter {
> @Inject private LocaleService localeService;
> -----------------------------------------------------------
> <h:form>
> <h:selectOneMenu
> id="selectLocaleMenu"
> value="#{localeController.selectedLocale}"
> onchange="this.form.submit()"
> converter="localeConverter">
> <f:selectItems
> value="#{allLocalesController.locales}"
> var="locale"
> itemLabel="#{locale.name}"
> itemValue="#{locale}"/>
> </h:selectOneMenu>
> </h:form>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (EXTCDI-127) Injection in
FacesConverter does not work
Posted by "Gerhard Petracek (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/EXTCDI-127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12996600#comment-12996600 ]
Gerhard Petracek edited comment on EXTCDI-127 at 2/19/11 12:12 AM:
-------------------------------------------------------------------
fyi: PostRestoreStateEvent is broken (currently)
was (Author: gpetracek):
fyi: PostAddToViewEvent is broken (currently)
> Injection in FacesConverter does not work
> -----------------------------------------
>
> Key: EXTCDI-127
> URL: https://issues.apache.org/jira/browse/EXTCDI-127
> Project: MyFaces CODI
> Issue Type: Bug
> Components: JEE-JSF12-Module, JEE-JSF20-Module
> Affects Versions: 0.9.2
> Environment: Myfaces 2.0.3, CODI 0.9.2, ExtVal 2.0.4, OWB 1.0.0, PrimeFaces 2.2-RC2
> Reporter: Thomas Andraschko
> Assignee: Jakob Korherr
> Priority: Minor
> Fix For: 0.9.3
>
>
> The bean which sould be injected in my converter is always null.
> I also added some logging to CODI, to see where the problem is.
> The bean was created and injected into the converter but it seems as the used converter is not the converter which was created by CODI.
> Is there something wrong in my setup or is this really a bug?
> -----------------------------------------------------------
> @Advanced
> @FacesConverter("localeConverter")
> public class LocaleConverter implements Converter {
> @Inject private LocaleService localeService;
> -----------------------------------------------------------
> <h:form>
> <h:selectOneMenu
> id="selectLocaleMenu"
> value="#{localeController.selectedLocale}"
> onchange="this.form.submit()"
> converter="localeConverter">
> <f:selectItems
> value="#{allLocalesController.locales}"
> var="locale"
> itemLabel="#{locale.name}"
> itemValue="#{locale}"/>
> </h:selectOneMenu>
> </h:form>
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (EXTCDI-127) Injection in FacesConverter does not
work
Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/EXTCDI-127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986580#action_12986580 ]
Jakob Korherr commented on EXTCDI-127:
--------------------------------------
The problem is that the <h:selectOneMenu /> component (like any input or output component) tries to save the converter in its state (see UIOutput.saveState() on line 199 in MyFaces core 2.0.3). However, for a normal (non-serializable) converter only the Class of the converter is saved in the state. Later, on the next request, the state is restored and the converter is created via converterClass.newInstance(). Unfortunately this "custom" converter instance is used to process the data and thus you get an instance of your converter without CDI injection.
For CODI it seems like we have to do some custom state saving of @Advanced converters...
> Injection in FacesConverter does not work
> -----------------------------------------
>
> Key: EXTCDI-127
> URL: https://issues.apache.org/jira/browse/EXTCDI-127
> Project: MyFaces CODI
> Issue Type: Bug
> Components: JEE-JSF20-Module
> Affects Versions: 0.9.2
> Environment: Myfaces 2.0.3, CODI 0.9.2, ExtVal 2.0.4, OWB 1.0.0, PrimeFaces 2.2-RC2
> Reporter: Thomas Andraschko
> Assignee: Jakob Korherr
>
> The bean which sould be injected in my converter is always null.
> I also added some logging to CODI, to see where the problem is.
> The bean was created and injected into the converter but it seems as the used converter is not the converter which was created by CODI.
> Is there something wrong in my setup or is this really a bug?
> -----------------------------------------------------------
> @Advanced
> @FacesConverter("localeConverter")
> public class LocaleConverter implements Converter {
> @Inject private LocaleService localeService;
> -----------------------------------------------------------
> <h:form>
> <h:selectOneMenu
> id="selectLocaleMenu"
> value="#{localeController.selectedLocale}"
> onchange="this.form.submit()"
> converter="localeConverter">
> <f:selectItems
> value="#{allLocalesController.locales}"
> var="locale"
> itemLabel="#{locale.name}"
> itemValue="#{locale}"/>
> </h:selectOneMenu>
> </h:form>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (EXTCDI-127) Injection in FacesConverter does not
work
Posted by "Gerhard Petracek (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/EXTCDI-127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12996600#comment-12996600 ]
Gerhard Petracek commented on EXTCDI-127:
-----------------------------------------
fyi: PostAddToViewEvent is broken (currently)
> Injection in FacesConverter does not work
> -----------------------------------------
>
> Key: EXTCDI-127
> URL: https://issues.apache.org/jira/browse/EXTCDI-127
> Project: MyFaces CODI
> Issue Type: Bug
> Components: JEE-JSF20-Module
> Affects Versions: 0.9.2
> Environment: Myfaces 2.0.3, CODI 0.9.2, ExtVal 2.0.4, OWB 1.0.0, PrimeFaces 2.2-RC2
> Reporter: Thomas Andraschko
> Assignee: Jakob Korherr
> Priority: Minor
>
> The bean which sould be injected in my converter is always null.
> I also added some logging to CODI, to see where the problem is.
> The bean was created and injected into the converter but it seems as the used converter is not the converter which was created by CODI.
> Is there something wrong in my setup or is this really a bug?
> -----------------------------------------------------------
> @Advanced
> @FacesConverter("localeConverter")
> public class LocaleConverter implements Converter {
> @Inject private LocaleService localeService;
> -----------------------------------------------------------
> <h:form>
> <h:selectOneMenu
> id="selectLocaleMenu"
> value="#{localeController.selectedLocale}"
> onchange="this.form.submit()"
> converter="localeConverter">
> <f:selectItems
> value="#{allLocalesController.locales}"
> var="locale"
> itemLabel="#{locale.name}"
> itemValue="#{locale}"/>
> </h:selectOneMenu>
> </h:form>
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (EXTCDI-127) Injection in FacesConverter does not
work
Posted by "Gerhard Petracek (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/EXTCDI-127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gerhard Petracek resolved EXTCDI-127.
-------------------------------------
Resolution: Fixed
Fix Version/s: 0.9.3
> Injection in FacesConverter does not work
> -----------------------------------------
>
> Key: EXTCDI-127
> URL: https://issues.apache.org/jira/browse/EXTCDI-127
> Project: MyFaces CODI
> Issue Type: Bug
> Components: JEE-JSF20-Module
> Affects Versions: 0.9.2
> Environment: Myfaces 2.0.3, CODI 0.9.2, ExtVal 2.0.4, OWB 1.0.0, PrimeFaces 2.2-RC2
> Reporter: Thomas Andraschko
> Assignee: Jakob Korherr
> Priority: Minor
> Fix For: 0.9.3
>
>
> The bean which sould be injected in my converter is always null.
> I also added some logging to CODI, to see where the problem is.
> The bean was created and injected into the converter but it seems as the used converter is not the converter which was created by CODI.
> Is there something wrong in my setup or is this really a bug?
> -----------------------------------------------------------
> @Advanced
> @FacesConverter("localeConverter")
> public class LocaleConverter implements Converter {
> @Inject private LocaleService localeService;
> -----------------------------------------------------------
> <h:form>
> <h:selectOneMenu
> id="selectLocaleMenu"
> value="#{localeController.selectedLocale}"
> onchange="this.form.submit()"
> converter="localeConverter">
> <f:selectItems
> value="#{allLocalesController.locales}"
> var="locale"
> itemLabel="#{locale.name}"
> itemValue="#{locale}"/>
> </h:selectOneMenu>
> </h:form>
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (EXTCDI-127) Injection in FacesConverter does not
work
Posted by "Thomas Andraschko (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/EXTCDI-127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986978#action_12986978 ]
Thomas Andraschko commented on EXTCDI-127:
------------------------------------------
thanks for your effort, Jakob!
> Injection in FacesConverter does not work
> -----------------------------------------
>
> Key: EXTCDI-127
> URL: https://issues.apache.org/jira/browse/EXTCDI-127
> Project: MyFaces CODI
> Issue Type: Bug
> Components: JEE-JSF20-Module
> Affects Versions: 0.9.2
> Environment: Myfaces 2.0.3, CODI 0.9.2, ExtVal 2.0.4, OWB 1.0.0, PrimeFaces 2.2-RC2
> Reporter: Thomas Andraschko
> Assignee: Jakob Korherr
>
> The bean which sould be injected in my converter is always null.
> I also added some logging to CODI, to see where the problem is.
> The bean was created and injected into the converter but it seems as the used converter is not the converter which was created by CODI.
> Is there something wrong in my setup or is this really a bug?
> -----------------------------------------------------------
> @Advanced
> @FacesConverter("localeConverter")
> public class LocaleConverter implements Converter {
> @Inject private LocaleService localeService;
> -----------------------------------------------------------
> <h:form>
> <h:selectOneMenu
> id="selectLocaleMenu"
> value="#{localeController.selectedLocale}"
> onchange="this.form.submit()"
> converter="localeConverter">
> <f:selectItems
> value="#{allLocalesController.locales}"
> var="locale"
> itemLabel="#{locale.name}"
> itemValue="#{locale}"/>
> </h:selectOneMenu>
> </h:form>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (EXTCDI-127) Injection in FacesConverter does not
work
Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/EXTCDI-127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986553#action_12986553 ]
Jakob Korherr commented on EXTCDI-127:
--------------------------------------
OK, I created a quick sample for this one and I see the issue too. I'm working on it!
> Injection in FacesConverter does not work
> -----------------------------------------
>
> Key: EXTCDI-127
> URL: https://issues.apache.org/jira/browse/EXTCDI-127
> Project: MyFaces CODI
> Issue Type: Bug
> Components: JEE-JSF20-Module
> Affects Versions: 0.9.2
> Environment: Myfaces 2.0.3, CODI 0.9.2, ExtVal 2.0.4, OWB 1.0.0, PrimeFaces 2.2-RC2
> Reporter: Thomas Andraschko
>
> The bean which sould be injected in my converter is always null.
> I also added some logging to CODI, to see where the problem is.
> The bean was created and injected into the converter but it seems as the used converter is not the converter which was created by CODI.
> Is there something wrong in my setup or is this really a bug?
> -----------------------------------------------------------
> @Advanced
> @FacesConverter("localeConverter")
> public class LocaleConverter implements Converter {
> @Inject private LocaleService localeService;
> -----------------------------------------------------------
> <h:form>
> <h:selectOneMenu
> id="selectLocaleMenu"
> value="#{localeController.selectedLocale}"
> onchange="this.form.submit()"
> converter="localeConverter">
> <f:selectItems
> value="#{allLocalesController.locales}"
> var="locale"
> itemLabel="#{locale.name}"
> itemValue="#{locale}"/>
> </h:selectOneMenu>
> </h:form>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (EXTCDI-127) Injection in FacesConverter does not
work
Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/EXTCDI-127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986518#action_12986518 ]
Jakob Korherr commented on EXTCDI-127:
--------------------------------------
Actually this should work.
CODI wraps the FacesContext in a CodiFacesContextWrapper and there (in getApplication()) it wraps the Application in a InjectionAwareApplicationWrapper. Then, in this application wrapper, it performs dependency injection on the converter instances before returning them.
However, maybe primefaces or extval override the JSF Application too and thus cause some problems here. Could you please set a break point in InjectionAwareApplicationWrapper (package org.apache.myfaces.extensions.cdi.jsf2.impl.listener.request) in the two createConverter() methods and check if dependency injection really is performed? ..and if yes, if this converter object really is used.
Thanks!
> Injection in FacesConverter does not work
> -----------------------------------------
>
> Key: EXTCDI-127
> URL: https://issues.apache.org/jira/browse/EXTCDI-127
> Project: MyFaces CODI
> Issue Type: Bug
> Components: JEE-JSF20-Module
> Affects Versions: 0.9.2
> Environment: Myfaces 2.0.3, CODI 0.9.2, ExtVal 2.0.4, OWB 1.0.0, PrimeFaces 2.2-RC2
> Reporter: Thomas Andraschko
>
> The bean which sould be injected in my converter is always null.
> I also added some logging to CODI, to see where the problem is.
> The bean was created and injected into the converter but it seems as the used converter is not the converter which was created by CODI.
> Is there something wrong in my setup or is this really a bug?
> -----------------------------------------------------------
> @Advanced
> @FacesConverter("localeConverter")
> public class LocaleConverter implements Converter {
> @Inject private LocaleService localeService;
> -----------------------------------------------------------
> <h:form>
> <h:selectOneMenu
> id="selectLocaleMenu"
> value="#{localeController.selectedLocale}"
> onchange="this.form.submit()"
> converter="localeConverter">
> <f:selectItems
> value="#{allLocalesController.locales}"
> var="locale"
> itemLabel="#{locale.name}"
> itemValue="#{locale}"/>
> </h:selectOneMenu>
> </h:form>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (EXTCDI-127) Injection in FacesConverter does not
work
Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/EXTCDI-127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986614#action_12986614 ]
Jakob Korherr commented on EXTCDI-127:
--------------------------------------
created sample for this one in hello_myfaces-codi-jsf20.
> Injection in FacesConverter does not work
> -----------------------------------------
>
> Key: EXTCDI-127
> URL: https://issues.apache.org/jira/browse/EXTCDI-127
> Project: MyFaces CODI
> Issue Type: Bug
> Components: JEE-JSF20-Module
> Affects Versions: 0.9.2
> Environment: Myfaces 2.0.3, CODI 0.9.2, ExtVal 2.0.4, OWB 1.0.0, PrimeFaces 2.2-RC2
> Reporter: Thomas Andraschko
> Assignee: Jakob Korherr
>
> The bean which sould be injected in my converter is always null.
> I also added some logging to CODI, to see where the problem is.
> The bean was created and injected into the converter but it seems as the used converter is not the converter which was created by CODI.
> Is there something wrong in my setup or is this really a bug?
> -----------------------------------------------------------
> @Advanced
> @FacesConverter("localeConverter")
> public class LocaleConverter implements Converter {
> @Inject private LocaleService localeService;
> -----------------------------------------------------------
> <h:form>
> <h:selectOneMenu
> id="selectLocaleMenu"
> value="#{localeController.selectedLocale}"
> onchange="this.form.submit()"
> converter="localeConverter">
> <f:selectItems
> value="#{allLocalesController.locales}"
> var="locale"
> itemLabel="#{locale.name}"
> itemValue="#{locale}"/>
> </h:selectOneMenu>
> </h:form>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.