EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB236611: How to Add the Object Creation Date to the Object Details Shown in the Folder List View using the MicroStrategy Web SDK 9.4.x-10.4


Community Admin

• Strategy


The customization described in this Technical Note adds the object creation date to the list of object details, shown when browsing folders in list view, in MicroStrategy Web 9.4.x-10.4.

The customization described in this Technical Note adds the object creation date to the list of object details, shown when browsing folders in list view, in Strategy Web 9.4.x.
 
Before Customization:

ka04W000000OfQxQAK_0EM440000002GPy.jpeg

 
After Customization:

ka04W000000OfQxQAK_0EM440000002GPw.jpeg

 
Using the Web Customization Editor to create this customization:
Strategy SDK provides a Web Customization Editor that can be used to create a customization plug-in. The following steps guide users in creating the plug-in for adding the user history list to the Desktop page:

  • Launch the Web Customization Editor
  • Create a new plug-in and give it a meaningful name. (For step by step instructions on creating a new plug-in, please navigate toHome > Web SDK > Customizing Strategy Web > Web Customization Editor > Features and Customizable Settings)
  • Select the "Application Settings" tab and expand "Strategy Web Configuration" to view the hiearchical tree.
  • Navigate to Styles and locate "FolderStyleList" in the list of styles.
  • Double-click on the style to display the style properties.
  • Select the "Style Layouts" tab from the bottom of the "Style Properties" window:
ka04W000000OfQxQAK_0EM440000002GQ3.jpeg
  • Select "Edit Layout" to open the FolderListLayout.xml style layout file in an editor.
  • Look for the following code:
    
                    <div>
                        <mstrlayout:render name="Descriptor">
                            <mstrlayout:argument type="int" value="60"/>
                        </mstrlayout:render>
                    </div>
                    </td>

  • Below this code, add the following:
    
                    <td scope="col">
                    <div>
                        Created
                    </div>
                    </td>

     
     This adds the column and header label for this column.
  • In the same file, look for the following code:
    
                    <td>
                        <mstrlayout:render name="OwnerInfo">
                            <mstrlayout:argument list="FolderObjects" type="com.Strategy.web.objects.WebObjectInfo"/>
                        </mstrlayout:render>
                    </td>
    

  • Below this code, add the following:
    
                    <td>
                        <mstrlayout:render name="CreatedInfo">
                            <mstrlayout:argument list="FolderObjects" type="com.Strategy.web.objects.WebObjectInfo"/>
                        </mstrlayout:render>
                    </td>

     
    This instructs Web to call the renderCreatedInfo method in the style's transform, with the related object as an argument, in order to retrieve the output for the column created in step 9.
  • Save this file.
  • Right-click "FolderStyleList" and select "Create Transform":
ka04W000000OfQxQAK_0EM440000002GPr.jpeg
  • Fill in the fields for the new transform. For the name use "CustomFolderViewTransform" and for the superclass search for "FolderViewTransform":
ka04W000000OfQxQAK_0EM440000002GPt.jpeg
  • This will open a Java file in the editor. This is where the renderCreatedInfo method is added. WebObjectInfo getCreationTime() can be used to retrieve the date.

    For example:
    
    /**
     * Strategy SDK Sample
     *
     * Copyright © 2011 Strategy Incorporated. All Rights Reserved.
     *
    * Strategy MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE 
     * SUITABILITY OF THIS SAMPLE CODE, EITHER EXPRESS OR IMPLIED, INCLUDING 
     * BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS 
     * FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. Strategy SHALL NOT 
     * BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, 
     * MODIFYING OR DISTRIBUTING THIS SAMPLE CODE OR ITS DERIVATIVES.
     *
     *
     */
    
    
    package com.techsupp;
    
    import com.Strategy.web.app.transforms.FolderViewTransform;
    import com.Strategy.web.beans.MarkupOutput;
    import com.Strategy.web.objects.WebObjectInfo;
    
    
    
    public class CustomFolderViewTransform extends FolderViewTransform { 
     
        public String getDescription() {
            return "";
        }
        
        public void renderCreatedInfo(MarkupOutput out, WebObjectInfo object){
        	String creationTime = object.getCreationTime();
        	out.append(creationTime);
        }
        
    }
    

  • Return to the "Style Properties" tab in the style editor.
  • Change the style transform to the custom style created in step 13:
ka04W000000OfQxQAK_0EM440000002GQA.jpeg
  • Restart the web server for the changes to take effect. 

The example provided in this document is provided “as-is” and user has read the following customization warning:
​
ADDITIONAL INFORMATION:
The Strategy SDK allows you to customize several Strategy products and extend and integrate the Strategy business intelligence functionality into other applications. However, before changing the way Strategy products look or behave, it is helpful to understand how the application is built. For more information regarding the Strategy products or the process of customizing Strategy products, please refer to Strategy Developer Zone (https://developer.Strategy.com).
To access the Strategy Developer Zone, you must have access to the Strategy Knowledge Base, you must have purchased the Strategy SDK, and you must be current on your Strategy maintenance agreement. If you are a US-based business and believe that you satisfy all three of these conditions but you do not have access to the Strategy Developer Zone, please contact Strategy Technical Support at support@Strategy.com or at (703) 848-8700. If you are an international business, please contact Strategy Technical Support at the appropriate email address or phone number found at https://www.Strategy.com/us/services/support/contact.
CUSTOMIZATION WARNING:
This customization is provided as a convenience to Strategy users and is only directly applicable to the version stated. While this code may apply to other releases directly, Strategy Technical Support makes no guarantees that the code provided will apply to any future or previous builds. In the event of a code change in future builds, Strategy Technical Support makes no guarantee that an updated version of this particular customization will be provided. In the event of a code change in future builds, Strategy may not be able to provide additional code on this matter even though this customization is provided at this time for this specific build. For enhancements to this customization or to incorporate similar functionality into other versions, contact your Account Executive to inquire about Strategy Consulting assistance.


Comment

0 comments

Details

Knowledge Article

Published:

March 31, 2017

Last Updated:

April 24, 2017