Skip to main content

Newbi Path Problems using dojo components in jMaki

5 replies [Last post]
charglass
Offline
Joined: 2005-11-12
Points: 0

Hi,

I have just started trying out jMaki but have run into a problem. My platform is:
JBoss 4.2.0 GA, JSF, jmaki-java-0.9.3, dojo 4.1

I create a simple JSF application with a jsp page that contains the dojo clock examples:
Project stucture:
WebApp
|
|
+resources
|
|
+libs
|
|
+ dojo...
DojoClock.jsp

In DojoClock.jsp

<br />
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"<br />
    pageEncoding="ISO-8859-1"%><br />
    <%@ taglib prefix="a" uri="http://java.sun.com/jmaki" %></p>
<p>JMaki</p>
<p>Dojo Clock Test</p>
<p>

When I run the page I am getting is error output at the browser:
Unable to locate the template file for widget dojo.combobox. Please make sure the widget is available.

The in the server log I am getting the following error:

11:13:27,508 ERROR [STDERR] 18-Jun-2007 11:13:27 com.sun.jmaki.AjaxCommon getWidgetConfig
SEVERE: AjaxCommon error loading configuration: java.net.MalformedURLException: Path nullwidget.json does not start with a "/" character
11:13:27,508 ERROR [STDERR] 18-Jun-2007 11:13:27 com.sun.jmaki.AjaxCommon getResourceNameByType
INFO: AjaxCommon:getResourceByType: compBase is null.
11:13:27,508 ERROR [STDERR] 18-Jun-2007 11:13:27 com.sun.jmaki.AjaxCommon getResourceNameByType
INFO: AjaxCommon:getResourceByType: compBase is null.

Any idea where I am going wrong?

Thanks
Charlie

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
charglass
Offline
Joined: 2005-11-12
Points: 0

Sorry,

The error I am getting is:
Unable to locate the template file for widget [b]dojo.clock[/b]. Please make sure the widget is available

rather then:
Unable to locate the template file for widget [b]dojo.combobox[/b]. Please make sure the widget is available.

carlavmott
Offline
Joined: 2005-02-10
Points: 0

HI Charlie,

Looks like the tag you are using is incorrect. In release .9 we changed the tags (though I thought
we supported the old tags too). I'm not familiar with JSF but try updating the tags and see if that
helps. See my blog on changes in .9
http://weblogs.java.net/blog/carlavmott/archive/2007/04/big_changes_in.html

I know that the tutorials have not been updated as we are in the process of doing that. Please
let me know if this works.

Carla

charglass
Offline
Joined: 2005-11-12
Points: 0

Carla,

Thanks for taking a look I have changed the code to the following but get a different error:
[b]unable to locate 'component.js' in '/dojo/clock', '/resources/dojo/clock' and ClassPath 'META-INF/resources/dojo/clock' unable to locate 'component.js' in '/dojo/clock', '/resources/dojo/clock' and ClassPath 'META-INF/resources/dojo/clock'
unable to locate 'component.js' in '/dojo/clock', '/resources/dojo/clock' and ClassPath 'META-INF/resources/dojo/clock' unable to locate 'component.js' in '/dojo/clock', '/resources/dojo/clock' and ClassPath 'META-INF/resources/dojo/clock'
unable to locate 'component.js' in '/dojo/clock', '/resources/dojo/clock' and ClassPath 'META-INF/resources/dojo/clock' unable to locate 'component.js' in '/dojo/clock', '/resources/dojo/clock' and ClassPath 'META-INF/resources/dojo/clock'
unable to locate 'component.js' in '/dojo/clock', '/resources/dojo/clock' and ClassPath 'META-INF/resources/dojo/clock'[/b]

Here is the code I changed to:
[code]
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="a" uri="http://jmaki/v1.0/jsf" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>





JMaki

Dojo Clock Test





[/code]

Any other ideas?

Charlie

charglass
Offline
Joined: 2005-11-12
Points: 0

OK, my bad I need to change the resource directory. So I unzipped the jmaki-dojo-0.9.3.zip to my WebRoot dir and redeploy. And my clocks are working :)

Thanks
Charlie

carlavmott
Offline
Joined: 2005-02-10
Points: 0

Glad you got it working.

Carla