James W. Stuart commented on May 30, 2012

Re: Adding a java applet for uploading files to a place

Here is a fix from Fergal for the issue where enabling CSRF protection breaks the Java upload applet: Add "Thingio" to the list of exceptions in QPCONFIG.XML (square brackets used as the comments text messes up otherwise):

[security]

      [xsrf_service_protection enabled="true"]

           [restricted_service_protection enabled="false"]Jakarta

Commons-HttpClient,IBM-Connectors,Thingio[/restricted_service_protection]

      [/xsrf_service_protection]

[/security]

James W. Stuart commented on May 29, 2012

Re: Adding a java applet for uploading files to a place

FYI: If you enable the Cross Site Request Forgery (CSRF) protection in Fix Pack 28 for QuickrD 8.5.1:

http://www-10.lotus.com/ldd/lqwiki.nsf/dx/How_to_enable_CSRF_protection

. . . this will break the Java upload applet - It will always return "Bad Request" when you try to upload files with it :-(

Hoping someone in IBM might be able to look into this, even though the applet is not supported?

Fergal Mckenna commented on Mar 5, 2012

Re: Adding a java applet for uploading files to a place

Hi Christian,

The Uploader will appear depending on what condition you set in the widget registry extension file.

If you wanted to add it to the Index (This would not be best practice as you are not putting the files into a recognised folder) then you can use..

{ type: 'view',

condition: '(object.entry.fields.h_FolderStyle=="h_Index" )',

use: 'qext.fileUploaderJava.appletLibrary'

}

If you want to add it to a spcific folder then you could use

{

type: 'view',

condition: '(object.entry.fields.h_Name=="Name of your folder" )',

use: 'qext.fileUploaderJava.appletLibrary'

},

Play around with the conditions to find one that best suits your needs..

Regards, Fergal.

Christian Buchacher commented on Mar 5, 2012

Re: Adding a java applet for uploading files to a place

Hello,

this worked fine for me - thank you very much for your instructions!

What has to be changed if I want the upload control to appear in all folders - or at least in the index of a room/subroom?

Thx in advance for any reply,

Christian

Fergal A McKenna commented on Feb 5, 2012

Re: Adding a java applet for uploading files to a place

@Peter, will you please contact me on fmckenna@ie.ibm.com and I'll look into why the files don't work for you...

Peter Roest commented on Feb 1, 2012

Re: Adding a java applet for uploading files to a place

Could someone upload a set of files which work?

I do not seem to get it working.

Regards,

Peter

Mark Gesick commented on Jun 7, 2011

Re: Adding a java applet for uploading files to a place

Can you please leave a sample? Do I just = "1_6" for 1.6 what about the other line of code ? Backward compatable?

var javaPluginMajorVersion_UnderscoreFormat = "1_5";

Alain Ayrom commented on Apr 6, 2011

Re: Adding a java applet for uploading files to a place

Hi all,

Also be aware of the following line;

var javaPluginMajorVersion_UnderscoreFormat = "1_5";

If the JRE is updated to 1.6x, the applet would not work anymore.

You should change the major version number in the code.

Regards

Eric Radloff commented on Apr 4, 2011

Re: Adding a java applet for uploading files to a place

BANZAI!! That fixed it! Thanks very much :).

Cathal Comerford commented on Apr 4, 2011

Re: Adding a java applet for uploading files to a place

Hi Eric,

That method returns where in the folder structure the ordinary view widgets are. Try changing the line in getWidgetLocation to:

return("/qphtml/widgets/view");

Eric Radloff commented on Apr 1, 2011

Re: Adding a java applet for uploading files to a place

Correct... I already saw there's an extra "/" sneaking after "view" in somewhere in the code... it seems to have something to do with the URL returned in this portion of the code:

getWidgetLocation:function(){

return(dojo.moduleUrl("quickr.widgets.view"));

},

...my current theory is that an extra / is getting appended to the end of the URL that this function returns. Problem is, if I try to convert to string and add a substring stmt to look for and trim off the "/", it breaks the script (unknown error). I also tried to insert an alert to look at what the function returns and that broke the script as well (permission denied). I don't have enough detail about the object returned by this function to know how to properly modify the URL it outputs. Any ideas, IBM?

James A Riel commented on Apr 1, 2011

Re: Adding a java applet for uploading files to a place

I see an extra slash between view and default: /qphtml/widgets/view/ /defaultFolder_header.xsl

Eric Radloff commented on Mar 31, 2011

Re: Adding a java applet for uploading files to a place

I'm trying this out on Quickr 8.5 for Domino, with SiteMinder... I got the Java applet to appear, but the Library folder won't load. The page loads the header, the TOC, the upload applet, and then just sits there with "Loading..." at the top and never finishes. I looked at the script console in IE8, and I see this:

Error: Unable to load /qphtml/widgets/view//defaultFolder_header.xsl status:500

