DWR loading message question
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ron_Campbell
Posted On:   Tuesday, March 7, 2006 11:35 AM

I've setup DWR in my app and have it running smoothly. Right now i use it for dynamically filling in select boxes according to the options they choose. I've customized dwr a little, and im having trouble with the loading messsage. Right now i have a javascript function called "retrievePlantChildren". This function calls all my JavaClass.methods(callback, objecteval()); The problem is the prehook and posthooks are only being wrapped around the first call, and after that the loading message dissappears for the rest. My work around im trying is just putting a startLoadingMessage(); and stopLoadingMessage inside the retrievePlantChildren function, which would substitute for the pre and post hooks. My javascript functio   More>>

I've setup DWR in my app and have it running smoothly. Right now i use it for dynamically filling in select boxes according to the options they choose. I've customized dwr a little, and im having trouble with the loading messsage.



Right now i have a javascript function called "retrievePlantChildren". This function calls all my JavaClass.methods(callback, objecteval()); The problem is the prehook and posthooks are only being wrapped around the first call, and after that the loading message dissappears for the rest.



My work around im trying is just putting a startLoadingMessage(); and stopLoadingMessage inside the retrievePlantChildren function, which would substitute for the pre and post hooks.




My javascript function looks like this right now. startloadingmessage basically creates a div in top right of the screen that says "Loading...". The stoploadingmessage removes the div from the page. Right now, im not seeing a loading message at all when i execute the function. Any suggestions on how i should fix this or a different approach i may not be seeing? Thanks in advance.


			
function retrievePlantChildren(plantSelectBox) {
//Start the loading message
startLoadingMessage();

//Get the plant regions for the plants selected
BudgetFindAjax.findPlantRegions(fillPlantRegions,objectEval(getPlantData(plantSelectBox)));

//Get the customers for the plants selected
BudgetFindAjax.findCustomers(fillCustomers,objectEval(getPlantData(plantSelectBox)));

//Get the business groups for the plants selected
BudgetFindAjax.findBusinessGroups(fillBusinessGroups,objectEval(getPlantData(plantSelectBox)));

//Get the cost departments for the plants selected
BudgetFindAjax.findCostDepartments(fillCostDepartments,objectEval(getPlantData(plantSelectBox)));

//Get the commodities for the plants selected
BudgetFindAjax.findCommodities(fillCommodities,objectEval(getPlantData(plantSelectBox)));

//Stop the loading message
stopLoadingMessage();
}
   <<Less
About | Sitemap | Contact