Creating a Rich List

There are two ways to create a Rich List. You can create a Rich List by dragging the Rich List result viewer (located in the Business Portal web part gallery) onto your page and configuring it.

You can also create a Rich List as an ASP, ASPX, or HTML file. To display this file in Business Portal, you must drag the Page Viewer web part (located in the Business Portal web part gallery) onto your page and configure it to point to your ASP, ASPX, or HTML file. The following example shows the HTML code used to create a Rich List.

<html XMLNS:RL>
    <head>
        <?IMPORT namespace="RL" implementation="/BusinessPortal/UI/
            ResultViewer/Scripts/Rich.htc"/>
        <title>Rich List</title>
        <script>
            function OnRichList1Ready()
            {
                //Add a stylesheet.
                RichList1.AddStyleSheet("/BusinessPortal/UI/
                    ResultViewer/Stylesheets/RichList.css");
            }
        </script>
    </head>
    <body style="margin:0">
        <RL:Rich
         id="RichList1"
         SupportsAutoRefresh="true"
         AutoRefresh="1"
         SupportsPageSize="true"
         PageSize="10"
         HasFind="true"
         OnReady="OnRichList1Ready()"
         QueryServiceURL="/BusinessPortal/QueryWebService.asmx?WSDL"
         InitialQuery="/DataViewer/Inventory Items/Items"
        />
    </body>
</html>

The ?IMPORT element has a namespace attribute and an implementation __ attribute. The namespace attribute specifies the namespace of the Rich List. The implementation attribute specifies the path to the HTC component implementing the Rich List.

<?IMPORT namespace="RL" implementation="/BusinessPortal/UI/
    ResultViewer/Scripts/Rich.htc"/>

The AddStylesheet() method is called to apply the Rich List stylesheet settings to the result viewer. This method takes the URL location of the stylesheet as a parameter.

function OnRichList1Ready()
{
    //Add a stylesheet.
    RichList1.AddStyleSheet("/BusinessPortal/UI/ResultViewer/Stylesheets/RichList.css");
}

The location of the Query Web Service is set by assigning the location to the QueryServiceURL property.

QueryServiceURL="/BusinessPortal/QueryWebService.asmx?WSDL"

The InitialQuery property specifies the query that will be displayed when the Rich List is initialized. You must supply a path to an existing query.

InitialQuery="/DataViewer/Inventory Items/Items"