Flash Drawing Control

Run an action on a room selection in a Flash drawing

Technologies > User Interface Add-Ins > Flash Drawing Views > Use Panel to Show Selected Room Details 

Note: With the release of ARCHIBUS V.23.2, all ARCHIBUS views were converted to use the HTML drawing control instead of the Flash drawing control. If you have previously created views that use the Flash drawing control, the view's drawings will still work.

For new views that you create, ARCHIBUS, Inc. recommends using the HTML control, as the Flash control is slated for desupport in future versions of ARCHIBUS. For information on converting existing views with Flash drawings to HTML format, see Convert views with the Flash drawing control to the HTML drawing control.

In this example, when the user clicks on a room in a drawing the room details are displayed in a separate form panel. Because a single room is selected at a time, the multipleSelectionEnabled attribute is set to false:

<panel type="drawing"
       ...
       multipleSelectionEnabled="false">

In the afterViewLoad auto-wired function, specify a handler for the drawing's onclick event:

this.rmDetailSeparatePanel_cadPanel.addEventListener('onclick', onClickHandler);

The onclick event handler takes two arguments. The first argument contains the primary key values from the selected room. The details form panel is then refreshed with the selected room restriction:

function onClickHandler(pk, selected) {
    var form = View.getControl("", "rmDetailSeparatePanel_form");
    var r = new Ab.view.Restriction();
    r.addClause("rm.bl_id", pk[0], "=", true);
    r.addClause("rm.fl_id", pk[1], "=", true);
    r.addClause("rm.rm_id", pk[2], "=", true);
    form.refresh(r);
}

View: http://localhost:8080/archibus/schema/ab-products/solutions/drawing-flash/ab-rm-detail-separate-panel-drawing.axvw

Copyright © 1984-2018, ARCHIBUS, Inc. All rights reserved.