Is there an easy way to modify an application that has been built using bootstrap4xpages so it now uses that same code that has become part of the extension Library? This would allow the application to get the updates as I guess the bootstrap4xpages plugin won'T be updated anymore.
Thanks :)
If the application uses the Select2 control, you'll still need both in the xsp.properties. That's because there are licensing issues that prevented the Select2 control being included in Extension Library plugin.
Otherwise, as Per says, you can just remove the org.openntf.xsp.bootstrap.library reference from the xsp.properties.
Related
The Application Insights extensions in Visual Studio and Azure appear to inject the javascript snippet for page view tracking automatically, even though the docs say you enable this with an Application Setting key "APPINSIGHTS_JAVASCRIPT_ENABLED" = true.
Other docs show how to add the same javascript in my layout view, which I did. As a result I'm now seeing the AI javascript twice, once from my view, once from the AI magic. I'd prefer to control this myself -- how can I prevent the tooling from modifying the pages to inject the script? Setting APPINSIGHTS_JAVASCRIPT_ENABLED to false doesn't seem to work.
I'm working in an ASP.NET Core 2.0 web application.
Try upgrading to the lastest version of Microsoft.ApplicationInsights.AspNetCore. They released a new version (2.2.0) today, which resolved the problem for me! The javascript part is not added automatically anymore!
I would like to know if you can import the interface used for XPages (oneui) inside the application without the need to have to referencing the server or extend it.
Thank you
Since 8.5.3 OneUI has been delivered via an OSGi plugin on the server. Most modern XPages applications are being built using bootstrap look and feel instead, which is again in the OSGi plugin for XPages Extension Library on OpenNTF. IBM have also moved away from OneUI for IBM Verse and for responsive XPages have adopted bootstrap. I'm not aware of anyone who has tried to pull those into an NSF, and I would not advise it. You may hit Java security exceptions with some of the code, mapping between resources may not work, and there are an immense number of Java classes and other resources. And if you do hit any issues, you are unlikely to find much help to solve them.
Accessing controls values, what is the recommended way to use ?
document.getElementById(...) or XSP.getElementById(...)
The XSP object acts a "wrapper" and would hide implementation details (browser incompatibilities, etc.) for you, therefore I would prefer the use of XSP.getElementById(...):
The XSPClientDojo library defines a global XSP object which exposes
some JavaScript functions to the XPages runtime. As its name suggests,
XSPClientDojo utilizes the Dojo JavaScript library, however other
implementations may be developed in the future (for example, when
supporting handheld devices).
document.getElementById(...) places the reliance on browser implementation. XSP.getElementById(...) places the reliance on the IBM Dojo extension and IBM support.
The same rules hold for any of the XSP.... methods. If browsers changes should ever affect it, IBM code will be updated and as long as your server is on the current release and fix packs you will not need to make changes to your application. So as with relying on any framework, it comes down to whether you are willing to keep the framework up to date to leverage the extra layer of abstraction.
I am using PrimeFaces Extensions <pe:ckEditor> which is basically a server side JSF component which generates the necessary HTML/CSS/JS code output for CKEditor. It works fine, however I have a new requirement which requires me to use either the PBCKCODE or the syntaxhighlighter add-on of CKEditor.
I have successfully created a customized version with those add-ons from their website. However, I have no clue how to integrate those add-ons in <pe:ckEditor>. How can I integrate those add-ons in <pe:ckEditor>?
Is there any reason why you don't want to use the CKEditor directly in stead of using it through pe:ckEditor? At least thats what I did in our project.
I'm developing a Firefox plugin using XPCOM, I've not yet read all the docs, but as far as I can see, A plugin is simply a DLL that provides services via a XPCOM interface and interacts with the browser via XPCOM interfaces. Since the plugin itself is a native DLL, how would the security model work? Would it rely on the fact that the user trusts the plugin not to do nasty stuff, like with OCX controls?
I can't see any other way it could be secured... Is there?
Just to clarify a few definitions, as far as I know, in Mozilla-land:
a plugin is something that is used to render content via the NSAPI (think Flash, PDF, ...) and is normally not using XPCOM
an extension is a package that extends Mozilla/Firefox via XUL and/or XPCOM, which can contain components and/or XUL GUI stuff.
a component is a provider of XPCOM services and can be written in Javascript or as a native shared library/DLL
So I guess, what you want to do is an extension consisting of a component.
As an answer to your question: You are right, as soon as the user installs an extension, he is agreeing to trust that one. Even if it consists of Javascript code, it has automatically more access than web site Javascript.
XPCOM does not seem to be intended for plugins, but rather applications, so security is not modelled.