This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class WeldFilter implements Extension | |
{ | |
public void vetoForWeld(@Observes ProcessAnnotatedType processAnnotatedType, BeanManager beanManager) | |
{ | |
if (!beanManager.getClass().getName().contains("org.apache.")) | |
{ | |
processAnnotatedType.veto(); | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//nesting leads to the path of a page (-> view-id) and inheritance to meta-data-inheritance | |
//currently there would be no ide support to show where the meta-data comes from in case of meta-data-inheritance via nesting | |
//(it's easy to see in small applications but difficult in large applications) | |
//represents a folder | |
@Page(navigation = REDIRECT) | |
public interface Pages | |
{ | |
//represents a folder | |
//can be referenced via @ConversationGroup, @View, @Matches,... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//for a partial integration in GlassFish3 in case of: | |
//java.lang.NullPointerException at com.sun.jersey.server.impl.cdi.CDIExtension.processAnnotatedField | |
public class JerseyAwareLoaderService extends DefaultLoaderService | |
{ | |
@Override | |
public <T> List<T> load(Class<T> serviceType, ClassLoader classLoader) | |
{ | |
List<T> result = super.load(serviceType, classLoader); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ConversationScoped | |
public class ConversationAwareNoSqlTransactionProxy implements Transaction, Serializable | |
{ | |
private NoSqlDb noSqlDb; //handle serialization (if needed/supported) | |
private Transaction transaction; //handle serialization (if needed/supported) | |
//required by proxy libs | |
protected ConversationAwareNoSqlTransactionProxy() | |
{ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ApplicationScoped | |
public class SimulatedViewScopeObserver | |
{ | |
protected void observeNavigation( | |
@Observes PreViewConfigNavigateEvent preViewConfigNavigateEvent, | |
EditableWindowContext editableWindowContext) | |
{ | |
if (!preViewConfigNavigateEvent.getFromView() | |
.equals(preViewConfigNavigateEvent.getToView())) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.os890.codi.addon.conversation.api.ViewConversationScoped; | |
import javax.annotation.PostConstruct; | |
import javax.inject.Named; | |
import java.io.Serializable; | |
import java.util.Date; | |
@Named | |
@ViewConversationScoped | |
public class ViewConversationBean implements Serializable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ViewConversationExpirationEvaluator | |
implements ConversationExpirationEvaluator | |
{ | |
private static final long serialVersionUID = -1298186767354202960L; | |
private String viewId; | |
private boolean expired; | |
ViewConversationExpirationEvaluator() | |
{ | |
if(FacesContext.getCurrentInstance().getViewRoot() != null) |
NewerOlder