/*
 * oxTrust is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text.
 *
 * Copyright (c) 2014, Gluu
 */

package org.gluu.oxtrust.action;

import java.io.Serializable;

import javax.ejb.Stateless;
import javax.enterprise.context.Conversation;
import javax.inject.Inject;
import javax.inject.Named;

/**
 * Action class for helping with menu
 * 
 * @author Yuriy Movchan Date: 12/18/2012
 */
@Stateless
@Named
public class MenuAction implements Serializable {

	private static final long serialVersionUID = -172441515451149801L;
	
	@Inject
	private Conversation conversation;

	public String endConversation(final String viewId) {
		// TODO: CDI Review
		if (!conversation.isTransient()) {
			conversation.end();
		}
		return viewId;
	}
}

@@ -334,16 +334,60 @@
 Named;%0A%0A
+import org.gluu.jsf2.service.FacesService;%0A%0A
 /**%0A * A
@@ -655,16 +655,62 @@
 ation;%0A%0A
+%09@Inject%0A%09private FacesService facesService;%0A%0A
 %09public 
@@ -841,16 +841,55 @@
 ();%0A%09%09%7D%0A
+%09%09%0A%09%09facesService.redirect(viewId);%0A%09%09%0A
 %09%09return

Fix main menu navigation