Posts

ExtJS Treepanel all nodes loaded event

Image
In ExtJS (any version), in Ext.tree.TreePanel, when we load the tree, there in no event to check if all my tree-nodes are completely loaded ( or not in store but actually all nodeui's are loaded into the dom or not), i.e. doing something after full or part of tree gets loaded, I wanted this functionality sometime back, so we did this. Though there is a callback function on expand and collapse method calls on TreeNode, but they only check if the immediate child of this node are expanded and loaded in dom and not the whole lower tree nodes. This is again , a subjective solution, it might not satisfy your need but you can give this a try. In our case, we were expanding the Treepanel completely, when Treeloader loads its data, so my code looked like ... new Ext.tree.TreePanel({ id : 'MyGrid', autoScroll : Globals.Boolean.TRUE, animate : false, //DO NOT ENABLE IT TO TRUE, AS IT TAKES TIME TO LOAD NODES IN DOM-TREE border : true, enableDD : true, containerS...

Clustering Presentation

Image
After publishing multi-instance JBoss article, I wanted to do JBoss Clustering Implementation, So I was searching the web, reading up articles, books to get good understanding of how clustering works, what and how to do it. There are generally many Clustering- strategies and so many combinations in which it can be implemented as per the need, below ppt is just for beginners, so that they can get the basic idea behind the clustering. Few days back, I had presented my view about JBoss Application Server Clustering presentation to my team. Main points covered were - What is clustering? Different Types of Clustering topologies? What changes do we have to make to our application's code to make it cluster-enabled? What are different clustering related services available, etc...  So, I have modified it to make it generic and publishing it here. Main points are -  What is Clustering?  Clustering Concepts  Clustering Topologies  Clustering Componen...

ExtJS TreePanel - Get All Leaf Nodes and non-leaf nodes of a Tree in ExtJS

***Get All Leaf Nodes and non-leaf nodes of a Tree*** Hi Friends,  After a long time I am writing this small blog post, currently I am really busy working with Alfresco Foundation API, Alfresco is an Open source CMS and once I get time I have a long pipeline of topics in Alfresco programming to post about. I already have two blog-posts about ExtJS Treepanel, i.e. getting total number of deep-children and getting the array of those all deep-children nodes , this blog-post will be incremental to those previous ones. Sometimes we might need list of nodes of a Tree with some-special condition may be only leaf-nodes, only non-leaf nodes or may be only nodes with some special attribute, so here I have written two functions which can be modified to get your type of list of nodes. 1) Get the list of all leaf nodes (Only leaf nodes - End-nodes) in a Treepanel in ExtJS getDeepAllLeafNodes = function(node,onlyLeaf){ var allNodes = new Array(); if(!Ext.value(node,...

Content Sharing aka File Sharing on Internet OR IP (Intellectual Property) Piracy

Image
Hi Friends,           After a long gap, I am restarting my blog with the "HOT" topic of Content Piracy or File Sharing.  This debate over whether its right or wrong to download files over internet, is the need for time.            Every story has two sides, you cannot judge someone or something until you think through all aspects of that issue. The same way, File Sharing (when its utilized for sharing knowledge/ideas) and Content Piracy (when utilized to illegally download the someone's IP over net or something).  Fast-fact -  At any given instant BitTorrent has, on average, more active users than YouTube  and  Facebook  combined.           Basically the basic principle of internet is "User is Owner of the Content", so you there is no central control over internet and no one is owner of it, each and every household who is online is basically assisting in...

Running different JBoss instances as separate windows service for multi-instance JBoss configuration

Image
* Deploying JBoss instance as separate windows services * Actually in my last couple of posts, I have explained how to cofigure JBoss for multi-instance run (like single machine-single JBoss with different instances OR single machine-multiple JBoss - multiple instances). So here I will explain how to deploy them as separate windows services, to start/stop/restart them independently.  Note - •    You must have necessary files, for installing JBoss as service.(In case you don't, Please read my previous Blog post - click here ). •    You have properly configured JBoss multi instance configurations.(Please read my previous posts if you don't know how to). Steps :- 1)  In order to run each JBoss instance as a separate windows service, you must have a separate service wrapper for each JVM run. i.e. there should be a separate service.bat file for each instance of JBoss. So copy, paste & rename these service.b...

Running Multiple Eclipse J2EE Workspaces with multi-instance JBoss configuration

Image
In my previous article I had explained how to configure JBoss for multi instance run. (If you have not configured your JBoss, please read to my previous article) While running your Java project on JBoss through eclipse, we first need to create a server in eclipse which should point to your multi-instance configured JBoss. * Then in its properties it will ask for few things like - runtime environment, Launch configuration details, server properties like JNDI port, HTTP port, server configuration. * So as shown in above screen shot, fill in your proper values. a . For HTTP port, JNDI port - refer to your binding xml file. b. For server configuration, put name of your server configuration folder like node1, node2, all, minimal, etc. **server configuration value is important because it will decide where to publish your jar/war/ear of current project (I mean in which server configuration directory). **If you put this value wrong, then it will publish your project t...