notification when Formio ngFormBuilder components are added to builder - formio

Using Formio ngFormBuilder (ng-formio-builder v2.26.0) and want to be notified when components (specifically my custom components) are added or removed from the builder-UI/dropzone.
The events that I did find in the source code do not seem to propagate to my listeners. e.g. emit not called on $rootScope -> $scope.$emit('formUpdate', ...)
I could not find any API events that worked for me.
Any suggestions?
Thank You.

Decided to set an angular watch on the form components passed to formio-builder and was able to determine when components were added or removed from the form.

Related

Azure DevOps extension using React: Can't stop navigating away from the page(beforeunload event)

The azure-devops-extension-sdk has events that can be listened to for work items like onLoaded, onRefreshed, onUnloaded etc. But there's no event to listen to while the web page itself is being refreshed(navigating away). I need to stop the navigation action in case there are unsaved changes in my custom UI element. Azure DevOps does this inherently only in those cases where a standard backend field is used. My custom UI element (installed using an extension I developed) doesn't use any backend fields.
window.addEventListener function doesn't seem to work and neither did the window.beforeunload function.
Seems you are using a hub extension. We could not use the window.beforeunload event of the browser which is not working in the case of an extension because it is running in an iframe.
After go through azure-devops-extension-api, didn't find any related interface. Afraid this is not available for a customized extension right now.

jQuery File Upload's change callback returns nothing

Everything about the uploader is working perfectly, but one callback seems to do nothing:
.bind('fileuploadchange', function (e, data) {
console.log("foo");
})
Binding to the change event never returns anything... so my question:
1) Is this a bug? I'm using the most recent version.
2) Is there another/better way to detect when files are manually removed from the upload queue (something more elegant than reading DOM elements)?
There might be a bit of misunderstanding in what the fileuploadchange event does.
The admittedly limited documentation for the change event states:
Callback for change events of the fileInput collection.
That means it's an event callback for the native change event of all the file input elements of the fileupload widget.
This event only fires if the user selects one or more files via the file picker dialog that is displayed after clicking on the file input button.
Technically, the basic fileupload library doesn't keep track of a queue.
It's up to the UI implementation to handle this, via the various callbacks provided by the basic library.
Until the user actually starts the file upload, there is technically nothing the basic library could keep track of.
And as soon as a file upload is started, the done and fail events are your basic building blocks.
By the way, the sample UI implementation handles the removal of items that have not been started yet by triggering a manual fail event.

Listening to SWT.OpenDocument event from within a plugin

I have read lots of differemt documentation about the launcher.openFile feature of eclipse. They contain information about how to add a listener for the SWT.OpenDocument event to react on files that were opened from outside. This always includes adding the listener inside the Application class of the eclipse product.
What i want to do is to add such a listener from within my plugin where i don't have an Application class at all. Is this possible?

Error in SAPUI5 routing / binding with 1.18 SDK example: SplitApp

When testing the SplitApp demo app provided with the 1.18.5 SAPUI5 SDK there seems to be a conflict between the routing and model binding. If you navigate to a detail page and then refresh the browser window the data binding fails. This would be the same as if you bookmarked the app on a specific view.
Just wondering if anyone knows why this is? Is it a conflict with routing and data binding? My debugging is not showing anything up yet only that the model is empty when the detail view loads.
This app uses the new Component-based router where you define your routes in the component metadata.
I've also written a small test app here js1972/test ยท GitHub (branch "routes") which does similar and has the same issue.
the following bookmark works with the fake service
../test-routes/#/detail/Categories(2)
../test-routes/#/detail/Categories(3)
doesnt
request.onSend in ODataModelFakeService.js doesnt cater for all scenarios
an alternative maybe to use sap.ui.core.util.MockServer with a cutdown metadata.xml and json files for the Category and Product entities
I've ran into the same issue and just want to share my findings and solution:
The detail view waits until the list in the master view is loaded. If the service you are using is quite slow the list has already finsihed loading, but the model has not finished loading and thus the detail view returns an error.
To fix this I've attached an "requestCompleted"-event to the model and created a jQuery.Deferred object for the model.
The master then waits for the resolve of the model.
oModel.attachEvent("requestCompleted",
function() {
this.oModelFinishedDeferred.resolve();
this.getEventBus().publish("Model",
"ModelFinished");}
, this);

A confluence attachment event plugin

I would like to make a plugin with some kind of a listener when an attachment is uploaded / or dragdropped. Anyone who might help?
There is one specialized Event extending ConfluenceEvent named AttachmentEvent - I think this is what you should listen to.
In the next step you simply need to implement an event listener module as describe in Atlassian's developer documentation.