...so at initial glance it looks like there's an extra "/" sneaking in somewhere... but where? Thoughts anyone?

Cathal Comerford commented on Mar 31, 2011

Re: Adding a java applet for uploading files to a place

I have updated the Wiki with the newest fix. All the changes are in the uploadAppletLoader.js file.

Alain Ayrom commented on Mar 29, 2011

Re: Adding a java applet for uploading files to a place

The exceptions thrown for the applet come probably because there are spaces in the name of the place.

Fergal Mckenna has made a correction to prevent this:

this.placename=window.q_GeneralUtils.getPlaceName()

This correction works fine for me.

Thanks again to Fergal.

Shu Lukito commented on Mar 26, 2011

Re: Adding a java applet for uploading files to a place

I'm also getting "Error - Bad Request" - please advise.

JohanC Stenbeck commented on Mar 9, 2011

Re: Adding a java applet for uploading files to a place

Please help very talented IBM staff :) Still get the "Error. Bad request" when dropping something in the applet.

JohanC Stenbeck commented on Mar 2, 2011

Re: Adding a java applet for uploading files to a place

I get a Error. Bad request when dropping something in the applet... please advise!

Cathal Comerford commented on Mar 1, 2011

Re: Adding a java applet for uploading files to a place

I discussed Alain's query further and we discovered that the applet can be made to work by changing the variable javaPluginMajorVersion_UnderscoreFormat to your current Java version. As of now there does not appear to be a more permanent fix for this.

Robert: I don't see any reason why that wouldn't be possible. Both the photo slideshow and java applet overload the "view" though, so you could not load the two of them separately - you would have to combine the two into a single widget. Please let me know if you need any further help.

Alain Ayrom commented on Feb 28, 2011

Re: Adding a java applet for uploading files to a place

Hi,

It works fine until you have a java version 1.5.

As soon as you upgrade it, the applet won't work anymore.

Any workarounds?

Thx

Alain Ayrom commented on Feb 28, 2011

Re: Adding a java applet for uploading files to a place

Hi,

It works great, but it would stop working if the java version of the client changes. Any workarounds on that?

Thx

Robert Farstad commented on Feb 21, 2011

Re: Adding a java applet for uploading files to a place

Is it possible to have both the javafileuploader and the "inline attachment viewer" and the "display photo views" all at the same time?

(http://www-10.lotus.com/ldd/lqwiki.nsf/dx/Inline_Attachments_Displaying_PDFs_images_and_Flash_files_directly_within_Quickr)

I can't get them to work together.

Basically, what I'm trying to do is create an image archive where I can batch-upload images. (Using the connector is not an option).

Ermanno Pirotta commented on Nov 11, 2010

Adding a java applet for uploading files to a place

Thank you for your comment. The wiki article has been updated and now contains all the information required for implementing the customization.

Best regards,

Ermanno Pirotta

Marius Meyer commented on Oct 29, 2010

Adding a java applet for uploading files to a place

The example does not work!

1. If you try to embed the applet you have to use the folder /qphtml/skins/qext or you have to change the code: var applet = new qext.fileUploaderJava.uploadAppletLoader

2. After adding the widget to your registry you get an error: this._getLptaTokenFromCookie() is not a function. BAD! This function does not exist. Also _getLtpaTokenFromCookie() is missing. And what to hell is LptaToken??? I tried to use an alternative function to get the LtpaToken: q_CookieUtils.getCookie('LtpaToken'). It seems to work.

3. I believe there are more error in the code! In the loader, there's a line "qp-lptatoken": this._getLptaTokenFromCookie(). I added a new line of declaration: "qp-ltpatoken": q_CookieUtils.getCookie('LtpaToken'). Think that's the parameter the applet expects.

Now the applet shows up in my library, but by dropping a file I get the error "Bad Request". The Java console shows this error: Exception in thread "AWT-EventQueue-2" netscape.javascript.JSException: No such method "refresh" on JavaScript object

at sun.plugin2.main.client.MessagePassingJSObject.newJSException(Unknown Source)

at sun.plugin2.main.client.MessagePassingJSObject.waitForReply(Unknown Source)

at sun.plugin2.main.client.MessagePassingJSObject.call(Unknown Source)

at com.ibm.quickplace.dnd.applet.dndapplet.UploadPaths(dndapplet.java:475)

at com.ibm.quickplace.dnd.applet.FileTransferHandler.importData(FileTransferHandler.java:60)

at com.ibm.quickplace.dnd.applet.dndapplet.drop(dndapplet.java:1232)

at java.awt.dnd.DropTarget.drop(Unknown Source)

at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(Unknown Source)

at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(Unknown Source)

at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(Unknown Source)

at sun.awt.dnd.SunDropTargetEvent.dispatch(Unknown Source)

at java.awt.Component.dispatchEventImpl(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)

at java.awt.LightweightDispatcher.processDropTargetEvent(Unknown Source)

at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)

That's it. I give up. Please fix that soon!!!