2009-11-13 10:01:56 UTC
I have changed the openxava.js for the same
I have used http://plugins.jquery.com/project/history
Changes in the openxava.js
openxava.executeAction = function(confirmMessage, takesLong, action, argv) {
if(argv!=null)
argv=","+argv;
else
argv='';
jQuery.history.load("action="+action+argv);
}
in openxava.refreshPage
add
if(firstTime++==0)
jQuery.history.init(pageload);
copy original function openxava.executeAction to openxava.executeAction1as
openxava.executeAction1 = function(confirmMessage, takesLong, action, argv) {
if (confirmMessage != "" && !confirm(confirmMessage)) return;
if (takesLong) {
document.getElementById('xavaprocessinglayer').style.display='block';
setTimeout('document.images["xavaprocessingImage"].src = "images/processing.gif"', 1);
}
this.form.xavafocusforward.value = "false";
this.form.xavaaction.value=action;
this.form.xavaactionargv.value=argv;
if (this.isSubmitNeeded()) {
this.form.submit();
}
else {
this.ajaxRequest();
}
}
Add the below function in openxava.js
function pageload(hash) {
// hash doesn't contain the first # character.
if(hash) {
var variables=hash.split(",");
var argv='';
for(i=1;i<variables.length;++i)
argv+=","+variables[i];
openxava.executeAction1('', false, variables[0].split("=")[1], (argv!=''?argv:null));
}
}
Please comment under which scenorio it will not work
Can you pls include this code in openxava?
CSJakharia