Topics: |
You can use a JavaScript function to dynamically navigate to panels within a Designer page and pass parameters from content in one panel to the content in other panels. This makes it possible to create an interactive page where the user can explore the data in different ways.
To create the Navigate to Panel function, you need to perform the following steps:
Note: The entire example of the content and the page that we create in this section can be found in your Retail Samples domain, in the Portal folder, under Advanced Features.
How to: |
In this step, you will create a simple report with hyperlinks, which you will later configure to point at a specific output in a portal.
For more information on how to create a basic report, see the Creating and Customizing Reports chapter, in the WebFOCUS InfoAssist User’s Manual.
The Drill Down dialog box opens.
Note: Remember the name of the parameter. You will use it in the subsequent steps.
The following image shows the example of the Drill Down dialog box, where TIME_YEAR is the name of the parameter.
The hyperlinks are added to the entries of the highlighted field.
Note: The links remain inactive and evoke no error messages until the target value is configured.
How to: |
In this step, you build parameterized reports and charts that will serve as the target content for the parameters coming from your JavaScript function..
The Create a filtering condition dialog box opens.
The following image shows an example of the filtering condition, where TIME_YEAR is the name of the parameter.
How to: |
In this step, you create a Designer Page, inspect the target content item inside the page and determine the CSS class for this item.
Note: Alternatively, you can populate the Classes field under the Content section to assign a custom CSS class to this content item. You can assign the same CSS class to two or more content items and apply a JavaScript function to all of them simultaneously.
The following images shows an example of CSS Classes, a default one in the ID field and the custom one in the Classes field.
How to: |
In this step, you edit the report containing hyperlinks to specify the output location and test the Navigate to Panel function.
JAVASCRIPT=drillRefresh
An example of modified syntax should look similar to this:
JAVASCRIPT=portalDispatch('drillRefresh' 'self' 'CONTENT-JBZUI1RV13DHPPP9A778' 'TIME_YEAR' WF_RETAIL_LITE.WF_RETAIL_TIME_SALES.TIME_YEAR)
where:
Is the JavaScript function.
Is an indication that the current page will be refreshed.
Is the CSS class that you copied from the web browser debugger interface.
If you want to refresh two or more items on the page, paste their CSS classes separated by spaces and enclose them all in single quotation marks, like so:
'CONTENT-JFJUGXYX1LHV08Z5T210 CONTENT-JFJUJUDL12XKUUHTX291'
Alternatively, you can paste the single custom CSS class that you assigned in the Classes field in the Properties panel.
Is the name of the parameter that is being passed from the hyperlinks.
Is the database entry which is tied to the parameter alias.
The following image shows an example of the modified syntax for a single parameter using the unique CSS class assigned by WebFOCUS Designer.
The following image shows an example of the modified syntax for a single parameter using the custom CSS class that you assigned in the Classes field.
When working with more complex content items, such as matrix charts or reports, you might want to pass more than one parameter to your target content. An example of syntax for passing two parameters using unique CSS classes assigned by WebFOCUS Designer is shown in the following image.
The following image shows an example of syntax for passing two parameters using the custom class that you assigned in the Classes field.
The preview mode opens.
Your content refreshes to reflect the correct data, as shown in the following image.
WebFOCUS | |
Feedback |