myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Werner Punz <>
Subject Re: [Trinidad] Use Dojo with Trinidad
Date Thu, 22 Apr 2010 13:23:37 GMT
Have you set your body styleClass to Tundra?

Classical problem if you apply dojo, that you forget
to add the style class to the body element.

Dijit usually works works over constructs like that stylewise

body.tundra ... .widgetType .subElement

Also highly recommendable if you have a load of controls on your page
do not use the dijit parsing system use the manual startup of the 
controls and push it into dojo.addOnLoad
example dojo.addOnLoad(function () {
	mydateWidget = new dijit.form.DateTextBox("myId", {<attributes>});	

Have in mind you can mix Dojo and Trinidad, I did that successfully in 
the past, but Dojo is highly sensitive on how and when you initialized 
its elements and also certain mixing combinations do not like each 
other, like the dialog and html editor.

Also there are some issues like if you want to use a dojo button with 
jsf, then you should combine it in JSF 2 with a component have the 
submit properly issued (or provide a simulation of what the standard 
buttons submit)

And at least back then you could not use a certain combination of widgets.
Also have a look at dojo faces

I have put my own dojo jsf components project on hold of it.
(among private reasons like having become a father and hence not being 
able to support a huge complib project in my sparetime)

That is mostly what you encounter if you use dojo with jsf.


Am 22.04.10 13:41, schrieb schneidc:
> Pretty old thread, though seems to be the best place for my question.
> I've been playing around with Dojo and Trinidad, I tried Daniels sample page
> but for reasons I don't understand (yet) it doesn't work. The html-elements
> are there but nevertheless the page appears blank.
> But I got another example working:
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>    "">
> <tr:document xmlns:ui=""
> 	xmlns:h=""
> 	xmlns:f=""
> 	xmlns:tr=""
> 	title="Dojo Integration to Trinidad">
> 	<f:facet name="metaContainer">
> 		<script type="text/javascript" djConfig="parseOnLoad: true"
> src="#{facesContext.externalContext.requestContextPath}/dojo-release-1.4.2/dojo/dojo.js.uncompressed.js"
> />
> 		<script>
>         		dojo.require("dijit.form.DateTextBox");
> 		</script>
> 		<link rel="stylesheet" type="text/css"
> href="#{facesContext.externalContext.requestContextPath}/dojo-release-1.4.2/dijit/themes/tundra/tundra.css"
> />
> 	</f:facet>
> 	<h:form>
> 		<input dojoType="dijit.form.DateTextBox" />
> 	</h:form>
> </tr:document>
> What I can't understand is that the tundra.css styles are being ignored, at
> least partially. The input field for the date is decorated correctly but the
> calendar itself looks pretty ugly.
> Anybody an idea, why's that?
> Thanks
> Simon

View raw message