Skip to main content

Cannot use the same dojo/dijit widget more than once in the same page

1 reply [Last post]
rick_m
Offline
Joined: 2008-08-19
Points: 0

Hi everyone!

I am running a simple test on Resin-3.0.14, having 2 buttons and a modal dialog in a JSP page, and I always got this error when I load the page:

500 Servlet Exception
java.lang.NullPointerException
at jmaki.runtime.ResourceManager.getWidgetDir(ResourceManager.java:114)
at jmaki.runtime.WidgetCommonRenderer.init(WidgetCommonRenderer.java:67)
at jmaki.runtime.jsp.WidgetTag.doEndTag(WidgetTag.java:128)
at _jsp._jmaki._demo._jmakimodaldialogtest__jsp._jspService(jmaki/demo/jmakiModalDialogTest.jsp:26)
at com.caucho.jsp.JavaPage.service(JavaPage.java:60)
at com.caucho.jsp.Page.pageservice(Page.java:570)
at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:159)
[...]
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:259)
at com.caucho.server.port.TcpConnection.run(TcpConnection.java:363)
at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:490)
at com.caucho.util.ThreadPool.run(ThreadPool.java:423)
at java.lang.Thread.run(Thread.java:595)

Below is the JSP code of my page:

<%@ taglib prefix="a" uri="http://jmaki/v1.0/jsp" %>

My jmakiTest with Dialog

This is a jMaki test

When I leave just one button and the dialog widgets, everything is fine.

I found the same situation when using 2 comboboxes, or pretty much 2 widgets of the same type in the same page, and it is not only limited to dojo widgets; yahoo widgets, too. Also, I found this issue with both jmaki-java-1.0.3 and jmaki-java-1.8.0-beta.

We use MyEclipse Enterprise Workbench Version: 6.0.1 GA. A colleague ran the same test on NetBeans with Tomcat and the page rendered fine, showing both buttons.

I wonder if anyone encountered a similar issue and whether there is a fix/workaround other than switching the application on Tomcat.

Many thanks,
rick_m

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
sloanb
Offline
Joined: 2003-09-14
Points: 0

I will give this a test and let you know what I find.