Protocol Install Callback function is called even after the protocol plugin is installed - ithit-webdav-server

I'm calling the DavProtocolEditDocument() function in javascript to open the documents on the client:
ITHit.WebDAV.Client.DocManager.DavProtocolEditDocument(sDocumentUrl, null, protocolInstallCallback);
The first time it's called on a workstation, it calls the protocolInstallCallback() function and the plugin is installed. After that, on many workstations, the protocolInstallCallback() function continues to be called everytime another document is being opened. The document still opens as desired, but the confirm window called from the protocolInstallCallback() function is still opened.
How do I get it to recognize that the plugin is already installed?

First of all make sure that you have the latest WebDAV Ajax Library version. Web browsers are updated rapidly and some functionality may not work with newer web browsers. Download the latest IT Hit WebDAV Ajax Library build here.
If you are using protocol application (in case of cookies authentication or if you open non-MS-Office documents or using DavProtocolEditDocument() JS function):
Verify that a Web Browser extension is installed and enabled. See the
Protocol Application Detection and Installation article for details about each web browser specifics.
Reload a web page after installing protocol app and enabling
the extension.
Verify that the WebDAV Ajax Library JavaScript file on your web page and a protocol application have the same version (or at least use the same protocol version).
The WebDAV Ajax Library Version and protocol used by JavaScript are returned by WebDavSession.Version and WebDavSession.ProtocolVersion static properties respectively.
You can find the version of the protocol application installed on your machine: a) On Windows: in 'Add or remove programs' panel. b) On Mac OS X: in 'Applications' folder.
If you do not have a protocol application installed and are using Chrome, Internet Explorer or Safari. You may need to increase the timeout using ProtocolTimeoutMs property. Note that this is relatively rear case that typically appears on a slow machines.

Related

Combine JQM, MVC and PhoneGap together

I have a site which uses microsoft mvc 3 on the server side, jQuery Mobile on the client side and I want to combine it with PhoneGap and produce executes for Android and iOS.
Is it possible?
How?
Thanks
Yes, it is possible.
If you must use Phonegap, there are a couple of things to do:
First, you must create a project corresponding to each platform , following these instructions. Once you do that, you basically copy all the client side code (js, html, css) to the www folder of your project. This is one of the reasons, the app could load faster, since it's reading its resources from the local filesystem, and not receiving them from an http connection each time.
Second, you must find a way to provide your server side data to your app. If you are already using REST services or RPC methods to populate your website, then that's done, but if not, you must start by building them, and then calling them from your client (through ajax calls from jQUery most likely), and then rendering them through javascript (you can use the multiple templating libraries out there or just plain javascript, I recommend the latter only if the UI updates are minimal).
As you can see, the second part requires quite a little bit more work. Especially if you haven't built web services before.
The other option ,which does not require phonega/cordova is to use an embedded webview. Then you wouldn't have to do anything. It would work similarly to a browser (Loading the remote URL of your site), with the added advantage of being inside and android/ios app, and you could add other views or communicate with the embedded webview using native code. If you are planning to load html files from the filesystem and not from your server, you would have to do the same thing you have to do with phonegap.
It happened to me, if you have a web app depending on server code I would go with a WebView based app, and not a Cordova app.
It's really simple to create those webviews apps for Android or IPhone.
Here you have an example for building a webview based app on android
Here you have an example for building a webview based app on IOS
Hope it helps.
If you want to reuse your site you'll need a webview that browses it.
Phonegap wouldn't be needed if you use this approach, but the application will not be as responsive as a native app, and the IPhone moderators may reject your app for that reason (it happened to me).
Another approach would be that you recreate your site as a pure Javascript application and only communicate with your servers to execute some REST Services. In this case Apache Cordova makes sense.

Debugging web app on ipad without Mac

I'm tasked with fixing a bug on the mobile version of a project I just came on (and still learning my way around it). Its a heavy use 24/7 kinda job, so not keen on the trial and error guess/upload/test style of debugging.The bug is that almost none of the controls, particularly tabs, respond to user "clicks" on the ipad. The app was developed in asp.net MVC4 and I work on windows 7 in vs2012.
We are not a mac shop, but still need to support the Ipad and phone.
This is probably a simple question: but my searching keeps taking me
here: iOS6 - removed console log for IPad - how to use web inspector on windows?
and here: Accessing iOS Safari Web Inspector from Windows Machine.
I need a way to gather actually diagnostics, like what would be available in web inspector, without having to acquire a mac.
Use weinre. It runs a webserver that that can repond to a bookmarklet or <script> to run a remote inspector.
weinre is a debugger for web pages, like FireBug (for FireFox) and Web Inspector (for WebKit-based browsers), except it's designed to work remotely, and in particular, to allow you debug web pages on a mobile device such as a phone.
Get NodeJS, NPM, and a webkit-based desktop browser to run it.
Homepage: https://people.apache.org/~pmuellr/weinre/
Docs: https://people.apache.org/~pmuellr/weinre/docs/latest/
To install with yarn:
yarn add --dev weinre
then because it's no longer maintained, you may get TypeError: mime.lookup is not a function when you try to use it, then you have to edit node_modules/connect/lib/middleware/static.js and change require('mime') to require('mime-types') on line 21 (thanks). Then start with
yarn run weinre
If you now open the url showed there, you'll see the bookmarklet you can use etc. (Note: If using this from other computers, you may have to open local firewall ports, and if debugging a https site you may have to add a reverse proxy with cors headers.)

