This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



May 25, 2011, 11:21 PM
6 Posts

Incorrect JavaScript and Java filepath references in XPages!

  • Category: Debugging
  • Platform: All
  • Release: 8.5.2
  • Role: Administrator
  • Tags: Incorrect JavaScript and Java filepath references in XPages!
  • Replies: 3
In my installation of XPages, when a page is rendered in the browser, the HTML referencing the paths to JavaScript and Java are INCORRECT. They are using "domjs" instead of "js", and "domjava" instead of "java". Hence, these resources are not resolved! See 2 examples below...
 
javascript---
 <script src="/domjs/dojo-1.4.3/ibm/xsp/widget/layout/xspClientDojo.js" type="text/javascript">
<link href="/domjs/dojo-1.4.3/dijit/themes/tundra/tundra.css" type="text/css" rel="stylesheet">
 
 and java as well---
 <link href="/domjava/xsp/theme/oneui/core.css" type="text/css" rel="stylesheet">
<link href="/domjava/xsp/theme/oneui/coreLTR.css" type="text/css" rel="stylesheet">
 
These should be "js" and "java" (which are the correct installation directories) without the "dom" prefix! Where is this configuration coming from, and how do we correct it? Thanks.
May 26, 2011, 8:25 PM
64 Posts
This is "working as designed"...
- This are automagic path references that XPages use.  If your system can't resolve them the problem is in your configuration.  I have these exact sorts of paths on every XPage I've ever written and they all work fine.
- Is it change from all prior verisions?  Sure is!  Is it a PITA?  Sure is!  But it appears to be how XPages are implemented, for worse or for worse.

Hope this helps...
May 28, 2011, 8:18 PM
6 Posts
Re: This is "working as designed"...
Thank you very for replying, David! Yes, you are correct. I have since learned this myself. It is a setting in the Website configuration document. It defines the real path to js and java, along with their corresonding url paths, or "aliases". Why it is done this way I am not sure. Ok, I can live with that. But what do I do about Dojo components that have a red "X" in designer because the component cannot be resolved (until run time, anyway)?
 
Thanks!
Jun 3, 2011, 6:58 PM
64 Posts
I don't see any red "X" using dojo...
- If you are using 8.5.1, the vast majority of <xp:...tag> tags don't support dojoType for some reason.  This is fixed later, though I don't know when, because I'm on 8.5.1 myself.  Three ways around that:
 
1. Don't use <xp:...tag>
- For instance, instead of using <xp:panel>, use <div> on your page so you may include dojoType without the automagic bollixing everything.  If you don't strictly need a <xp:..tag> then it's also less work for the server to use a plain HTML tag, you just don't get the hand-holding Design tab.  Instead you use the infinitely more capable and powerful Source tab.
 
2. Use programmatic dojo
- Don't use dojoType, put in script blocks that instantiate the dojo widgets using CSJS directly.  This is a little more work but it may be applied even to <xp:...tag> tags, since by the time the programmatic instantiation runs, the <xp:...tag> has been converted to something normal, like <xp:panel> becoming <div>.  Then dojo can play nicely with it.  I do this when I need to bind to a data source and use dojo at the same time.

3. Upgrade to whatever Domino/DDE version properly supports dojoType on all its tags.
- I'll be glad when we get to this particular solution.  Using dojoType is just a lot simpler for most of what I do with dojo.

Hope this helps...

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal