The Forecaster Aid Selection Panel can be used to show a list of reports. Since 2017.02 a explorer location document attribute can be configured. When an explorer location is selected containing the configured attribute, the document will be automatically selected.
Example Configuration
In the DisplayConfigFiles, a forecasterAidSelectionPanel.xml should be added:
Code Block |
---|
language | xml |
---|
title | forecasterAidSelectionPanel.xml |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<forecasterAidSelectionPanel xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/forecasterAidSelectionPanel.xsd">
<explorerLocationDocumentAttributeId>document</explorerLocationDocumentAttributeId>
</forecasterAidSelectionPanel> |
In Explorer.xml the task should be configured using a <displayConfigFileName>:
Code Block |
---|
language | xml |
---|
title | Explorer Task |
---|
|
<explorerTask name="List of Reports">
<displayConfigFileName>forecasterAidSelectionPanel</displayConfigFileName>
<!-- old configuration:
<taskClass>nl.wldelft.fews.gui.plugin.information.ForecasterAidSelectionPanel</taskClass>
-->
</explorerTask> |
Finally, the locations for which a report document is available should have the attribute named in forecasterAidSelectionPanel, which contains the name of the file which should be selected (case-sensitive, including the file extension). For example:
Code Block |
---|
language | xml |
---|
title | LocationSets.xml |
---|
|
<locationSet id="my_loc_set">
<csvFile>
<file>my_loc_set.csv</file>
<id>%ID%</id>
<x>%X%</x>
<y>%Y%</y>
<attribute id="document">
<text>%DOC%</text>
</attribute>
</csvFile>
</locationSet> |
Code Block |
---|
|
ID,X,Y,DOC
loc1,0,0,loc1_report.html
loc2,1,1,loc2_report.html
... |