All Downloads are FREE. Search and download functionalities are using the official Maven repository.

br.com.jhonsapp.util.jsf.cdi.ViewContextExtension Maven / Gradle / Ivy

Go to download

This project provides useful classes that facilitate the construction of new components web.

The newest version!
package br.com.jhonsapp.util.jsf.cdi;

import javax.enterprise.event.Observes;
import javax.enterprise.inject.spi.AfterBeanDiscovery;
import javax.enterprise.inject.spi.BeforeBeanDiscovery;
import javax.enterprise.inject.spi.Extension;
import javax.faces.bean.ViewScoped;

/**
 * Copied from Seam Faces 3.1.0.
 *
 * @author Steve Taylor
 */

public class ViewContextExtension implements Extension
{
	public void addScope(@Observes final BeforeBeanDiscovery event)
	{
		event.addScope(ViewScoped.class, true, true);
	}

	public void registerContext(@Observes final AfterBeanDiscovery event)
	{
		event.addContext(new ViewScopedContext());
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy