SAS 9.1.3 Integration Technologies » SAS Web Infrastructure Kit: Developer's Guide


Developing Custom Portlets
Development Steps
Creating a Deployment Descriptor
Creating Display Resources Files
Developing the Presentation JSP Page
Creating Action Classes
Implementing Portlet Help
Creating a PAR File
Use Cases
Simple Display Portlet
Localized Portlet
Portlet Template (Editable Portlet)
Remote Portlet
Tips and Best Practices
Using the Portlet API
Sample Portlets
Localized Display Portlet (Welcome)
Interactive Form Portlet (FormExample)
Portlet Template, or Editable Portlet (DisplayURL)
Web Application (HelloUserWikExample)
Remote Portlet (HelloUserRemote
Portlet
Sample: Portlet Template, or Editable Portlet (DisplayURL)

Editor.jsp

The code for Editor.jsp, which is the presentation component of the editor for the DisplayURL portlet, follows.


<!-- Copyright (c) 2003 by SAS Institute Inc., Cary, NC 27513 -->
<%@ page language="java" contentType= "text/html; charset=UTF-8" %>
<%@ page import="com.sas.portal.portlet.PortletContext" %>
<%@ page import="com.sas.portal.portlet.PortletConstants" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>

<% PortletContext context = (PortletContext) request.getAttribute(
     PortletConstants.CURRENT_PORTLET_CONTEXT ); %>

<table border="0" cellpadding="2" cellspacing="0" align="center"
    width="100%">
 <tr>
  <td colspan="3"> </td>
 </tr>
 <tr>
  <td> </td>
  <td nowrap align="center"><fmt:message key="editor.task.txt"/></td>
  <td> </td>
 </tr>
 <tr>
  <td colspan="3"> </td>
 </tr>
 <tr>
  <form method="post" action="<%= context.getAttribute(
      "sas_DisplayURL_EditOkURL") %>">
  <td> </td>
  <td> <table border="0" cellpadding="0" cellspacing="0" align="center">
  <td class="celljustifyright" nowrap>
    <fmt:message key="editor.url.txt"/>
  </td>
  <td> </td>
  <td class="celljustifyleft" nowrap>
    <input type="text" name="sas_DisplayURL_DisplayURL"
       value="<%= context.getAttribute("sas_DisplayURL_DisplayURL") %>"
       size="60">
  </td>
 </tr>
 <tr>
  <td colspan="3"> </td>
 </tr>
 <tr>
  <td class="celljustifyright">
    <input class="button" type="submit" value="<fmt:message
        key="editor.action.ok.txt"/>" name="submit" >
    </form>
  </td>
  <td> </td>
  <td class="celljustifyleft">
   <form method="post" action="<%= context.getAttribute(
       "sas_DisplayURL_EditCancelURL") %>">
    <input class="button" type="submit" value="<fmt:message
        key="editor.action.cancel.txt"/>" name="cancel" >
   </form>
  </td>
 </tr>
</table>