文档详情

Dojo 1.0 Tutorial - Web Age Solutions(Dojo 1.0教程网络时代的解决方案).pdf

发布:2017-07-25约2.77万字共20页下载文档
文本预览下载声明
Dojo 1.0 Tutorial Bibhas Bhattacharya, Web Age Solutions Inc. This tutorial shows how to use Dojo 1.0 to create a rich Internet application. To do this tutorial, you need one of the following setups: 1. Eclipse WTP with Tomcat. Make sure that you can create a dynamic web project and run it from Tomcat. Or, 2. RAD6 or RAD7. Getting Started Launch WTP or RAD. Create a dynamic web project. In this tutorial, we call the project Aj axController. You may want to do the same. Deploy the project to the server. Install Dojo Download Dojo 1.0 from: /release-1.0.0/dojo-release-1.0.0.tar.gz. Extract it in the WebContent folder of the dynamic web project. Back in WTP or RAD, refresh the dynamic web project. You should see the dojo-release-1.0.0 folder under WebContent. Tutorial 1 - First Application We will develop a simple Dojo application. Later, we will analyze the code. Create the Page In the WebContent folder create a new HTML page called app1.html. Set the contents of the page to as follows. ?xml version=1.0 encoding=ISO-8859-1 ? 1 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN /TR/xhtml1/DTD/xhtml1-transitional.dtd html xmlns=/1999/xhtml head titleApp1/title link rel=stylesheet type=text/css href=dojo-release-1.0.0/dijit/themes/tundra/tundra.css/ script type=text/javascript djConfig=parseOnLoad: true src=dojo-release-1.0.0/dojo/dojo.js /script script type=text/javascript dojo.require(dijit.form.DateTextBox); /script /head body class=tundra h1Application One/h1 pEnter a date below:/p input dojoType=dijit.form.DateTextBox/ /body /html Save changes. Test Publish the files to the server. Run the page on the server. For WTP, the URL will will be http://localhost:8080/Aj axController/app1.html. Click on the date input box. This will pop open a
显示全部
相似文档