<%--
  Copyright 2003 Sun Microsystems, Inc. All rights reserved 
  Use is subject to license terms.
 --%>
<%-- @(#)discussionContent.jsp --%>

<%@ page language= "java" import="com.sun.portal.providers.jsp.JSPProvider,
				com.sun.portal.search.providers.*,
				java.lang.*, 
				java.util.*, 
				java.text.*" %>
<%@ page errorPage="error.jsp" %>

<%@ taglib uri="/tld/jx.tld" prefix="jx" %>
<%@ taglib uri="/tld/search.tld" prefix="search" %>


<%---------------------------------------------------------------------%>
<%-- Get configuration values from portal or Identity server --%>
<%@ include file= "portal.jsp" %>
<%@ include file= "declare.jsp" %>

<%---------------------------------------------------------------------%>
<%--
<channelName>_dmode(channel discussion mode) is the main parameter for discussions.
  If the request is 'vl' then
    'view single discussion' page is displayed.
  If the value is 'cmt' then
    'start discussion or add comment' page is displayed
  If the value is 'rtg' then
    'submit rating'
  else
    'full discussion' or the entire list of discussions is displayed.
--%>
<% if (request.getParameter(channelName+"_dmode") != null) { %>
    <jx:set var="dmode">
    <%=request.getParameter(channelName+"_dmode")%>
    </jx:set>
<% } else { %>
    <jx:set var="dmode" value="full"/>
<% } %>

<jx:choose>
  <jx:when test="$dmode=='vl'">
    <jsp:forward page= "viewDiscussion.jsp"/>
  </jx:when>
  <jx:when test="$dmode=='cmt'">
    <jsp:forward page= "feedback.jsp"/>
  </jx:when>
  <jx:when test="$dmode=='rtg'">
    <jsp:forward page= "ratingProcess.jsp"/>
  </jx:when>
  <jx:otherwise>
    <jsp:forward page= "fullDiscussion.jsp"/>
  </jx:otherwise>
</jx:choose>
