I don't use Velocity very much so I don't know if this will work for you. But, I have used java server pages and servlets to switch between pages in the same portlet. Usually, I create a menu and then based on the users choice I switch to that page in the portlet. Using links I can then switch between different pages in the same portlet, I believe this is what you want to do.We are fairly new to Jetspeed and have made pretty good progress dispite the documentation.
We are wondering how to create the following fairly common web page structure. We have three identical problems. List of case studies, list of white papers, list of training courses. In each case, we want to present the user with the list and when they click on one of them, show them the details of that item.
The information is in one or more XML files. (list of items in one XML that links to the many individual XML files containing the details of te item.)
The first problem is that we do not see how we can use separate portlets since we only want either the list or one of the items on the screen at once and we do not the menu to change while the user navigates within the topic.
If we use a single portlet, then we need to be able to respond to selection of one item (a Case Study for example) by clearing the list and displaying the selected document (the Case Study). We have the xsl stylesheets to display the initial list and the details of the idividual item.
1) Are we on the right track and understanding the problem in a reasonable way? 2) Which portlet type would be the best way to handle this? 3) Does anyone have a model that we could see/use for this type of application? 4) Should we be looking at Velocity/DVSL rather than XSLT if we are going to work with Jetspeed?
Thanks for the help.
Ron
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
What I do is create the initial jsp page which will have the logic for jumping to other pages. So the switch file would look something like this;
I don't know if this is the best way but, it is a way to solve your problem, it has worked me.
## switch.jsp##
<[EMAIL PROTECTED] language="java" import="java.sql.*"%>
<%@ taglib uri='/WEB-INF/templates/jsp/tld/template.tld' prefix='jetspeed' %>
<%
// Create and get the switch val, this will be a val to decide on what page to load.
String var_switchval =request.getParameter("switchval");
// If switchval is null ( on first pass ) then load the main menu page
if ( var_switchval == null || var_switchval.compareTo("val_main_menu") == 0 ) {
%>
<%
// Include the file with the menu code, this file will have HTML code and a parameter called switchval.
// So in this included file you will need to create a parameter (switchval), setting this val will cause the other pages to be included
// into switch.jsp
// Example: <a href="?switchval=val_casestudies">
// When this link is executed then the case studies page would be included and loaded.
// You would want to add code for each page you want to switch to
@ include file="/WEB-INF/templates/jsp/portlets/html/artifact_menu.jsp"
%>
<% } %>
<%
if ( var_switchval != null )
if ( var_switchval.compareTo("val_casestudies") == 0 ) {%> <%@ include file="/WEB-INF/templates/jsp/portlets/html/casestudies.jsp" %>
<% } %>
<%
if ( var_switchval != null )
if ( var_switchval.compareTo("val_whitepapers") == 0 ) {%> <%@ include file="/WEB-INF/templates/jsp/portlets/html/whitepapers.jsp" %>
<% } %>
<% if ( var_switchval != null ) if ( var_switchval.compareTo("val_trainingcourses") == 0 ) {
%> <%@ include file="/WEB-INF/templates/jsp/portlets/html/training.jsp" %>
<% } %>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
