When you are tracing pages, make sure you follow the page description XML file and see what actions are called. 99.9% of the time variables in a page were placed there by an action. Either the page action or some other action which previously ran.
One Thing to Know Which Is Good for Everyone Is How a page is rendered.
the view is mapped to a FTL file (via the jpublish ViewHandler) JP will take the name of the page, drop the extension append .xml to the name and lookup the definition for the page in the defined page definition directory (/ WEB-INF / pagedefs). all page actions are run. the page is merged with a template and all template actions run the template will include content, and as it does each action for the content is run. When content is included the definition is looked up just Like a page (and. "SO IT ACTS JUST LIKE A Page Would
This stay help some with traction down and finding.
-Andy
WE TRY to EXPLAIN THIS in detail for the ecommerce Open Questions Are Marked with
The entry point is http: // localhost: 8080 / ecommerce / it will call index.jsp as specified in the web.xml file at
)
First I wisht the section> >>
>>
RedirectPath
>>
/ Control / Main
>>
is relevant but Andy said> This is a filter setting The filter is for several purposes> - Sets up ofbiz objects for events and page processing (delegator,> dispatcher, security objects)> - Protects the raw templates;... restricts access so the raw templates> can not be downloaded from the server, this "redirectPath" is the> setting to tell the filter where to re-direct these requests to. So, if> you request something invalid rather then getting a 404 you get the> main . page.Ofbiz / components / ecommerce / webapp / ecommerce / index.jsp This JSP page will redirect to / control / main statement is. <% response.sendRedirect ( "control / main");%> it will redirect to below URL Http: // localhost: 8080 / ecommerce / control / main
When Above Url Is Requested It Will Look in Web-INF / Controller.xml
;
In Above Lines You See Response Type As View, Than IT Will Look for View-map tag in controller.xml
THIS VIEW-MAP TYPE IS JPUBLISH SO IT WILL BE RENDERED with JPUBLISH. Web-inf / jpublish.xml. this means main.ftl is rendered, but first the point author (web-inf / pagedefs / main.xml) rendered
Same Chain Follows for Every Request Controller.xml ->
->
-> jpublish.xml -> / pageDef / ->
-> / Actions / BSH Scripts. -> Than Displays Appropriate * .ftl File for presentation to user.
Main.xml Has this Code
Main_lr
Main page
PagetitleMain
main
The descriptions of above attributes.
Main_lr
THIS WILL CALL WebApps / ECOMMERCE / TEMPLATES / Main_LR in this main_lr the layout is defined, this is mainly
$ {Pages.get ("/ incrudes / header.ftl"}
$ {pages.get ("/ templates / leftbar.ftl)}
: $ {Pages.get ("/ Includes / ErrorMsg.FTL")}
: $ {Pages.get (page.path)}
$ {pages.get ("/ templates / rightbar.ftl)} $ {page.get (" / incrudes / footer.ftl "}
this first action goes to Bean shell script of main.bsh (WEB-INF / actions / main.bsh) this will setAttribute ( "productCategoryId"). which we are see ing (FEATUTRE CATEGORY from DEMOSHOP) than second action
This action goes to category.bsh (web-inf / actions / category / category.bsh). Here See the code at last context.put ("DetailTemplate"; Here Context Is Having Global Access Variable.
What does this mean?
THEN AGAIN THE Main.ftl Will Be Displayed After All this is processed
C: /ofbiz/ofbiz/components/ecommerce/webapp/ecommerce/main.ftl UPS There I Not Much Inside: $ {pages.get ("/ catalog / category.ftl)}
Is this true? It renders /catalog/category.ftl This file contains a little bit more <#assign uiLabelMap = requestAttributes.uiLabelMap> <#if productCategory? Has_content> $ {pages.get (detailTemplate)} <#else>
$ {uilabelmap.productcategoryNotFoundforcateGoryId} $ {requestparameters.category_id? if_exists}!
Is DetailTemplate A Global Variable? Isnt it set via category.bsh as detailtemplate = "/catalog/categorydetail.ftl";
Which Possibilities Do I Have To Find Out The Value IT Contains During Runtime?
AT Which Point Is Specified That The CatalogList In The Middle of Control / Main
Another Example Http: // localhost: 8080 / ecommerce / control / viewprofile.
In The Controller.xml this is mapped
and