Sample: Interactive Form Portlet (FormExample)
Step 3: Create the Display PageJSP pages are the presentation components of portlets. This is the source code for the FormExample portlet's JSP page, called This JSP page uses SAS custom tags, which are available with SAS AppDev Studio. For more information, see Creating the Presentation JSP Page. <%-- Copyright (c) 2003 by SAS Institute Inc., Cary, NC 27513 --%> <%@ page language="java" import="com.sas.portal.portlet.PortletContext, com.sas.portal.portlet.PortletConstants" contentType= "text/html; charset=UTF-8" %> <%@taglib uri="http://www.sas.com/taglib/sas" prefix="sas"%> <%--This portlet provides for echoing the user input back to the portlet display. --%> <% PortletContext context = (PortletContext) request.getAttribute(PortletConstants.CURRENT_PORTLET_CONTEXT ); %> <sas:Form id="form" name="form" method="POST" action="<%= (String) context.getAttribute(\"formExample_baseURL\")%>"> <table border="0"> <tr> <td align="right">Please type something:</td> <td><sas:TextEntry id="userInput" /></td> </tr> <tr> <td> </td> </tr> <tr> <td align="right">You typed:</td> <td><%=(String) context.getAttribute("formExample_userInput") %></td> </tr> </table> <sas:PushButton id="submit" text="Submit Form" type="submit" /> </sas:Form> |