[weld-commits] Weld SVN: r5667 - wicket/trunk/src/main/java/org/jboss/weld/wicket.
weld-commits at lists.jboss.org
weld-commits at lists.jboss.org
Fri Jan 29 13:48:22 EST 2010
Author: pete.muir at jboss.org
Date: 2010-01-29 13:48:21 -0500 (Fri, 29 Jan 2010)
New Revision: 5667
Modified:
wicket/trunk/src/main/java/org/jboss/weld/wicket/WeldRequestCycle.java
Log:
ws
Modified: wicket/trunk/src/main/java/org/jboss/weld/wicket/WeldRequestCycle.java
===================================================================
--- wicket/trunk/src/main/java/org/jboss/weld/wicket/WeldRequestCycle.java 2010-01-29 18:39:21 UTC (rev 5666)
+++ wicket/trunk/src/main/java/org/jboss/weld/wicket/WeldRequestCycle.java 2010-01-29 18:48:21 UTC (rev 5667)
@@ -82,13 +82,11 @@
}
BeanManager manager = BeanManagerLookup.getBeanManager();
-
- ConversationImpl conversation = (ConversationImpl) getInstanceByType(manager,
- Conversation.class);
+ ConversationImpl conversation = (ConversationImpl) getInstanceByType(manager, Conversation.class);
+
// restore a conversation if it exists and we aren't already in it
- if (specifiedCid != null
- && (conversation == null || !specifiedCid.equals(conversation.getUnderlyingId())))
+ if (specifiedCid != null && (conversation == null || !specifiedCid.equals(conversation.getUnderlyingId())))
{
getInstanceByType(manager, ConversationManager.class).beginOrRestoreConversation(specifiedCid);
}
@@ -118,13 +116,11 @@
}
}
- ConversationContext conversationContext = Container.instance().services().get(
- ContextLifecycle.class).getConversationContext();
+ ConversationContext conversationContext = Container.instance().services().get(ContextLifecycle.class).getConversationContext();
// Now set up the conversational context if it isn't already
if (!conversationContext.isActive())
{
- conversationContext.setBeanStore(new ConversationBeanStore(((WebRequest) request)
- .getHttpServletRequest().getSession(), conversation.getUnderlyingId()));
+ conversationContext.setBeanStore(new ConversationBeanStore(((WebRequest) request).getHttpServletRequest().getSession(), conversation.getUnderlyingId()));
conversationContext.setActive(true);
}
}
@@ -148,18 +144,16 @@
}
return beans.iterator().next();
}
-
+
@Override
public void detach()
{
super.detach();
- ConversationContext conversationContext = Container.instance().services().get(
- ContextLifecycle.class).getConversationContext();
+ ConversationContext conversationContext = Container.instance().services().get(ContextLifecycle.class).getConversationContext();
// cleanup and deactivate the conversation context
if (conversationContext.isActive())
{
- ConversationManager conversationManager = getInstanceByType(BeanManagerLookup
- .getBeanManager(), ConversationManager.class);
+ ConversationManager conversationManager = getInstanceByType(BeanManagerLookup.getBeanManager(), ConversationManager.class);
conversationManager.cleanupConversation();
conversationContext.setActive(false);
}
More information about the weld-commits
mailing list