- This topic has 1 reply, 1 voice, and was last updated 12 years, 10 months ago by
DevAlternatives.
-
AuthorPosts
-
Hi,
I’m trying to use the declarative approach for dijit components after doing a scaffolding with spring , using the below example :
http://dojotoolkit.org/reference-guide/1.7/dijit/Declaration.html<body class="tundra spring"> <script type="text/javascript" src="<c:url value="/resources/dijit/form/Button.js" />"></script <script type="text/javascript" src="<c:url value="/resources/dojo/parser.js" />"></script> <script type="text/javascript" src="<c:url value="/resources/dijit/dijit.js" />"></script> <script type="text/javascript">dojo.require("dojo.parser");dojo.require("dijit.form.Button"); </script> <button data-dojo-type="dijit.form.Button" type="button">Click me too! <script type="dojo/method" data-dojo-event="onClick" data-dojo-args="evt"> // Do something: dojo.byId("result2").innerHTML += "Thank you! "; </script> </button> <div id="result2"></div>
But the component is not rendered as a dijit button,I’m usign ME4S Version: 10.0.0 Build ID: 10.0.0 Build 7 (111109_1440).
Please advise,
Thanks,
After some searching I found that the dojo,dijit and dojox version that we are using with the jar org.springframework.js.(You have to update the webflow version to 2.3.0.RELEASE on the pom.xml) is 1.5 release (based on the svn revision), and the declarative sintaxis in 1.7 and 1.5 are differents, here are some examples for 1.5:
toolbar with menus
<div id="toolbarId" dojoType="dijit.Toolbar" class="dijitToolbar" > <div dojoType="dijit.form.DropDownButton"> <span style="white-space: pre;" > Procesos de negocio</span> <div id="toolbarMenuBtnProcessId" dojoType="dijit.Menu"> <div dojoType="dijit.MenuItem" onClick="handleMenu('New profile')"> New Profile</div> <div dojoType="dijit.MenuItem" onClick="handleMenu('Open Profile')">Open Profile</div> <div dojoType="dijit.MenuSeparator"></div> <div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconSave" onClick="handleMenu('Save Profile')">Save Profile</div> <div dojoType="dijit.MenuItem" onClick="handleMenu('Save Profile As..')">Save Profile As...</div> </div> </div> <span dojoType="dijit.ToolbarSeparator"></span> <button id="toolbarBtnLinksId" dojoType="dijit.form.Button" label="Enlaces" iconClass="dijitIconBookmark" style="float:right;"> </button> <button id="toolbarBtnInfoId" dojoType="dijit.form.Button" label="Ayuda" iconClass="dijitIconDocuments" style="float:right;"> </button> <button id="toolbarBtnExitId" dojoType="dijit.form.Button" label="Salir" iconClass="dijitIconKey" style="float:right;"> </button> <button id="toolbarBtnPrintId" dojoType="dijit.form.Button" label="Imprimir" iconClass="dijitIconPrint" style="float:right;"> </button> <button id="toolbarBtnHomeId" dojoType="dijit.form.Button" label="Inicio" iconClass="dijitIconFunction" style="float:right;"> </button> </div>
–Dojo release
http://dojotoolkit.org/api–Api
http://bugs.dojotoolkit.org/browser/dojo/tags/release-1.5.0/dojo/ svn revision
http://download.dojotoolkit.org/release-1.5.2/ –ExamplesFor the examples if you are using chrome and checking the examples without a webserver remenber to start the browser with –allow-file-access-from-files
-
AuthorPosts