Submitted by Fergal Mckenna on Mar 5, 2012 9:47:41 AM

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.

Submitted by Christian Buchacher on Mar 5, 2012 5:57:12 AM

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

Submitted by Fergal A McKenna on Feb 5, 2012 6:09:17 PM

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...

Submitted by Peter Roest on Feb 1, 2012 7:30:40 AM

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

Submitted by Mark Gesick on Jun 7, 2011 7:44:18 PM

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";

Submitted by Alain Ayrom on Apr 6, 2011 3:55:18 AM

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

Submitted by Eric Radloff on Apr 4, 2011 1:15:22 PM

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

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

Submitted by Cathal Comerford on Apr 4, 2011 6:11:49 AM

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");

Submitted by Eric Radloff on Apr 1, 2011 11:39:11 AM

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?

Submitted by James A Riel on Apr 1, 2011 11:20:24 AM

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

Submitted by Eric Radloff on Mar 31, 2011 4:17:57 PM

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?

Submitted by Cathal Comerford on Mar 31, 2011 11:57:08 AM

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.

Submitted by Alain Ayrom on Mar 29, 2011 9:19:53 AM

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.

Submitted by Shu Lukito on Mar 26, 2011 12:45:57 PM

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

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

Submitted by JohanC Stenbeck on Mar 9, 2011 9:57:08 AM

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.

Submitted by JohanC Stenbeck on Mar 2, 2011 3:47:23 AM

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!

Submitted by Cathal Comerford on Mar 1, 2011 4:37:34 AM

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.

Submitted by Alain Ayrom on Feb 28, 2011 9:23:51 AM

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

Submitted by Alain Ayrom on Feb 28, 2011 9:22:56 AM

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

Submitted by Robert Farstad on Feb 21, 2011 5:22:18 PM

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).

Submitted by Ermanno Pirotta on Nov 11, 2010 4:47:56 AM

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

Submitted by Marius Meyer on Oct 29, 2010 8:52:32 AM

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!!!