Posts

Showing posts from 2014

Dojo Enhanced Grid with Checkbox like radio button exmaple

There are some situations where we need to show Grid with Check box but should perform as Radio button. Below code snippet is an example of extended Dojo Enhanced Grid which shows Check-box but works as Radio button. Prerequisite : // 1. Dojo // 2. Add required dojo components like dojox/grid/EnhancedGrid used in required section. // 3. Include Enhanced grid css on jsp. Get it from dojo site. 1. JSP HTML code snippet.    <!-- Enhanced grid data placeholder --> <div id="gridData"> <div id="gridDataCP" data-dojo-type="dijit/layout/ContentPane"></div> </div> 2. JavaScript code snippet. /*************************************************************************  * Dojo Enhanced Grid implementation with checkbox,  * but achieved functionalites like single select radio button.  **************************************************************************/ /**  * Enhanced grid implementation us...

How to Upgrade Dojo in IBM WebSphere Portal v8.0

How to upgrade dojo without changing existing dojo in IBM WebSphere v8.0. IBM WebSphere Portal v8.0 provides ready-to-use dojo like v1.4.3, v1.6 and v1.7 (v1.7.2). IBM WebSphere v8.5 comes with a newer version of dojo, but to use newer version of Dojo like 1.8.x in WebSphere v8.0, there are no upgrade fixes available. The only way we can upgrade dojo is by customizing a newer dojo release.  This blog is targeted for WebSphere users but the concept can be used or leveraged by other open source technologies too. The steps described below are using IBM RAD and IBM Portal Server v8.  Following steps describes how to use customized dojo at the theme level but, can also be used at the page level. Step #1 Download Dojo Download the Dojo released version from the Dojo site.   Go to the http://download.dojotoolkit.org/release-1.8.5/ Click on dojo-release-1.8.5-src.zip and save it to a temp directory. Unzip the downloaded zip file. Step #2 Creat...

IBM WebSphere serveResource Example using dojo v1.8

IBM WebSphere v8.x  serveResource (dynamic resources) Example This example only covers how to access resources using serverResource and dojo. 1.    Declare javascript variable on portlet jsp page.      <script type="text/javascript">         var resourceUrl = "<portlet:resourceURL/>";     </script> 2.    Write an AJAX javascript method to make service call. You can make it general AJAX call extending / making it dynamic .     function getUserList(){         require(["dojo/request/xhr"], function(xhr){             xhr.get(resourceUrl, {                 handleAs : "text/json",                 pr...