Skip to content

Instantly share code, notes, and snippets.

// \META-INF\resources\util\control\FileLocationControl.js
if (!sLocationType || (sLocationType === "0")) {
// Create Embedded link control(commands: DownLoad and UpLoad) and add in HBox
oInstance.LocationType="2";
oConstraint.getCommandsDefinition = undefined; // for create link without command, should be restored
oInstance.Location=window.location.origin+"/powerdesigner-web/EmbeddedFileServlet?id="+oInstance.RepositoryId;
oEditLink = util.ControlFactory.createLinkControl(oInstance, oFeature, bEditable, oPropertyDefinition, false, true);
oConstraint.getCommandsDefinition = oCommand; // Restore commandDefinition
if (bEditable) {
oEditLink.getContent().setWidth("100%");