Skip to main content

Posts

Showing posts with the label programming

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

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=wps...

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  ...

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.

How to do good programming ?

"If computer programming is to become an important part of computer research and development, a transition of programming from an art to a disciplined science must be effected." Computer scientists are taught to program properly, just like linguists are taught how to write literary texts. However, not all computer scientists are programmers , just like not all linguists are writers, although most of us program regularly. For some reason, many programmers seem to think their role is to write code that makes things work. It’s not. Your job is to solve a problem with code in the most elegant way, such that your solution is easy to adapt, modify and reuse . Just like “the grass is green and the sky blue” is not literature, although it might perfectly describe the environment, coding something that just works is not programming. It’s fiddling. Most people do the wrong thing correctly and think that it is correct. Here is the post which illuminates such things and guide ...