Skip to main content

dojo.require("dojo.widget.*") interferes with dojo inlineedit on JSF page

2 replies [Last post]
albertbraun
Offline
Joined: 2006-12-03
Points: 0

Hi

I've noticed a problem on pages that contain both a

dojo.require("dojo.widget.*")

and a

<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>

dojo.require("dojo.widget.*");

Tests of jMaki widgets

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gmurray71
Offline
Joined: 2003-07-31
Points: 0

yes this would be a problem.

jMaki will write out the dojo.js tag and it programatically creates each widget. Including dojo.js will also create the widgets. If you remove the dojo.js include from the top of the page the duplication should be prevented.

If you want to use other dojo widgets in the page outside of the scope of jMaki you will need to turn the widget parsing off to prevent duplication. The following code will need to be placed before the dojo.js declaration. It turns off the automatic page parsing and widget creation of dojo.

if (typeof djConfig == 'undefined') djConfig = { parseWidgets: false, searchIds: [] };

If you choose to use widgets outside of jMaki you will need to programatically create the dojo widgets. It's recommended to use jmaki in the page for all widgets.

albertbraun
Offline
Joined: 2006-12-03
Points: 0

Greg,

Thanks for that solution. Works fine for me.

- Albert