You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Adam Ratcliffe <ad...@premasys.com> on 2004/06/27 03:58:57 UTC
Best practice for database access in flow layer
I'm looking for a little direction on the most appropriate way to access
a database from the flow layer.
function searchCategories(locType, class1, class2) {
var categories = Search.searchCategories(locType, class1, class2);
if(categories != null) {
// if search returned categories, search again on expanded categories
cocoon.sendPageAndWait("page/showCategories.xml", {"categories" :
categories} );
// when user request arrives
class1 = cocoon.request.getParameter("class1");
class2 = cocoon.request.getParameter("class2");
// recursively calls itself with
searchCategories(locType, class1, class2);
}
}