af:inputfile drag and drop not supported in IE11 - internet-explorer-11

For one of our clients we are building a web application with oracle adf.
One of the requested features of this application is having a drag-and-drop file upload.
Fortunately the af:inputfile component supports this feature out of the box.
Unfortunately that feature is not supported in Internet Explorer 11, which we absolutely have to support.
Now I have been trying to get it to work using the dropzone.js library and the drag and drop functionality seems to be working. but I haven't been able to get the POST request to the ADF side of things quite right.
Even if I did it would be a lot of custom code that would have to be maintained, if it's the only way to make it work that is fine but if there is a more elegant solution to this I would like to know.

What you can do is to use ADF JavaScript APIs, more specifically AdfFileUploadManager(https://docs.oracle.com/middleware/1213/adf/api-reference-javascript-faces/oracle/adf/view/js/util/AdfFileUploadManager.html)
You need to instantiate it by giving it the ADF Component reference, which that can be an af:inputFile with display="none"
Then you can utilise your DropZone or any other functionality and use addFileToQueue to send this information to server side and convert it to UploadedFile.

Related

HCL domino add entries to view externaly

I have a hcl application to whose View I want to add entries from my local pc. I have very little knowledge about HCL in genral and have been looking for a soultion for days now without any success. Maybe Im looking at the wrong places but there was little to find. All I know right now is that I will probably end up sending my local data for the entries via postman and I do have to make an agent?/method that is accessable via browser that can receive these information and make entries with them.
I was just pushed into this thing. I wouldnt mind some usefull links to build my foundation as well.
There are many ways to add documents to a Notes/Domino database.
You are not very specific, it is not even clear if you want to do it programmatically. As Torsten said in his comment to your original post, there are many ways to do that.
Here are a couple:
Using the Notes rich client.
Through a web browser, accessing a web-enabled Domino database. This assumes the creator of the database has exposed the functionality to create documents on the web.
Use COM (or Java) to create the documents from an external scriptable application or using a programming language/platform supporting COM:
https://help.hcltechsw.com/dom_designer/9.0.1/appdev/H_EXAMPLES_ACCESSING_THE_DOMINO_OBJECTS_THROUGH_COM.html
Call a REST service on the Domino server that will create new documents. You can write a REST service using Lotusscript, Java or XPages:
https://www.slideshare.net/TexasSwede/break-out-of-the-box-part-2 (you can skip to slide 19)
Use Domino Access Services (DAS), a framework for adding REST services to Domino. A DAS service is implemented in Java and deployed as an OSGi plug-in:
https://ds-infolib.hcltechsw.com/ldd/ddwiki.nsf/dx/Create_your_own_Domino_REST_service_using_DAS
and
https://www.slideshare.net/JohnDalsgaard/engage-ug-rest-services-2015
Use node.js and the Domino AppDev Pack: https://doc.cwpcollaboration.com/appdevpack/docs/en/homepage.html
and
http://www.c3ug.ca/c3ug-blog/2020/6/30/announcement-learning-the-domino-appdev-pack-a-free-course-from-c3ug
There are probably a few more ways that I am forgetting...
Before you do anything else, you need to learn more about the Domino platform, the structure of a database, and the proper terminology used in Domino. If you don't understand the basics, you will not be able to write any kind of integration with Domino.

Communication between Selenium and custom web extension

I'm using Selenium (python) to automate some tests on websites. Because selenium's API is quite limited, I'm using a web extension to perform advanced javascript tests.
What would be the proper way to communicate results from the webextension back to the python script? So far, I'm passing them trough console.log messages, but it fails if the target site overrides console.log() (and it seems quite hack-y anyway).
I'd probably tackle this the following way:
Firstly, if you have control over the web extension's source code, then I'd add a simple method which serializes your data into a nice format, then stores it into the browser's local storage.
!Note: If you haven't worked with this, don't worry, there are multiple examples online. You have to keep into consideration that you're also limited to a 5-10 MB local storage limit for your data (varying across browsers).
Secondly, you'd have to read the localStorage values. I see two ways to do this:
make use of your underlying Selenium-based framework's API (usually all of them have some sort of localStorage/cookies API call). For example: in most frameworks you can use the .execute() command (or executeScript) to set the local storage value: browser.execute('localStorage.setItem('PerduData', <dataObject>);');
use plain JavaScript inside your scripts to set the same local storage value
I'm sure there are multiple ways to achieve the same outcome. If you're skilled at working with files, you can also consider storing the data object on other browser, or machine (OS) storage areas.
Lastly, I think the most elegant way to achieve this is by using some third-party storage which has a publicly exposed API that can ultimately accessed by both webextension & Selenium script.
Hope this helps!

Node webkit database support and Browser support

I am planning to use node webkit for porting my existing html/css/javascript from a web app to desktop native app.Before doing this, i was trying to see if there are any downsides of using node webkit.
Which is the best database supported by nodewkit
My understanding is that it does not require any browser to run this node webkit app and that it provides webkit engine and the app provides a UI to it by using html5, and css.Is this understanding of mine correct?
All your pointers will be helpful.
Thanks!!!
Yes that is correct. Node webkit works as an HTML5/Node.js application wrapped around simple browser app written on Chromium Engine, and it doesn't need anything installed to work.
As far as I understand You want to connect to remote database, not create a local one for user data. If that's true, You shouldn't implement it on client side, but on server side. Which means your server side implementation shouldn't differ from Your actual one.
I create some applications with the following struct :
- folder : server (for any php/db request or response)
- folder : client (for js/css and images)
the relation beetween the client and the server is AJAX.
and the best db for a local use I prefer : Sqlite (in a network MongoDB or MySQL)
in all the cases it's preferably to use an ORM like Doctrine.
and make sure that in the response of server you send allways a json (not a formatted divs or any html) the client must be able to organise his data him self.
as a sample : openerp use this structure (with python istead of php).
for use of sqlite here is link that explane the way:
http://tejasrpatel.wordpress.com/2011/12/29/create-sqlite-off-line-database-and-insertupdatedeletedrop-operations-in-sqlite-using-jquery-html5-inputs/
that's the advices from my experience. and hope this be helpfull for someone.
I am currently developing a node-webkit app myself as well. I had this same question so as I was looking around I found PouchDB. This looks very promising for a node-webkit environment so that's what I'm going to be using. I hope this helps you out as well.
Actually there is one major part of node-webkit that you don't mention in your question, that is the 'node' part, specifically node.js. This is important because just about anything you can do in node.js is available to you in node-webkit.
I don't know what your application does, so I can't tell for sure, but you may or may not need an actual database. If all you want to do is store some data, you may find a file to be sufficient (JSON or whatever format is convenient for your purpose) which is easy to do with the fs module. Or you might only need to use localStorage, which is also available in the 'webkit' part of node-webkit.
If you do actually need a database, then anything works with node.js should be available to you, such as the aforementioned pouchdb, or any number of other possibilities.
In any case, you don't need to set it up as a client server model if you don't want to, you can just access files or databases directly in your node.js code. Conversely, if you do want to do a client-server model, you can have both running locally within your node-webkit program.
Hope that helps.
I use node-webkit insted of Qt, PySide, etc. and I tell you why:
webkit (the most full feature browser)
nodejs (what can I say is javascript)
cross platform (almost all)
To package and distribuite the software I use Web2Executable
For the GUI I use ExtJs 4.2 from Sencha
Database (engine) I use NeDB but you can use internal engines from webkit found here persistent-data-in-app

is there a backend for recline.js built to work with rails?

Recline.js seems a great tool to display data on grids, maps, etc.
I'd like to use the grid views, but to be able to save what is displayed to the user on a database. I'm currently using rails for this project.
In the docs, they say how to code a backend to integrate with it (http://okfnlabs.org/recline/docs/backends.html) but i wonder if there's already someone working on it ( I couldn't find it on the web)
Thanks
The Backend object in Recline.js a javascript component that talks to a data source of some kind, typically a web service. The Backend component talks to the interface of that web service, and it doesn't care whether it be programmed in Ruby, COBOL or Java, as long as it knows where to get and send the data, and in what format.
So in short there isn't, and can't really be a ready Rails backend, because the implementation depends more on the specifics of your application -- how to map the data in your database (MySQL?) to a service API Recline can understand, and vice versa.
You can use SOLR with Rails, so I dont know why you couldn't utilize the Recline.js SOLR functionality to search your rails data.

Android MySQL php+JSON alternative

I have written a simple database driven app in C# which uses a 2 table MySQL database. This is all a learning curve for me (except c#, which I am now comfortable with)
The app is small, has a couple of datagridviews, uses a few sql select/inserts statments to populate the datagridviews and also update records.
I want to port this app to Android. All of the internet sources I can find recommend a middle php sript which accepts http requests in order to fetch the data from MySQL and then return the results back to the android device where it is parsed with JSON etc etc.
This method is a little out of my reach since I dont have php experience, all of my attempts to implement the php layer have failed, speciially the android app was not receiving any data back, I'm assuming I messed up somewhere inside the php file.
Is there an easier (more noobproof) way to interact with the MySQL database from within android which doesnt require the need for php + JSON? Any ideas are appreciated, thank you in advance.
If you are comfortable with C#, why not use ASP.Net MVC for the middle man?
MVC is especially easy to deal with JSON, and you actually only need to create those "controllers" (as models should already be there from your existing app, and JSON don't need the View to display).
You can create a Web Service with C# that handles the data retrieval from the database; no need to go with PHP. Try create one with WCF API (check this question in order to create one). In order to create an Android client that consumes JSON on Android check this link.
If your mobile application have to access a database over the network you should indeed build a web service fronted to the database.
By putting a web access layer on top of the database you can expose the required queries in an abstracted, secure and convenient manner.
Though this sort of web service architecture can be implemented with PHP + JSON other technologies can be used as well. If you feel more comfortable with C# you can use it to build the web service instead. By doing so you may even be able to reuse some of the code from your existing application.
Actually, it would be better to take php in middle of android & mysql, due to the security concern and by the way this is the most easiest & comfortable method. here is link link. I hope you like it.