You have to include dojo first before calling any of its functions.  Like
the current @Shell component does.

You can also delegate this work to the AjaxShellDelegate (as the @Shell
component does), but you'll still need to provide it with path information
to include the js correctly.

See:

http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/html/Shell.jwc?view=markup
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/AjaxShellDelegate.java?view=markup

OR

You can just use the @ScriptIncludes component which does the same exact
thing without writing out any of the html head stuff:

http://tapestry.apache.org/tapestry4.1/components/general/scriptincludes.html

On 7/19/07, Ken nashua <[EMAIL PROTECTED]> wrote:

I am unable to operate DOJO within my custom head component.

<!-- Application: trails -->
<!-- Page: Home -->
<!-- Generated: Thu Jul 19 18:28:58 EDT 2007 -->
<html doctype="" renderContentType="false">
<head>
<meta name="generator" content="Tapestry Application Framework, version
4.1.2" />
<title>Best WEB Application on the planet!</title>
<link rel="stylesheet" type="text/css" title="don't select"
href="/styles/tapestryskin/theme.css" />

<script type="text/javascript">
        dojo.require('dojo.widget.*');

Tha above markup is generated by my own CustomHead.JAVA

IE fails on the last line dojo.require('dojo.widget.*'); with messagebox
"dojo undefined"

Can this be fixed? Is there a workaround?

I just built ognl-2.7.1-SNAPSHOT and tapestry-4.2.1-SNAPSHOT and ran with
those...

?

Help is much appreciated.

Best regards
Ken in nashua

_________________________________________________________________

http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_2G_0507


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Reply via email to