Questions tagged [codi]

The Apache MyFaces Extensions CDI project (aka CODI) hosts portable extensions for Contexts and Dependency Injection (CDI - JSR 299) for the Java-Platform (SE and EE).

Online resources

48 questions
4
votes
1 answer

Stereotype for @Inject possible?

I have a recurring annotation in my app that's injecting an object created by a CDI-producer. @Inject @FlatGeometryLive FlatGeometry geoObject; I wonder if it's possible to write a stereotype "@FlatGeometryLiveInject" so that i only have to…
VWeber
  • 1,261
  • 2
  • 12
  • 34
4
votes
2 answers

ViewMapListener JSF not being called

I'm trying to port the JSF @ViewScoped annotation to CDI. The reason is more educational rather than based on need. I chose this particular scope mainly due to the lack of a better concrete example of a custom scope one might want to implement in…
rdcrng
  • 3,415
  • 2
  • 18
  • 36
3
votes
1 answer

Creating a JSF URL without the windowid parameter

In my JSF web-app, I want to create a URL for the user to bookmark or copy. That part is easy enough, like this: Although…
AlanObject
  • 9,613
  • 19
  • 86
  • 142
2
votes
2 answers

Evaluate ValueExpression in ResourceHandler with Apache CODI

My Webapp is running on Websphere 8.0.0.2 with Apache CODI 1.0.1 and I have an issue related to the ResourceHandler implementation of primefaces. Primefaces evaluates a value expression within the resource handler to retrieve dynamic content, why…
Christian Beikov
  • 15,141
  • 2
  • 32
  • 58
2
votes
2 answers

WELD-001408 & ValidationInterceptor & Glassfish 4.0x & EAR & CODi can not deploy?

I am migrating our JSF/Primefaces 3.5.x GF 3.1.1 app to GF 4.0. It is an EAR with a war and an EJB-jar and lib full of jars. The WAR has WEB-INF/lib has: 'org.apache.myfaces.extensions.cdi.core:myfaces-extcdi-core-api:1.0.5', …
fwelland
  • 545
  • 5
  • 17
2
votes
2 answers

How inject EJB into abstract CDI class?

I have a problem with injecting an EJB into an abstract class which is the parent of my JSF CDI beans. In my project I am using MyFaces CODI 1.0.5 (ViewScope), Omnifaces 1.3, PrimeFaces 3.4.2 and GlassFish 3.1.2. The application is an EAR, the…
kralm
  • 61
  • 1
  • 6
2
votes
3 answers

JSF CDI (Weld) Begin a new conversation

I just wondered how it is possible to begin a new conversation in CDI. The container seems to begin a new conversation, if there is no cid request parameter, but in some cases I want to start a new conversation explicit from my controller. Example:…
hidehawk
  • 81
  • 1
  • 6
2
votes
3 answers

Java EE 6 Concurrent session and sharing

I´m working on a web application with Java EE 6 (JSF CDI EJB) which should not allow concurrent logins (same user and pass). What I like is : If a user logs in twice the first session needs to be invalidated and the old session data (incl. all CDI…
urbiwanus
  • 713
  • 5
  • 21
2
votes
2 answers

SFSB being removed

I'm using JBoss6.1.Final, JSF 2.0 (Mojarra), Weld CDI, MyFaces CODI 1.0.5 (for view-access-scoped) I'm using something like the Gateway Pattern from Real World Java EE Patterns Rethinking Best Practices (unfortunately I don't have it with me, so I…
JasonI
  • 159
  • 1
  • 15
1
vote
1 answer

How can I check if an object stored with @WindowScoped is stored correctly?

Two days ago I wrote this question: How can I retrieve an object on @WindowScoped? and BalusC answered with some suggestions, now I have some problem to understand if my problem is that the object in WindowScoped is stored properly or my code to…
Filippo1980
  • 2,745
  • 5
  • 30
  • 44
1
vote
1 answer

How can I retrieve an object on @WindowScoped?

In this post Dynamic ui:include I asked how I could store an object in some state that could permit me to load a new windows, or tab, of the same browser and it was not stored also in the new windows. Adrian Mitev told me to use @WindowScoped, an…
Filippo1980
  • 2,745
  • 5
  • 30
  • 44
1
vote
2 answers

@Inject in base class is null in base class methods, ok in derived class

In the following code I'm trying to inject a SessionScoped bean into a stateless EJB, but I want to do the @Inject in an abstract base class of the EJB. According to the CDI spec it seems to suggest that this should work (never a spec to waste…
Oversteer
  • 1,778
  • 1
  • 22
  • 38
1
vote
2 answers

How do I set the CODI project stage?

I found this wiki page through a nabble posting, but I can't make sense of it. In my JSF application, how do I tell CODI that I want to be running in development mode? Is there a web.xml setting or do I have to use an annotation somewhere? Much…
AlanObject
  • 9,613
  • 19
  • 86
  • 142
1
vote
2 answers

MyFaces CODI and windowId request parameter issue

I have been trying to conduct some simple tests on Seam Weld and MyFaces CODI. After adding CODI jar files to my projects, I found that it adds a windowId request value to every request even if the bean scope is RequestScoped. Is it really necessary…
carawan
  • 508
  • 3
  • 10
1
vote
2 answers

JSF: MyFaces CODI typesafe navigation and f:viewParam

I'm trying out MyFaces CODI with it's wonderful features. A very useful thing is the typesafe navigation. I can specify the outcome of an action method in my controller bean like this: public Class goBack() { return…
StevenR
  • 11
  • 1
1
2 3 4