cancel
Showing results for 
Search instead for 
Did you mean: 

Share inside AIR, some problems

stevereiner
Champ in-the-making
Champ in-the-making
Running Share URLs inside AIR has some problems.

1. Currently when you save an edit to a blog, wiki, etc. in the Share tab you get "Page Update Failed".
This doesn't happen when you run Share normally outside of AIR, in a browser.

Changing the share code to do posts instead of puts from these FORMs seemed to work around this problem.
Puts in other areas work.

for example:
a.  adding copies of the repository\blogs\post\blog-post.put.* webscript files with blog-bost.post.* names
and 
b. calling this.widgets.postForm.setAjaxSubmitMethod(Alfresco.util.Ajax.PUT); in share\components\blog\postedit.js
with this.widgets.postForm.setAjaxSubmitMethod(Alfresco.util.Ajax.POST);

Also setAjaxSubmitMethod is called 5 other places, which mostly likely would need this same AIR workaround.

I just created a JIRA about this ALFCOM-1904  https://issues.alfresco.com/jira/browse/ALFCOM-1904

Notes:
1. Although I was doing this with from within flex (see experimental flexspaces+air+share just added to flexspaces) with
the mx.controls.HTML, I suspect there would be the same problem with an ajax/javascript AIR application using HTMLLoader.

2. This is just running share urls, not with the Share files in the AIR app

Steve Reiner
7 REPLIES 7

mikeh
Star Contributor
Star Contributor
Are you trying this on Windows by any chance?

Looks related to this known issue with AIR 1.1
http://kb.adobe.com/selfservice/viewContent.do?externalId=kb403978&sliceId=1#F1

Mike

stevereiner
Champ in-the-making
Champ in-the-making
Mike,

client side:
    Client was on windows (vista) with AIR 1.1

    Just tried it on Mac OS 10.5.4 with AIR 1.1  and it has same problem (tried save of wiki edit, update and publish internally blog post)

server side:
    alfresco labs 3a.1104 server on vista for both

Thanks,
Steve

mikeh
Star Contributor
Star Contributor
Annoying - looks like AIR is blocking some standard REST HTTP methods then (probably everything other than GET and POST).

If there's a reliable way of discovering at runtime when in an AIR environment, we could use POST with ?alf_method={put|delete} instead of the native methods.

Thanks,
Mike

stevereiner
Champ in-the-making
Champ in-the-making
Mike,

Noticed that YUI has detection of AIR

    YAHOO.env.ua.air

Steve

mikeh
Star Contributor
Star Contributor
Hi Steve

Patch attached to ALFCOM-1904 (as public SVN is currently under maintenance). Note: Please use patch v2.txt rather than the first one.

Thanks,
Mike

stevereiner
Champ in-the-making
Champ in-the-making
Mike,

Thanks!

Steve

stevereiner
Champ in-the-making
Champ in-the-making
Mike,

With alfresco Labs 3.0  3b build 1164 from Sept 10 2008

Needed to change <install dir>/tomcat/webapps/share/js/alfresco.js
    if (YAHOO.env.ua.air > 0)
to:
    if (YAHOO.env.ua.air != 0)

to get the tunneling to kick in when running share in air  (test with air 1.1 on windows vista and mac osx clients)
and to be able to save share wiki and blog edits

in firefox 3.01, YAHOO.env.ua.air   was 0
in AIR 1.1, YAHOO.env.ua.air  was "Adobe AIR/1.0"
    (not the float 1.0 mentioned in http://developer.yahoo.com/yui/docs/YAHOO.env.ua.html )

Used share tab in 0.6 flexspaces+air+share http://forge.alfresco.com/frs/download.php/478/flexspaces-air-share-experimental.zip
(this requires the 0.6 flexspaces webscripts installed http://forge.alfresco.com/frs/download.php/463/webscripts-only.zip
to login and get to share tab, however the share tab is "pure share", just runs the http://localhost:8080/share/ url  in a AIR HTMLLoader)

Steve