How to call Java EE SOAP or REST services from mobile platform. etc Dxtreme, Jquery Mobile, Icenium

I want to develop mobile apps based on HTML, JS. It must work on any device etc iphone, ipad, android and windows phone...
I must use JAVA EE on server side. First I choosed Dxtreme. after I learned dxtreme, it is possible REST Service using ASP.NET Web API. But it is inpossible on Java EE. following error :
But call along #POST, #PUT and #DELETE methods throws error
"XMLHttpRequest cannot load http://www.restserver/Service/item. Origin
http://www.localhost:51140 is not allowed by Access-Control-Allow-Origin".
I believe there must be something that people must be using SOAP or REST Service on Mobile.
Which mobile framework is it possible ?
Please help me.
Thanks.
have You read About Phonegap?U can use phonegap to build application that can work around different Mobile platform.Its uses HTML5,CSS3,Javascript.Hope this helps you......
Generally, people access web services using RESTful interfaces on the server end. You can create that with ASP.NET Web API and many other server side frameworks of course. Your error, I'm guessing, but not sure, is from your client application. If I'm correct, you are probably running some simulator or the app within a browser client, and not one of the mobile framework simulators, and are running into the problem where the browser restricts your access to services on systems other than the site your started with. I.e. if you got to myboringwebpage.com and try to look up something on api.twitter.com within the app, the browser will stop you unless you add certain things to your web server/page telling the browser that that is OK. Look up "CORS". With Icenium, if you use the browser development environment "Mist" you will get those issues. If you use the Windows environment "Graphite" there is no such restriction. If you use the Intel HTML5 XDK at http://html5m.com/, it runs some process to get around those issues, while running a simulator in a browser. If you end up building PhoneGap apps, which you can using Icenium, appery.io, Intel HTML5 XDK, PhoneGap Build and others, the built app, installed on the phone, will not be restricted as an in-browser "app" would. However, I had problems with the Intel framework's XHR code handling all the different methods. Sorry this probably doesn't cover everything you need - you'll have to live and learn a lot of this.

Does javascript on iOS have to be downloaded *by* the WebKit framework in addition to executing within its framework?

The agreement says this:
3.3.2 An Internal Use Application may not download or install executable code. Interpreted code may only be used in an Application if all scripts, code and interpreters are packaged in the Application and not downloaded. The only exception to the foregoing is scripts and code downloaded and run by Apple's built-in WebKit framework.
It particular it says ".. code downloaded .. by Webkit framework".
Does anybody know if for a native app using UIWebView this means Javascript has to be downloaded automatically by Webkit i.e. as a consequence of the user clicking on an external url link. Or if it would be acceptable for the scripts to be downloaded by creating my own HTTP connection to a server and downloading them myself - but they would be executed within Webkit (via UIWebView) ?
I presume this restriction is for security purposes, so does the security come from limiting the execution to within WebKit, as opposed to where the scripts are downloaded from?
I realize its unlikely anybody can definitively answer this except Apple, but speculate answers are very welcome.
Thanks
The exception that Apple is making is based upon the sandboxed nature of Webkit/UIWebView - in effect, it provides an "allowed" scriptable environment precisely because it is so well sandboxed. If you provide a UIWebView, it doesn't make any real difference if the user navigates to a site that then executes some Javascript in the browser, versus you programmatically getting some Javascript via NSURLConnection or other way, and then loading that into the UIWebView be reloading an HTML file or using "stringByEvaluatingJavaScriptFromString".

Drag and drop ftp file upload web widgets

It seems like drag and drop upload widgets disappeared from the face of Web 2.0. The last one of these I remember using was an activex widget, and inability of using it in anything other than IE doomed it. Have you used or seen one of these recently?
The Dojo Toolkit JavaScript library supports some drag & drop functionality that I've seen work in IE6+ and FF2+. The nice thing about Dojo and other JS libraries is that they abstract away all of the browser detection stuff.
I'm sure other JS libraries support this functionality.
FTP Drop for Yahoo Widgets allows you to drag files over the widget and the file will be sent to the defined ftp server.
You can upload to FTP in browser with an applet such as JFileUpload.
See: http://www.jfileupload.com/products/jfileupload/index.html
[Disclosure: This is my site]
It supports regular FTP, FTPS (explicit and implicit) and SFTP (FTP + SSH). It can resume broken transfer too.
Applets can be moved outside browser since JRE 1.6.0_10.
Our current project makes heavy use of drag+drop, using GWT and gwt-dnd you can do some very cool stuff. Standards based, and works in IE6, Safari, Firefox, Opera, etc..
The issue of how to transmit a file is a separate one I believe.
As for FTP support, I see that as being mostly replaced with HTTP File Upload support.
In the case you need more flexibility (progress bar, multiple file selection), then you can make use of flash to do this. You can use Javascript to interact with an invisible flash app which performs the file transfer. YUI's file upload control does this. You can see an example on Flickr's enhanced upload page.
We've built a custom version designed for use with GWT apps. Same concept.

Resources