If you have a portlet developed for Viewpoint 12.0, here are the steps you'll need to take in order to get it working correctly under Viewpoint 13.0.

Modify ivy.xml to use 13.0 jars

If you are developing inside of the Teradata network you will need to modify the ivy.xml file for your portlet. If you are not then go to the next step.
Edit ivy.xml. Change the rev to "" for all "tdcommons-X" projects, "3.0-SNAPSHOT" for "anterage", and leave it at "" for "TeraJDBC". Here's an example of what the end result should look like:

<dependency org="teradata" name="tdcommons-portlets" rev="" conf="runtime->runtime" changing="true" />
<dependency org="teradata" name="tdcommons-model" rev="" conf="runtime->runtime" changing="true" />
<dependency org="teradata" name="tdcommons-security" rev="" conf="runtime->runtime" changing="true" />
<dependency org="teradata" name="tdcommons-testutil" rev="" conf="build->build" changing="true" />
<dependency org="teradata" name="tdcommons-taglib" rev="" conf="runtime->runtime" changing="true" />
<dependency org="teradata" name="anterage" rev="3.0-SNAPSHOT" conf="runtime->runtime" changing="true" />
<dependency org="teradata" name="TeraJDBC" rev="" conf="runtime->default" />

Manually move new jar files to your portlet

If you are developing external to the Teradata network you will need to manually update your portlet with new jar files. First delete all of the old jar files from your WEB-INF folder. There are located here:

Now grab the new jar files from one of the demo portlets that were generated with the PDK, and put them in the folders that you just removed the old ones from. If you were to grab them from the DynamicQuery portlet, you would find them here:

Update portlet.xml to enable maximized mode and make the portlet shareable



Edit viewpoint-portlet.xml, and modify the portlet element to indicate whether or not this portlet is shareable. Instead of "YourPortletName", you should see the actual name of your portlet.

<portlet id="YourPortletName" label="YourPortletName" shareable="true">
Add permissions for setting preferences and sharing the portlet.
<permission scope="domain" name="SET_PREFS" description="If granted, the user can access the preferencess view" />
<permission scope="domain" name="SHARE_PORTLET" description="If granted, the user can share the portlet" />


Fix validation

Change "TjsValidate.js" to "TjsValidator.js"

<script type="text/javascript" src="/CommonsWeb/js/TjsValidator.js"></script>


Add functionality for "Clear defaults" button in preferences

Add the following code at the end of preferences.jsp to hook up the "Clear Defaults" button to a backend controller. Replace "YourPortletName" with the name of your portlet, with the first letter capitalized:

<script type="text/javascript">
    TDPortalManager.onPortletReady('${context}', function()
	// add click handler for clearPreferences button
	jQuery('#clearDefaultsBtn').click(function() {
	      { portletName: '${portletName}', context: '${context}' },
	      { target: ".removedefaultsbutton"});

        <c:if test="${securityDomain != tdPortletId}">

Add a new property as shown below to use your portlet's View Controller for clearing default preferences. Replace "yourPortletName" with the actual name of your portlet, where the first word is lowercase.

<prop key="/summary">yourPortletNameViewController</prop>
<prop key="/configuration">yourPortletNameViewPreferencesController</prop>

<prop key="/clearPreferences">yourPortletNameViewController</prop>

Now we need to add a clearPreferences() method to your controller. Replace both instances of "YourPortletName" with the actual name of your portlet, this time with the first letter capitalized.

      // set 'summary.jsp' as the view for this page.

     * Clears the preferences, uses the common controller code to clear the preferences
     * @param ctx the controllerContext
    public void clearPreferences (ControllerContext ctx)
        ctx.addViewObject("result", "defaults cleared");

Create a new file, clearPrefs-feedback.jsp. This will be used to display the success/failure message when the user presses the "Clear Defaults" button in the preferences.
<%@ page contentType="text/html" language="java" %>


Run your new 13.0-compatible portlet

Your portlet is now ready to be deployed within the Viewpoint 13.0 environment.