-
1. Re: CDI/WELD referrencing a custom qualifier from html (xhtml) page directly
luksa Jul 25, 2013 4:07 AM (in response to specialed)So you're saying you are able to use #{fooBeanProcessor}, but not #{fooBean} (when you put @Named on FooBean)?
-
2. Re: CDI/WELD referrencing a custom qualifier from html (xhtml) page directly
specialed Jul 25, 2013 4:22 AM (in response to luksa)No, I'm saying putting the annotation "@Named" in FooBean (underneath or above "@QualifiedFooBean") does not work, also explained in paranthesis. I haven't created wrapper classes yet, because I would like know if it's worth creating those wrapper classes (I need 5 of those wrappers for my project and would have to update 100 xhtml pages in order to work with wrappers for the whole project). I'm looking for an alternative solution before doing all these efforts.
And yes, I guess it would work with the wrapper classes. But I always compare effort against multiple example solutions to choose the right (less effort) solution. If anyone can confirm that there are no other solutions, then the answer is obvious.
-
3. Re: CDI/WELD referrencing a custom qualifier from html (xhtml) page directly
luksa Jul 25, 2013 4:21 AM (in response to specialed)You shouldn't need wrapper classes. What do you mean with "does not work"? Do you get null for #{fooBean}?
-
4. Re: CDI/WELD referrencing a custom qualifier from html (xhtml) page directly
specialed Jul 25, 2013 4:39 AM (in response to luksa)Target Unreachable, identifier 'fooBean' resolved to null
I receive this with and without the "@Named" (additionally "@SessionScoped" but that's not the point right now) annotation in class FooBean
PS: StackOverFlow question just got updated from myself to describe my issue more precisely.
-
5. Re: CDI/WELD referrencing a custom qualifier from html (xhtml) page directly
luksa Jul 25, 2013 4:41 AM (in response to specialed)I need to ask: do you have a beans.xml file in the correct place?
-
6. Re: CDI/WELD referrencing a custom qualifier from html (xhtml) page directly
specialed Jul 25, 2013 6:21 AM (in response to luksa)I have to admit, I did not have one at all....
After creating it (WEB-INF/beans.xml), I received validation erros and corrected them accordingly... It seems to work now.
Thank you, Marko