-
1. Re: problem inject cdi
wdfink Dec 27, 2013 4:17 AM (in response to gaiapuffo)Hello Alessio,
you should provide a bit more details to get help. How your code look like and what is your expactation?
-
2. Re: problem inject cdi
gaiapuffo Dec 27, 2013 5:17 AM (in response to gaiapuffo)private Parametro parametri;
@Inject
public void setService(Parametro parametri) {
this.parametri =parametri;
System.out.println("Controllo parametri recuperato");
this.id_persona=parametri.getIndicePersona();
this.parametro_attivo=parametri.getParametro_attuale();
}
My problem is that this function is invoked automatically, only the first time that I request the class .. As a result of no longer being invoked and is a problem because I could go back to the previous page, change the parameters and return to my page. . Would that this function was invoked every time you require the class
-
3. Re: problem inject cdi
wdfink Dec 27, 2013 9:24 AM (in response to gaiapuffo)I suppose that is more a design question. As I understand the issue you should not use the parameter for injection or you need to have a different scope for your Bean.