blob: dda0f5d9e033e73bee0afe0e16297bcea77ac60b [file] [log] [blame]
<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="generator" content="Adobe RoboHelp - www.adobe.com">
<title>Setting Up and Using Dojo Integration</title>
<link rel="stylesheet" href="default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">
<!--
if (navigator.appName !="Netscape")
{ document.write("<link rel='stylesheet' href='default.css'>");}
//-->
</script>
<style>
<!--
body { border-left-style:None; border-right-style:None; border-bottom-style:None; background-color:Transparent; border-top-style:None; }
-->
</style><style type="text/css">
<!--
h1.whs1 { color:#00709e; }
img_whs2 { border:none; width:400px; height:447px; float:none; border-style:none; }
table.whs3 { x-cell-content-align:top; width:100%; border-spacing:0px; }
col.whs4 { width:7.093%; }
col.whs5 { width:92.907%; }
tr.whs6 { x-cell-content-align:top; }
td.whs7 { width:7.093%; padding-right:10px; padding-left:10px; border-bottom-style:none; border-right-style:none; border-left-style:none; border-top-style:none; }
p.whs8 { font-style:italic; color:#0000ff; font-size:6pt; }
td.whs9 { width:92.907%; padding-right:10px; padding-left:10px; border-bottom-style:none; border-right-style:none; border-top-style:none; }
p.whs10 { font-weight:bold; }
td.whs11 { width:7.093%; padding-right:10px; padding-left:10px; border-left-style:none; border-right-style:none; border-bottom-style:none; }
img_whs12 { border:none; width:28px; height:41px; float:none; border-style:none; }
td.whs13 { width:92.907%; padding-right:10px; padding-left:10px; border-right-style:none; border-bottom-style:none; }
img_whs14 { border:none; width:324px; height:238px; float:none; border-style:none; }
td.whs15 { width:100%; padding-right:10px; padding-left:10px; border-bottom-style:none; border-right-style:none; border-left-style:none; }
img_whs16 { border:none; width:180px; height:357px; float:none; border-style:none; }
table.whs17 { x-cell-content-align:top; width:100%; border-spacing:0px; }
img_whs18 { border:none; width:28px; height:41px; float:none; border-style:none; }
img_whs19 { border:none; width:484px; height:193px; float:none; }
table.whs20 { x-cell-content-align:top; width:100%; x-condition:Online; border-spacing:0px; }
tr.whs21 { x-cell-content-align:top; height:16px; x-condition:Online; }
td.whs22 { width:7.093%; padding-right:10px; padding-left:10px; border-right-style:none; border-left-style:none; border-bottom-style:none; border-top-style:none; x-condition:Online; }
p.whs23 { font-size:6pt; }
td.whs24 { width:92.907%; padding-right:10px; padding-left:10px; border-bottom-style:none; border-right-style:none; border-top-style:none; x-condition:Online; }
tr.whs25 { x-cell-content-align:top; height:35px; x-condition:Online; }
td.whs26 { width:7.093%; padding-right:10px; padding-left:10px; border-left-style:none; border-right-style:none; border-bottom-style:none; x-condition:Online; }
img_whs27 { border:none; width:28px; height:18px; float:none; x-condition:Online; border-style:none; }
td.whs28 { width:92.907%; padding-right:10px; padding-left:10px; border-right-style:none; border-bottom-style:none; x-condition:Online; }
tr.whs29 { x-cell-content-align:top; height:19px; x-condition:Online; }
div.whs30 { width:100%; }
p.whs31 { text-align:right; x-condition:Product, Online; }
p.whs32 { text-align:right; x-condition:Online; }
p.whs33 { text-align:center; x-condition:PDT; text-decoration:underline; }
-->
</style><script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">
<!--
function reDo() {
if (innerWidth != origWidth || innerHeight != origHeight)
location.reload();
}
if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
origWidth = innerWidth;
origHeight = innerHeight;
onresize = reDo;
}
onerror = null;
//-->
</script>
<style type="text/css">
<!--
div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }
p.WebHelpNavBar { text-align:right; }
-->
</style><script type="text/javascript" language="javascript1.2" src="whmsg.js"></script>
<script type="text/javascript" language="javascript" src="whver.js"></script>
<script type="text/javascript" language="javascript1.2" src="whproxy.js"></script>
<script type="text/javascript" language="javascript1.2" src="whutils.js"></script>
<script type="text/javascript" language="javascript1.2" src="whlang.js"></script>
<script type="text/javascript" language="javascript1.2" src="whtopic.js"></script>
<script type="text/javascript" language="javascript1.2">
<!--
if (window.gbWhTopic)
{
if (window.setRelStartPage)
{
addAvenueInfo("Zend Studio for Eclipse Help","Setting_the_JavaScript_Build_Path.htm","Running_PHP_Scripts_Locally.htm");
}
if(1)
{
}
if (window.setRelStartPage)
{
setRelStartPage("IDE_Help.htm");
autoSync(1);
sendSyncInfo();
sendAveInfoOut();
}
}
else
if (window.gbIE4)
document.location.reload();
//-->
</script>
</head>
<body leftmargin="5" topmargin="5" rightmargin="5" bottommargin="5"><script type="text/javascript" language="javascript1.2">
<!--
if (window.writeIntopicBar)
writeIntopicBar(4);
//-->
</script>
<h1 class="whs1">Setting Up and Using Dojo Integration</h1>
<p>PDT's
Dojo Integration functionality allows you to add the Dojo toolkit library
to your project's Build Path so that its functions, classes and elements
will be available for operations such as code completion and hover help.<br>
See <a href="http://dojotoolkit.org/">http://dojotoolkit.org/</a> for more
information on the Dojo toolkit.</p>
<p>&nbsp;</p>
<h3>Setting Up Dojo Integration in PHP Projects</h3>
<p>To enable Dojo integration you must first <a HREF="Enabling_JavaScript_Support_in_PHP_Projects.htm">enable
JavaScript Support in your PHP Project</a>.</p>
<p>You then need to add the Dojo library to your project's Build Path by
following the instructions under the <a href="setting_the_javascript_build_path.htm#adding_builtin_libraries">Adding
Built-in Libraries</a> section of <a HREF="Setting_the_JavaScript_Build_Path.htm">Setting
the JavaScript Build Path</a> topic, and selecting the Dojo library.</p>
<p>&nbsp;</p>
<h3>Setting Up Dojo Integration in Zend Framework Projects</h3>
<p>The Dojo library can also be added to Zend Framework projects through
the New Zend Framework Project wizard.</p>
<p>When creating a Zend Framework project, mark the 'Enable Dojo Support'
checkbox in the Dojo Support category. This will create a link to the
external Dojo toolkit library, allowing for Dojo development functionality.</p>
<p class=Note style="margin-left: 0px;">Note:</p>
<p class=NoteText style="margin-left: 0px;">This option will only be available
if Zend Framework version 1.6 was selected.</p>
<p class=picture><img src="zend_frameowrk_new_project_dojo.png" x-maintain-ratio="TRUE" width="400px" height="447px" border="0" class="img_whs2"></p>
<p>In addition, you can select to import the JavaScript library into your
project. The link to the external library will still be maintained, so
you do not have to add this Dojo library to your <a HREF="Setting_the_JavaScript_Build_Path.htm">JavaScript
Build Path</a> (this will speed up the JavaScript build process).</p>
<p class=Note>Note:</p>
<p class=NoteText>The Dojo library may take a couple of minutes to import.
If you are using Dojo for development purposes only, we recommend that
you do not import it into your project.</p>
<p>If you did not enable Dojo support for the project during its creation,
you can do so by adding the Dojo for Zend Framework library to the project's
build path.</p>
<p>See the <a href="setting_the_javascript_build_path.htm#adding_builtin_libraries">Adding
Built-in Libraries</a> section of <a href="setting_the_javascript_build_path.htm">Setting
the JavaScript Build Path</a> topic for more information.</p>
<p>&nbsp;</p>
<h3>Using Dojo Integration</h3>
<p>Once Dojo libraries are included in your project's JavaScript Build
Path, Dojo code completion options will be available to files within that
project.</p>
<p>The following Dojo elements will be available in the content assist list:</p>
<ul><li class=p-ListBullet1><p class=ListBullet1>Dojo classes (including
namespaces)</p></li>
<li class=p-ListBullet1><p class=ListBullet1>Dojo object methods</p></li>
<li class=p-ListBullet1><p class=ListBullet1>Dojo object properties</p></li>
<li class=p-ListBullet1><p class=ListBullet1>Dojo global variables
(e.g. dojo)</p></li>
<li class=p-ListBullet1><p class=ListBullet1>Classes in dojo.require(‘’)</p></li>
</ul>
<table x-use-null-cells cellspacing="0" width="100%" class="whs3">
<col class="whs4">
<col class="whs5">
<tr valign="top" class="whs6">
<td colspan="1" rowspan="1" width="7.093%" class="whs7">
<p class="whs8">&nbsp;</td>
<td colspan="1" rowspan="1" width="92.907%" class="whs9">
<p class="whs10">&nbsp;</td></tr>
<tr valign="top" class="whs6">
<td width="7.093%" class="whs11">
<p class="whs8"><img src="txt_file_icon.png" x-maintain-ratio="TRUE" alt="Usage Example" width="28px" height="41px" border="0" class="img_whs12"></td>
<td width="92.907%" class="whs13">
<p class="whs10">Example:</p>
<p class=picture style="text-align: left;" align=left><img src="dojo_example.png" x-maintain-ratio="TRUE" width="324px" height="238px" border="0" class="img_whs14"></p>
</td></tr>
<tr valign="top" class="whs6">
<td rowspan="1" colspan="2" width="100%" class="whs15">
<p>&nbsp;</td>
</tr>
</table>
<p>Dojo elements will also be displayed in the Outline view:</p>
<p class=picture><img src="dojo_integration.gif" x-maintain-ratio="TRUE" width="180px" height="357px" border="0" class="img_whs16"></p>
<h5>Dojo requireModule</h5>
<p>The dojo() view helper is intended to simplify setting up the Dojo environment
and can be accessed from within Zend View files. </p>
<p>One of the methods available from the Dojo view helper is requireModule,
which sets up a require method. Within Zend View files, content assist options
will be available to this method:</p>
<table x-use-null-cells cellspacing="0" width="100%" class="whs17">
<col class="whs4">
<col class="whs5">
<tr valign="top" class="whs6">
<td colspan="1" rowspan="1" width="7.093%" class="whs7">
<p class="whs8">&nbsp;</td>
<td colspan="1" rowspan="1" width="92.907%" class="whs9">
<p class="whs10">&nbsp;</td></tr>
<tr valign="top" class="whs6">
<td width="7.093%" class="whs11">
<p class="whs8"><img src="txt_file_icon.png" x-maintain-ratio="TRUE" alt="Usage Example" width="28px" height="41px" border="0" class="img_whs18"></td>
<td width="92.907%" class="whs13">
<p class="whs10">Example:</p>
<p class="whs10"><img src="dojo_requiremodule.png" x-maintain-ratio="TRUE" width="484px" height="193px" border="0" class="img_whs19"></td></tr>
<tr valign="top" class="whs6">
<td rowspan="1" colspan="2" width="100%" class="whs15">
<p>&nbsp;</td>
</tr>
</table>
<p>See <a href="http://framework.zend.com/manual/en/zend.dojo.view.html">http://framework.zend.com/manual/en/zend.dojo.view.html</a>
for more information.</p>
<table x-use-null-cells cellspacing="0" width="100%" class="whs20">
<col class="whs4">
<col class="whs5">
<tr valign="top" class="whs21"><td colspan="1" rowspan="1" width="7.093%" class="whs22">
<p class="whs23">&nbsp;</td>
<td colspan="1" rowspan="1" width="92.907%" class="whs24">
<p>&nbsp;</td></tr>
<tr valign="top" class="whs25"><td width="7.093%" class="whs26">
<p class="whs23"><img src="link_icon.png" x-maintain-ratio="TRUE" alt="Related Links" width="28px" height="18px" border="0" class="img_whs27"></td>
<td width="92.907%" class="whs28">
<p class="whs10">Related Links:</p>
<p><a href="javascript.htm">JavaScript Support</a></p>
<p><a href="using_javascript.htm">Developing with JavaScript</a><a href="enabling_javascript_support_in_php_projects.htm"><br>
Enabling JavaScript Support in PHP Projects</a></p>
<p><a href="setting_the_javascript_build_path.htm">Setting the JavaScript
Build Path</a></p>
<p><a href="viewing_javascript_elements_in_the_outline_view.htm">Viewing
JavaScript Elements in the Outline View</a></p>
<p><a href="using_javascript_content_assist.htm">Using JavaScript Content
Assist</a></td></tr>
<tr valign="top" class="whs29"><td colspan="1" rowspan="1" width="7.093%" class="whs26">
<p class="whs23">&nbsp;</td>
<td colspan="1" rowspan="1" width="92.907%" class="whs28">
<p>&nbsp;</td></tr>
</table>
<div placeholder id="footer" class="whs30">
<p align="right" class="whs31"><span
style="background-color: #ffffff; x-condition: Online, Product;">V</span>iew
the Zend Product <a href="http://www.zend.com/en/resources/zend-documentation/zend-studio/zend-studio.htm"
style="color: #000000; x-condition: Product, Online;">Online Documentation</a>
for the most up-to-date information.</p>
<p align="right" class="whs32"><span style="background-color: #ffffff;"><a
href="javascript:crlf=&quot;
&quot;;h=location.href;t=document.title;e = &quot;&quot; + (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text); if (e!=null) location=&quot;mailto:documentation@zend.com&quot; + &quot;?Subject= Feedback on &quot; + escape(t) + &quot;&amp;Body=&quot; + escape(e).replace(/ /g, &quot;+&quot;) + crlf + &quot; &quot;; void 0"
style="x-condition: Online;">Submit Documentation Feedback</a></span></p>
<p align="center" class="whs33">PHP Development
Tools</p>
</div>
<script type="text/javascript" language="javascript1.2">
<!--
highlightSearch();
if (window.writeIntopicBar)
writeIntopicBar(0);
if(0)
{
}
//-->
</script>
</body>
</html>