Package com.github.overengineer.scope.struts2.ui

Examples of com.github.overengineer.scope.struts2.ui.ConversationsTag


    public void prepare() {
        ActionContext actionContext = ActionContext.getContext();
        HttpServletRequest request = (HttpServletRequest) actionContext.get(StrutsStatics.HTTP_REQUEST);
        ConversationContextManager contextManager = scopeContainer.get(JeeConversationContextManagerProvider.class).getManager(request);
        try {
            scopeContainer.get(ConversationProcessor.class).processConversations(new StrutsConversationAdapter(actionContext.getActionInvocation(), contextManager));
            Map<String, Map<String, String>> stackItem = new HashMap<String, Map<String, String>>();
            stackItem.put(StrutsScopeConstants.CONVERSATION_ID_MAP_STACK_KEY, ConversationAdapter.getAdapter().getViewContext());
            actionContext.getValueStack().push(stackItem);
        } catch (ConversationException e) {
            LOG.error("Programmatic Conversation error in Prepare method", e);
View Full Code Here


public class StrutsConversationArbitratorTest {

    @Test
    public void testGetPackageBasedConversations() {

        StrutsConversationArbitrator arbitrator = new StrutsConversationArbitrator();
        ActionProvider actionProvider = new ActionProvider() {

            private static final long serialVersionUID = 1L;

            @Override
            public Set<Class<?>> getActionClasses() {
                Set<Class<?>> classes = new HashSet<Class<?>>();
                classes.add(MockConventionController.class);
                classes.add(MockConversationController.class);
                return classes;
            }

        };
        arbitrator.setUsePackageNesting(true);
        arbitrator.setActionProvider(actionProvider);
        assertTrue(arbitrator.getPackageBasedConversations(
                MockConversationControllerInterface.class, "Controller")
                .contains("mock-convention"));
    }
View Full Code Here

TOP

Related Classes of com.github.overengineer.scope.struts2.ui.ConversationsTag

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.