Database Reference
In-Depth Information
PROBLEM CASE
Using the previously created Mall.vsdx, display the details of each monument by
clicking the shape.
Solution
Create a new page under the site pages and name it Mall.aspx.
From Insert on the editing Tools tab, under the Parts section, select web Part and
insert a Visio web Access web part from the Business Data Categories. Add a web
part to the page.
After you add the web part, make sure that the page is in edit mode and click the
link that says Click here to open the tool pane.
From the Visio web Access configuration window, choose Mall.vsdx from the Visio
Library document library and click OK.
Click OK on the configuration window.
Save and close the page to view the Visio diagram rendered on the web page.
right-click on the browser, click View Source on the context menu, and search for
the text class="VisioWebAccess" .
Find the corresponding id of the td that you should find just above the div . Usually it
will be WebPartWPQ2 on a freshly created site page.
Open notepad and paste the code in Listing 4-1 into it. Save this as the file assets.js.
Listing 4-1. Assets.js
<script language="javascript">
var _application = Sys.Application;
var _visioWebPart;
var onShapeSelectionChanged = null;
_application.add_load(onApplicationLoad);
function onApplicationLoad()
{
_visioWebPart= new Vwa.VwaControl("WebPartWPQ2"); // Change the
control id based on the code on your page
_visioWebPart.addHandler("diagramcomplete", onDiagramComplete);
_visioWebPart.addHandler("shapeselectionchanged",
onShapeSelectionChanged);
}
 
Search WWH ::




Custom Search