Hey,
I got a very very unusual error here, that I'd like to discuss. Within my own webapp I am using the breadcrumbs screen and the siedeepcategoryscreen from the ordermanagement component. Everything seems to work fine, except that the breadcrumbs would not show the topLevelList at all. I remained the original coding in place and didn't touch anything - everything works aok within the original ecommerce application. I tried to print out the topLevelList within the breadcrumbs.ftl file but nothing is shown, even though the sidedeepcategory ftl seems to render everything just fine... Is it possible that somehow along the line, the topLevelList is getting emptied and hence wouldn't allow me to use it within the same app? |
Well, it turns out that no matter whether I use the original sidedeepcategory and breadcrumbs screen within my own application or not, I always end up with topLevelList = null.
I tracked it all down to the following: the sequence in which both screens are loaded matter heavily, as right now the breadcrumbs.groovy script is dependant on the sidedeepcategory.groovy list. Is this intentional? I would argue that the breadcrumbs screen should be run independently, so perhaps it is a smart idea to improve the original breadcrumbs script? I compared both scripts and realized that both are pretty much identical except that breadcrumbs.groovy misses the needed: CategoryWorker.getRelatedCategories(request, "topLevelList", CatalogWorker.getCatalogTopCategoryId(request, CatalogWorker.getCurrentCatalogId(request)), true); curCategoryId = parameters.category_id ?: parameters.CATEGORY_ID ?: ""; request.setAttribute("curCategoryId", curCategoryId); CategoryWorker.setTrail(request, curCategoryId); By adding the above or by simply loading sidedeepcategory.groovy within the breadcrumbs screen, one can easily get both to work... The question remains however, whether or not it is useful to have both scripts in place when their purpose is identical and one of which can not be run standalone... |
Administrator
|
Hi Paul,
I agree, if nobody see a problem with that, I will replace calls to breadcrumbs.groovy by calls to Sidedeepcategory.groovy and will remove breadcrumbs.groovy. Beware there is also a applications\product\webapp\catalog\WEB-INF\actions\find\sidedeepcategory.groovy file which is not related. Thanks Jacques From: "madppiper" <[hidden email]> > > Well, it turns out that no matter whether I use the original sidedeepcategory > and breadcrumbs screen within my own application or not, I always end up > with topLevelList = null. > > I tracked it all down to the following: the sequence in which both screens > are loaded matter heavily, as right now the breadcrumbs.groovy script is > dependant on the sidedeepcategory.groovy list. Is this intentional? > > I would argue that the breadcrumbs screen should be run independently, so > perhaps it is a smart idea to improve the original breadcrumbs script? > > I compared both scripts and realized that both are pretty much identical > except that breadcrumbs.groovy misses the needed: > > > CategoryWorker.getRelatedCategories(request, "topLevelList", > CatalogWorker.getCatalogTopCategoryId(request, > CatalogWorker.getCurrentCatalogId(request)), true); > curCategoryId = parameters.category_id ?: parameters.CATEGORY_ID ?: ""; > request.setAttribute("curCategoryId", curCategoryId); > CategoryWorker.setTrail(request, curCategoryId); > > > By adding the above or by simply loading sidedeepcategory.groovy within the > breadcrumbs screen, one can easily get both to work... > > > The question remains however, whether or not it is useful to have both > scripts in place when their purpose is identical and one of which can not be > run standalone... > -- > View this message in context: http://www.nabble.com/Breadcrumbs---misfunctioning-along-sidedeepcategory-tp21035525p21090678.html > Sent from the OFBiz - User mailing list archive at Nabble.com. > |
Administrator
|
Done in revision: 728455
Jacques From: "Jacques Le Roux" <[hidden email]> > Hi Paul, > > I agree, if nobody see a problem with that, I will replace calls to breadcrumbs.groovy by calls to Sidedeepcategory.groovy and > will > remove breadcrumbs.groovy. > > Beware there is also a applications\product\webapp\catalog\WEB-INF\actions\find\sidedeepcategory.groovy file which is not related. > > Thanks > > Jacques > > From: "madppiper" <[hidden email]> >> >> Well, it turns out that no matter whether I use the original sidedeepcategory >> and breadcrumbs screen within my own application or not, I always end up >> with topLevelList = null. >> >> I tracked it all down to the following: the sequence in which both screens >> are loaded matter heavily, as right now the breadcrumbs.groovy script is >> dependant on the sidedeepcategory.groovy list. Is this intentional? >> >> I would argue that the breadcrumbs screen should be run independently, so >> perhaps it is a smart idea to improve the original breadcrumbs script? >> >> I compared both scripts and realized that both are pretty much identical >> except that breadcrumbs.groovy misses the needed: >> >> >> CategoryWorker.getRelatedCategories(request, "topLevelList", >> CatalogWorker.getCatalogTopCategoryId(request, >> CatalogWorker.getCurrentCatalogId(request)), true); >> curCategoryId = parameters.category_id ?: parameters.CATEGORY_ID ?: ""; >> request.setAttribute("curCategoryId", curCategoryId); >> CategoryWorker.setTrail(request, curCategoryId); >> >> >> By adding the above or by simply loading sidedeepcategory.groovy within the >> breadcrumbs screen, one can easily get both to work... >> >> >> The question remains however, whether or not it is useful to have both >> scripts in place when their purpose is identical and one of which can not be >> run standalone... >> -- >> View this message in context: http://www.nabble.com/Breadcrumbs---misfunctioning-along-sidedeepcategory-tp21035525p21090678.html >> Sent from the OFBiz - User mailing list archive at Nabble.com. >> > |
Free forum by Nabble | Edit this page |