Sunday, July 3, 2011

Win Vista PE+usb not recognized+ VMWARE

Hi,

This is a solution i tried to make ghost copies with winPE in VMWare.
Problem-
It recognizes on the hard drive and not the USB devices. So I was unable to make the save the image from the ghost copy.

Solution-
Make a copy of the vmdk file in the wmware folder and name it as xxxx_1.vmdk. In the vmware setting add a new Hard Drive with the new vmdk file(xxxx_1.vmdk). Boot the image with windows PE. Now it will show up 2 hard drives. So the image of the one hard drive can be saved to the other one. Once done shutdown the VM. Rename the two vmdk files. Boot the operating system with the new vmdk. Then the image can be transfered using FTP(or copying).

Hope this may be helpful.

Saturday, June 25, 2011

Updating/Refreshing a dojo Tree

A dojo tree can be reloaded or refreshed with the below code.

<html>
<head>
<link rel="stylesheet" type="text/css" href="dojo-release-1.6.0/dojo/resources/dojo.css" />
<link rel="stylesheet" type="text/css" href="dojo-release-1.6.0/dijit/themes/tundra/tundra.css" />
<script src="dojo-release-1.6.0/dojo/dojo.js" language="javascript"></script>
<script language="javascript" type="text/javascript">
dojo.require("dojo.parser");
dojo.require("dijit.form.Button");
dojo.require("dijit.Tree");
dojo.require("dijit.tree.ForestStoreModel");
dojo.require("dojo.data.ItemFileWriteStore");
var treeModel;
</script>
<script>
function reload(){
if(dijit.byId("treeOne")){
// Destroy the widget
dijit.byId("treeOne").destroyRecursive();
}
var store = new dojo.data.ItemFileWriteStore({
url: "./json/files.json"
});

treeModel = new dijit.tree.ForestStoreModel({
store: store,
query: {
"type": "Folder"
},
rootId: "server",
rootLabel: "ROOT",
childrenAttrs: ["children"],
});
document.getElementById("treespan").innerHTML="<div id='treeOne'></div>"
new dijit.Tree({
model: treeModel,
},
"treeOne");
}
</script>
</head>
<body class="tundra">
<button dojoType="dijit.form.Button" type="button" onClick="reload()" >Load Tree</button>
<span id="treespan"></span>
</body>
</html>



Back Track a dojo Tree

If we have a tree node of dojo tree we can back track the tree using the below code.

Once we get a tree node of the dojo tree(for Right click/click), we can find out the root node of the tree .
We get the values of the nodes from the datastore that was used to create the tree.


var tn =dijit.getEnclosingWidget(e.target);

while(parent.indent >0){
// get the value from the nodes from the data store
console.debug(store.getValue(parent.item, 'name'));
parent=parent.getParent();
}



About Me