+

Search Tips   |   Advanced Search

Create a custom authoring portlet user interface

A custom launch page can either be a JSP or HTML file. We use remote actions to call different views and functions from with the authoring portlet's user interface. We can also use the web content API to add other functions to the launch page. Once we have created a custom launch page, you then configure the authoring portlet to use the custom launch page instead of the default authoring portlet user interface.


Storing JSP files

JSP files are stored within a web application that runs on the portal. To reference a JSP file in another web application...

    contextPath;jspPath
For example:

    /wps/customapplication;/jsp/jspFilename.jsp

A dynamic context path value can be defined by adding a token to the context path that corresponds to a key and value pair to the WCM configuration service environment provider. When this key is used as the token in the jsp value field, it is replaced dynamically at render time. For example:


A custom launch page example

To view content items using remote actions, add this code to a JSP or HTML file...

    <%--
    /* Sample Launch Page */
    --%>
    
     <%@ taglib uri="/WEB-INF/tld/wcm.tld" prefix="wcm" %>
    
     <%--
    /* Add the username and password here */
    --%>
    
    <wcm:initworkspace username="wpsadmin" 
         password="wpsadmin" >
    
        An error occurred initializing the WCM workspace:
        <%=error%>
    
    </wcm:initworkspace>
    
     <%--
    /* Setup the context here */
    --%>
    
    <wcm:setExplicitContext wcmWebAppPath="http://localhost:10039/wps/wcm" 
              wcmServletPath="/myconnect" 
              path="Web Content/Articles/Sample Article" >
    
        An error occurred setting the WCM context: <%=error%>
    
    </wcm:setExplicitContext>
    
     <div>
       <div>
    
          <a href='<wcm:plugin name="RemoteAction" action="new" type="com.ibm.workplace.wcm.api.WCM_Content"/>'>New Content</a>
       </div>
       <div>
          <a href='<wcm:plugin name="RemoteAction" 
      view="contentbytitle" 
      action="openmainview"/>'>View Content by Title</a>
       </div>
       <div>
     <a href='<wcm:plugin name="RemoteAction" 
               view="explorer" 
               action="openmainview"/>'>Open the Library Explorer view</a>
            </div>
    </div>

Reloading JSP files:

JSP files stored in the PA_WCM_Authoring_UI application are not reloaded, even if they are updated. Restart the server, or put the JSP in a separate web application configured to reload JSP files, in order for changes made to the JSP to be displayed.


Parent Developing