Domino 8.5.2 mobile controls - dojo

I have installed domino designer 8.5.2 with extension library and dojo 1.4.3.
I have written coding in source of the Xpage is given by,
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core"
xmlns:xe="http://www.ibm.com/xsp/coreex">
<xe:mApp id="mApp1" selectedPageId="home">
<xe:mPage id="home" loaded="true" preload="true"
resetContent="false">
<xe:djxmHeading id="djxmHeading1" label="Testing">
</xe:djxmHeading>
</xe:mPage>
</xe:mApp>
</xp:view>
when previewing in the browser, it showing error as,
**"NetworkError: 404 Not Found -"
TabBar.js
failed loading /xsp/.ibmxspres/.extlib/dijit/Mobile.js with error: Error: Could not load 'dojox.mobile.TabBar'; last tried '../dojox/mobile/TabBar.js'
...x=d._toPixelValue;var astr="DXImageTransform.Microsoft.Alpha";var af=function(n,...**
what could be the reason, i have installed dojo in server also...please help me.
Thanks in advance

Dojo 1.4.3 doesn't support mobile controls. These were introduced in Dojo 1.5.1. So if you want to use the mobile controls, you will need to use the mobile controls project on OpenNTF.
Inside is some infrastructure who will detect the server version of Dojo. If it is below 1.5.1 it will use it's version, who is inside the database.
Latest version can be found here, http://mobilecontrols.openntf.org/
It is not well maintained lately.

Related

Dojo AMD and portlet-client-model

I'm using Dojo 1.9.1 AMD with WebSphere 8 portlets and can't figure out how to continue to leverage the WebSphere mechanism for getting/setting user's portlet preferences. Prior to moving from pre-AMD Dojo (1.6) to Dojo 1.9.1 AMD, I was including at the top of some JSP files these lines:
<%# taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portlet-client-model"
prefix="portlet-client-model" %> <portlet:defineObjects/>
<portlet-client-model:init>
<portlet-client-model:require module="ibm.portal.xml.*"/>
<portlet-client-model:require module="ibm.portal.portlet.*"/>
</portlet-client-model:init>
which get converted/generated into these lines at run-time:
<script> if(typeof dojo=='undefined') {
document.writeln("<scr"+"ipt src='/wps/portal_dojo/v1.4.3/dojo/dojo.js' ></scr"+"ipt>");
} </script>
<script>dojo.require('ibm.portal.xml.xpath'); dojo.require('ibm.portal.xml.xslt');</script>
<script>dojo.require('ibm.portal.portlet.portlet');</script>
<script>if(typeof(ibmPortalConfig) == "undefined") {ibmPortalConfig = {contentHandlerURI: "/wps/mycontenthandler/urs/!ut/p/digest!q8eCn6qc7fl2VjdmXXlayA/nm/oid:wps.portal.root"};} else if(!ibmPortalConfig["contentHandlerURI"]) {ibmPortalConfig["contentHandlerURI"] = "/wps/mycontenthandler/urs/!ut/p/digest!q8eCn6qc7fl2VjdmXXlayA/nm/oid:wps.portal.root";} </script><div id='com.ibm.wps.web2.portlet.root.Z7_HHGGGIO0JGPN00AI72U5E530O2' style='display: none;'>/wps/mycontenthandler/urs/!ut/p/digest!q8eCn6qc7fl2VjdmXXlayA/pm/oid:--portletwindowid--#oid:Z6_HHGGGIO0JGPN00AI72U5E530G4</div>
<div id='com.ibm.wps.web2.portlet.preferences.Z7_HHGGGIO0JGPN00AI72U5E530O2' style='display: none;' pageid='Z6_HHGGGIO0JGPN00AI72U5E530G4' configid='Z3_HHGGGIO0JGPN00AI72U5E53085' editdefaultsid='Z5_HHGGGIO0JGPN00AI72U5E530O6'
></div>
<div id='com.ibm.wps.web2.portlet.user.Z7_HHGGGIO0JGPN00AI72U5E530O2' style='display: none;'>/wps/mycontenthandler/urs/!ut/p/digest!q8eCn6qc7fl2VjdmXXlayA/um/secure/currentuser/profile?expandRefs=true</div>
which then allowed me to use javascript for getting and setting user portlet preferences. When I try using this same technique with Dojo 1.9.1 AMD, the same code that is generated above causes a javascript error complaining that the "dojo.require" is not a function.
With the improved Dojo AMD, I no longer have any calls to "dojo.require" like I used to, so I haven't encountered this issue, but these WebSphere custom tags automatically generate "dojo.require" calls that are now failing.
Do I need to try to mix the old pre-AMD inclusion of dojo.js with the preferred AMD inclusion calls? Has anyone encountered this issue yet?
Any help is appreciated. Thanks.
Your main problem is that you're using an old taglib. If I look at the URL I see that you're using a v6.1 taglib, which uses Dojo 1.4.3 and that is obviously outdated. Try to replace the taglib with:
<%# taglib
uri="http://www.ibm.com/xmlns/prod/websphere/portal/v8.0/portlet-client-model"
prefix="portlet-client-model" %>
I suppose that should generate some more appropriate code, compatible with the latest releases. You will probably have to update some libraries on your classpath as well.
Also, if you're using WebSphere Portal 8, then only Dojo 1.7 is supported officially, so make sure you're not using different versions here. WebSphere Portal 8.5 supports Dojo 1.9 (uses 1.9.3 to be exactly), but from your question it was not clear if you're using v8 or v8.5.
If you want to change the Dojo configuration and set async: false, that's possible, but you will have to set it before dojo.js is loaded. That means you will have to edit theme.html and the localized themes (for example theme_en.html) to add the following content above the co:head dynamic content spot:
<script type="text/javascript">
dojoConfig = {
async: false
};
</script>
<link rel="dynamic-content" href="co:head">
Be careful though, if you set it, you might break something, I don't know if IBM has their own configuration that includes custom packages or not, but if they do and you're overriding that configuration, then it might lead to errors.

__adobe_cep__.showDevTools() doesn't work since 14.2 update

On Photoshop CC 14.0 this code:
__adobe_cep__.showDevTools();
was showing Chrome Debug console.
On Photoshop CC 14.2, it does not work - nothing happens, no errors reported, console does not show.
What might be the issue?
Even though this is a really old question, I want to answer it. I'm new to PS extension development and this question is still the second hit on google.
This debugging mechanism is deprecated now (see this adobe CC article). The "official" debugging is now remote debugging.
You need to enable it by setting the PlayerDebugMode in your photoshop preferences to string "1".
Then you place a textfile called .debug in your extensions root directory. In this file you put XML to specify your debugging TCP port:
<?xml version="1.0" encoding="UTF-8"?>
<ExtensionList>
<Extension Id="com.example.photoshopextension">
<HostList>
<Host Name="PHXS" Port="8088"/>
</HostList>
</Extension>
</ExtensionList>
Then you can access the tools by opening http://localhost:8088.

dojo.js in my IBM Domino xPages app causes certain JS libraries not working

dojo.js in my xPages app causes certain JS libraries not working on page ... we use JQuery which is working fine with dojo but e.g. jquery.cookie.js (https://github.com/carhartl/jquery-cookie) doesnt work when dojo.js is available. The same here for URI.js library (http://medialize.github.io/URI.js/) ... its not working when dojo.js is beeing on page. To debug I have created a simple page(not xpage becase xpage includes dojo) and when dojo.js is available these libraries are not working. Removing dojo lib cause these libs working as expected.
environment: Domino 9 server means Dojo Toolkit 1.8.1
Any idea / experience with this?
I have no experience with other jQuery libraries, only with jQuery Mobile and Dojo 1.8, but maybe the problem is the same and is caused by Dojo's AMD loader. Try to load the jQuery stuff before any Dojo libraries. That solved my problems.
See here for more details: http://hasselba.ch/blog/?p=1216
See https://www.ibm.com/developerworks/community/blogs/94e7fded-7162-445e-8ceb-97a2140866a9/entry/loading_jquery_with_dojo_1_7_amd_loader2?lang=en for tips on using both jQuery and Dojo
For xPages:
Add to XSP properties:
xsp.client.script.dojo.djConfig=async:true
Create a script library with following content:
define.amd.jQuery = true;
and add it to your xPage as resource.
Below is the xPage code:
<xp:this.properties>
<xp:parameter name="xsp.client.script.dojo.djConfig" value="packages: exPackages" />
</xp:this.properties>
<xp:this.beforePageLoad>
<![CDATA[#{javascript:
var exCon = facesContext.getExternalContext();
var response = exCon.getResponse();
var writer = response.getWriter();
writer.write("<script>\n");
writer.write("var exPackages=[{name:'jquery',location:'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1',main:'jquery'}]\n");
writer.write("</script>\n");
}]]>
</xp:this.beforePageLoad>
<xp:this.resources>
<xp:script src="/jquery.js" clientSide="true"></xp:script>
<xp:dojoModule name="jquery"></xp:dojoModule>
</xp:this.resources><p id="test">Egor Margineanu</p>
<xp:button value="Label" id="button1">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script><![CDATA[alert($("#test").text());]]></xp:this.script>
</xp:eventHandler></xp:button>

Update To JRE7, can not load nativelib jar, but JRE6 works fine

For my JNLP file , there is some nativelib info like below:
<resources os="Windows">
<nativelib href="lib/x264-win.jar" />
</resources>
<resources os="SunOS" arch="sparc">
<nativelib href="lib/x264-SunOS-sparc.jar" />
</resources>
<resources os="SunOS" arch="x86">
<nativelib href="lib/x264-SunOS-x86.jar" />
</resources>
When I Update To JRE7, can not load nativelib jar, but JRE6 works fine.
The load nativelib code like below:
String source = "x264.jar";
ClassLoader cl = Thread.currentThread().getContextClassLoader();
URL url= cl.getResource(source);
"x264.jar" is one jar in x264-win.jar,lib/x264-SunOS-sparc.jar or lib/x264-SunOS-x86.jar.
When I used JRE6 to load x264.jar, it worked fine.
But when I updated to JRE7, it can not load x264.jar.
When use JRE6, url would be"x264.jar" info, like jar:http://test.local:8080/JNLP.jar!/x264.jar,
but use JRE7, url would be null, and I found code not load nativelib "x264.jar"
Does any one have find JRE7 can not load nativelib.jar?
Is the problem of using Thread.currentThread().getContextClassLoader() to load "x264.jar"?
Ensure that you have the correct bitwise native binary to match your JRE. If you are testing on a 64-bit JRE, you need a 64-bit native binary. If you're testing on a 32-bit JRE, you need a 32-bit native binary. You might need to include resources for each of these three:
<resources os="Windows" arch="amd64">
<resources os="Windows" arch="x86_64">
<resources os="Windows" arch="x86">
I had similar trouble ; however even in JRE 6 this didn't get this to work.
Found a bug that could be related to that :
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6758884
Apparently JRE can have trouble downloading nativelib resources.
The bug is still opened, and targeted towards version 8 of java ...
The following "dll relying" applet is working fine (besides the security problems when using 1.7.0_51 (you need to decrease the security settings to medium since it is self signed)).
So if the native lib loading mechanism of the jnlp file is broken then you can distribute your .dll files alongside a normal jar file like in the upper example.
Put the dlls/sos in your jar file like in the example: jssc.jar
Load the libraries with System.load(libFolderPath + fileSeparator + libName); like used here.
As mentioned by Joseph please note the fine grained version differentiation between win, solaris, linux, arm and i86 and amd64 bit systems. So if you e.g. don't supply a 64Bit dll and run it with 64Bit Java it won't work...
I had forgot I solved this a while ago. I found that I had to handle this in Java code with System.loadLibrary( "jarNameNoExtension" );
Hopefully that helps others.

Error loading javascript after installing Umbraco 4.7.1

I'm working on an umbraco 4.7.0 project and I have upgrated from 4.7.0 to 4.7.1
It's worked like a charm in my localhost but I have a problem after installing it on the staging server :
When I connect to the backend, I have the javascript error : "Jquery(xx).mask(...) : function does not exist" and any key press execute the umbraco Save function.
The jquery mask plugin is used in umbraco 4.7.1 to add a date mask to the publish date in the property tab.
The Jquery mask plugin is new in Umbraco 4.7.1 and is being included by "DateTimePicker.cs" with [ClientDependency(ClientDependencyType.Javascript, "MaskedInput/jquery.maskedinput-1.3.min.js", "UmbracoClient")]
See : https://hg01.codeplex.com/umbraco/rev/d2304aa897d4
However, even if I delete on the Staging server the bin,umbraco and umbraco-client folders and replace them with the ones from my local computer (where it works) the bug is still here.
But if I change
< compilation defaultLanguage="c#" debug="false" batch="false" targetFramework="4.0">
to
< compilation defaultLanguage="c#" debug="true" batch="false"targetFramework="4.0">
in the web.config THEN it works...
Does someone understand what happened ? How can I make it works with compilation debug=true ??
Thank you very much
Fabrice
As nobody answered this question, I asked on the umbraco forum here :
http://our.umbraco.org/forum/getting-started/installing-umbraco/25196-Error-loading-javascript-after-installing-Umbraco-471
The answer is :
"it's the outdated client dependency cache to blame (when you set debug="true" in your web.config this cache is turned off by design). Try simply to clean the contents of the client dependency cache folder (by default it's App_Data/TEMP/ClientDependency)."