Invient Chart add on - Vaadin - javascript

I am now using Invient Chart add on for my Vaadin project and I am very curious how invient chart invokes the highcharts javascript libs.
-K

The Server side component InvientCharts communicates with the VInvientCharts GWT widget on the client side. This is standard Vaadin server <-> client communication. On the client side the VInvientCharts widget is actually a wrapper for a pure GwtInvientCharts GWT widget. The GwtInvientCharts invokes GwtInvientChartsUtil for making most of the actual calls to the Highcharts JS-library functions. This is done through regular JSNI.
The way the sample includes the Highcharts JS-lib to the generated web page in the example is by using an extended servlet which injects the JS files to the header.
All this can of course be examined more closely by yourself by viewing the code which is included in the add-on package. E.g. drag-and-drop the add-on JAR to Eclipse and then just
browse Java Resources -> Web App Libraries -> invientcharts-0.x.x.jar.
Hope this was at least part of the information that you were looking for.

Related

Browser like experience on a .Net Server

I want to generate a leaflet map on a .Net server. Currently am aware that this i only possible on the browser. I want it server server side so that i can re-generate automatically later and export it to various formats for a report
Are there tools that I can integrate with my .Net project to give
me a browser like experience on the server
I found the solution to server side rendering of js and css on DOM files with chromium.
Chrome can be run as headless providing the capability to render in the backend without it's UI. There's a library than can be used to drive chromium call peppetteer for Node js
and PuppeteerSharp for .Net. Under .Net u can get it as Nuget Package and as for Node js its on npm .
https://github.com/kblok/puppeteer-sharp for PuppeteerSharp

Extract, edit and save .dwg meta data

I'm building an app that deals with engineering projects. Part of the app requires uploaded CAD files (.dwg) to be assigned to equipment.
What I would like to do is edit the meta data of each file to contain a reference to the part it has been assigned to.
So if a file was linked to part X1234567 I'd like to add this 'tag' to the meta data of the CAD file.
I have been working with the Forge API and see there is an endpoint for extracting meta data documented here but I see no way to put edited data back in to the file.
Is there any way to use the Forge API, PHP, Java or JS to write a method to extract metadata, edit it then save it back to the file?
I'm open to any suggestions to how I can do this.
Thanks
I should also note Java is my last choice, sorry Java guys, I'd really like to keep this in PHP or JS, but can dust off my Java skills if that's the only way.
I read your question as you want to edit metadata within a DWG (not the data that is attached to the DWG file in A360). Presumably you want to edit Xdata or Xrecords. To do this, you should use the Design Automation API (not the Model Derivative API).
The Design Automation API is essentially a headless version of AutoCAD running on an Autodesk server (the API used to be called AutoCAD I/O). You can use this API to run any script against any DWG as long as you don't require user interaction. You can also run custom actions (commands) that you have defined using the AutoCAD LISP, .NET or ObjectARX APIs (i.e. you can upload your own script or add-in to the service and run it against your DWG.
Documentation for Design Automation API is here - https://developer.autodesk.com/en/docs/design-automation/v2/overview/.
There are some samples on GitHub here - https://github.com/Developer-Autodesk/AutoCAD.io.

Webpage create / edit file

I'm working on a webpage that has to work offline when it's finished. No XAMPP or other services available, so PHP is no option.
It has to create a new file, edit a filename (which would be the best solution) or move a file into another directory. This action has to be called from a function in jQuery.
I've read that Python could to this but as long as I read Python needs a web framework and a configured Apache as well, so if it's right Python is no possibility for me as well.
Is there any way to do this with JavaScript / jQuery or anything else which works offline?
No. It won't work by Design. Imagine, you visit a Website and it would install virus.exe into your Windows Directory (For example Autostart).
Html Pages are for Displaying Informationen to the User. Javascript is supporting it with dynamic Features. The Browser grant Rights for Loading other Information and nothing else. Everything which would affect the System, could not handled by Script.
If it should run from Web, you need a Plugin (Like Java). In your case (Offline Use) consider to write a Desktop Client (C#, VB.NET, Java, C++).

How to deploy WaveMaker project without runtimeLoader.js

WaveMaker is a powerful ajax based UI builder, but its JSON-RPC API standard is incompatible with our web service, which only has a RESTful API. As a result, we would like to design an UI without using any service using WaveMaker, and only extract part of its source code that runs on browser side (discarding all services)
Unfortunately, we can neither view or test the extracted code (all .html files show an empty page), a javascript reference in index.html is pointing to runtimeLoader.js, which we cannot find anywhere. So, is it possible to deploy the browser side code on a web container (not an application container like Tomcat) without runtimeLoader.js? If this is not possible, how do I change the source code so it can be tested without using WaveMaker?
If you don't mind having a java server in the mix, you could "import" REST calls to your API into the application. The XHR service (new in 6.5) targets JSON returning services. The 'Build-a-Service' does best with XML returning services. The browser would then call the WM java server, which in turn calls your REST services.
An easy way to get started with a WaveMaker client only app is to use the phonegap build option. This will build a zip file of a stand alone app. If you unzip that into say an apache served folder, you will render pages, etc. Note this build is targeted towards mobile devices via phonegap, so you will want to make adjustments if you are targeting desktop browsers.
Also, runtimeLoader.js can be found in the client runtime lib folder. e.g. /studio/lib/runtimeLoader.js of the installation.

Javascript notification plugin

I'm developing a web 2.0 app using HTML/Javascript and Java for server side.
My app manage a lot of notifications per-user and I would add a simple popup with unread number after a user click (like facebook) that shows the latest 10 notification (I've just implemented logic within server side).
Is there any graphic plugins (e.g. by jQuery) that I can use?
I'm the author of Notify.js - http://notifyjs.com. It depends on jQuery at the moment but I do plan to remove the dependency in future. Post any questions you have about it here https://github.com/jpillora/notifyjs/issues
Here's one I've written, it has no dependencies and is very lightweight: http://shaundon.github.io/simple-notifications/

Categories

Resources