Creating Click Throughs

From MT Marvelit
Jump to: navigation, search

There are two ways to create click throughs in MARVELit DASH:

1. Entering a URL into the Chart or Meter Portlets
2. Entering a Link attribute in XML Descriptors

URL Attributes

In the Chart and Meter Portlet - there is a field where a URL can be entered. This field can contain a URL to any site on the internet, an intranet or to another page in DASH.

All pages in DASH have a URL associated with them. If you want to create a page in DASH to link to - follow these steps:

  • Create a page using the Portal Site Manager. You may want to make the page hidden by clicking the hidden attribute box. See Adding Panes for further instructions.
  • After you create the page - copy the URL for that page. View the page and copy the URL string. An example would look like this - http://demo.marvelit.com/jetspeed/portal/Sales/Snapshots.psml
  • Paste this URL into a Chart or Meter portlet URL field. See Chart Portlet or Meter Portlet for additional information.
  • Once you save the Meter or Chart - the image will contain a link to the DASH page specified in the URL. The Cash Goal Meter on the Welcome page of the Demo site uses this method. See http://demo.marvelit.com

Links in XML Descriptors

All DASH portlets contain an XML descriptor field. A link attribute can be saved in this field that will associate a link to a URL and pass the value that was clicked on. See the following XML taken from the Receipts / Refunds Bar Chart on the Welcome page of the Demo site. The Chart is also displayed.

XML Link.jpg

  • The link attribute is highlighted. In this example - The Month Column (column 1) contains a link attribute. It will link to the Receipts.psml page.
  • The value clicked on - in this example a month name (May,June,July,Aug) - will be passed to the Receipts.psml page by coding Month=$F{Month} at the end of the link attribute.
  • The $F value must equal the name of the Column or an error will be displayed.
  • Once you save the portlet - the column will contain a link to the DASH page specified in the link attribute. The Receipts / Refunds Bar Chart on the Welcome page of the Demo site uses this method. See http://demo.marvelit.com

Using the $F value in the URL

When a user clicks on the link - DASH will display the Receipts.psml page and pass to it the value that was clicked on. Here is an example of a URL if a user clicks on Aug:

http://demo.marvelit.com/jetspeed/portal/Receipts.psml?Month=Aug

On the Receipts.psml page - two charts are displayed.

Receipts psml.jpg


Both of these examples use the $F value passed - here is how it is implemented.

List the $F name as a parameter on portlets using this value. In this example: $F{Month} is entered as Month in the parameter field.

Link paramater.jpg

List the Month paramater in the SQL as a $P value. In this example: $P{Month} is entered in the where clause.

Link sql.jpg

Why This is Better

DASH supports click throughs on images or report attributes and displays a whole dashboard page for those elements. Typical OLAP applications only provide users a detailed set of data for the item clicked on. DASH can be used to provide users with multiple data points for analysis and comparisons. Since the standard portlets are used - it is not necessary to create OLAP cubes or MDX queries.