Skip to main content

Posts

Showing posts from October, 2014

Making a subgrid inside a enhanced grid using dojo

What I want to achieve is a subgrid within an enhanced grid using dojo just like a Jquery data table. So I followed these steps to achieve it. Create an enhanced grid in dojo using dojox/grid/EnhancedGrid. Create a dojo/data/ItemFileWriteStore from Json data which is of the format {items:[{"key":"value","subgrid":{"child":"value"}}]} Create a layout which has onBeforeRow callback which is called before the creation of any row in the grid so that we can hide the child row. The first column of the row should be a +/- image which upon clicking should show the child row. Finally the output would be something like Demo and code is @  jsFiddle

Debugging dojo

Recently I had an issue where I always get 3 as callback whenever I require a custom module. require(["modules/headerWidget"],function(header){ console.log(header); }); My headerWidget is something like this: require([ "dojo/_base/declare" , "dijit/_WidgetBase", "dijit/_TemplatedMixin" ], function(declare, _WidgetBase, _TemplatedMixin) { return declare("headerWidget",[ _WidgetBase, _TemplatedMixin ],{ templateString : <div></div> , }); }); Console always used to display only 3. I wondered as to why and here is the solution for that. The solution is to give the custom widget as module. define ([ "dojo/_base/declare" , "dijit/_WidgetBase", "dijit/_TemplatedMixin" ], function(declare, _WidgetBase, _TemplatedMixin) { return declare("headerWidget",[ _WidgetB

Loading dojo in the project

In order to load Dojo, we can use CDN version or the downloaded package from  Dojo official site  and refer the src to Dojo package.

Troubleshooting integrating WebSphere Portal with Facebook

Error : EJPAK0060W The system received an external identifier which is not associated with a user identity within the WebSphere Portal user registry. Please associate the remote identity with a valid local user identity first. Reason:  It is because that an external user doesn't have an account with our local portal user. What you can do here is either you can associate an existing> user with that Facebook user or  you can turn on transient users setting to enable to third party user login without account in portal. Check that the User account repository's current realm definition is Federated repositories and there is a base entry "o=transparent". If problem exists in configuring the transient users then follow the solution provided. Solution : If you are sure that you have followed every step from here , then it is a problem with your transient user. When you run the command “ ConfigEngine.bat enable-transient-user -DWasUserId=wpsadmin -DWasPassw

Life in Chennai

This post that I am going to write is not a travel trip. It is going to be strictly for those who are going to come Chennai for a living and plotted according to my experiences . Chennai is the city which has fascinated me with its travel mode all around to important places. Train route is possible for the major places. While one can go to important places in AC metro buses and good deluxe buses, there is a bus always from anywhere to anywhere. The only thing that irritates me is the negligible buses after 10 in the night. Yes, Chennai doesn’t have a night life . It halts mostly after 10 in the night. But I am having a good weekends (day time I mean) with malls , beaches , temples , cricket and sleep in home. Though it is sultry in the days with high humidity you can get coconuts all around to quench the thirst and beat the heat (at nominal prices). Autos are the nightmare (as it can be in any city). It is quite tough to bargain with them. They normally mock

One of the best Telugu short film

I was actually thinking about the short films which made my day and it struck to me this short film which is not only great in its story but also the execution. It is beautifully crafted to give the correct sense of humor. I laughed like anything not only the first time I have seen it but for the second third fourth and even the 1000 th time I have seen it. It is very close to normal day happening where a boy meets a girl by Facebook. Ah, I won’t tell the rest of the story. Please do watch it when you have free time. The actor is Raj Tarun (@ facebook profile ) & actress is Chandini ( @facebook_profile )  P.S. : This blog neither endorses nor a PR towards  Mr. Productions . It is just out of sheer interest and love towards the short film that made me to put up this.

Redirection in javascript

How Page Re-direction works ? Example 1: This is very simple to do a page redirect using JavaScript at client side. To redirect your site visitors to a new page, you just need to add a line in your head section as follows: <head> <script type="text/javascript"> <!-- window.location="http://www.newlocation.com"; --> </script> </head> To understand it in better way you can  Try it yourself . Example 2: You can show an appropriate message to your site visitors before redirecting them to a new page. This would need a bit time delay to load a new page. Following is the simple example to implement the same: <head> <script type="text/javascript"> <!-- function Redirect() { window.location="http://www.newlocation.com"; } document.write("You will be redirected to main page in 10 sec."); setTimeout('Redirect()', 10000); //--> </script> </head> Here 

Where is my session timeout error jsp page?

It is very common to encounter the session time-out page when using IBM WebSphere portal while developing. Most times there would be a client requirement to modify the way things are done automatically. While in the last post  I have mentioned about how to change the session time-out value, I am going to talk about modifying the session time-out error page.

Implicit objects in JSP page

By default  page, request, session and application  objects are available to JSP pages. So you can access then using EL syntax. And following table shows IMPLICIT objects available to EL. Implicit object Description 1.      pageScope Scoped variables from page scope 2.      requestScope Scoped variables from request scope 3.      sessionScope Scoped variables from session scope 4.      applicationScope Scoped variables from application scope 5.      param Request parameters as strings 6.      paramValues Request parameters as collections of strings 7.      header HTTP request headers as strings 8.      headerValues HTTP request headers as collections of strings 9.      initParam Context - initialization parameters 10. cookie Cookie values 11.   pageContext The JSP PageContext object for the current page So session and sessionScope are same but differs in context they are used.M

Basic HTML templates

I have the need to use a basic template for a html page and it is really tiresome for me to type the same thing every time. Hence I came up with this template to copy and paste in my editor for quick process.