Users - what does this line say

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Users - what does this line say

puranisank

  Can anyone please tell what does this line say
"${screens.render(productsummaryScreen)} "

Purani




 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - what does this line say

Andrew Sykes
Purani,

This is a bit like an include directive, it is an instruction to include
a screen definition made in a widget XML file.

applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl
has a line like the one you mention.

Here's a quick walk through...

applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
The request is defined here...
    <request-map uri="category">
        <security https="false" auth="false"/>
        <response name="success" type="view" value="category"/>
    </request-map>

The attribute value="category" above refers to this line at the bottom
of the same file...

<view-map name="category" type="screen"
page="component://ecommerce/widget/CatalogScreens.xml#category"/>

The line above refers to this file...
applications/ecommerce/widget/CatalogScreens.xml

    <screen name="category">
        <section>
            <actions>
                <set field="leftbarScreenName" value="leftbar"/>
                <set field="rightbarScreenName" value="rightbar"/>
                <set field="MainColumnStyle" value="center"/>

                <set field="title-property"
value="PageTitleCategoryPage"/>
            </actions>
            <widgets>
                <decorator-screen name="main-decorator"
location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <include-screen name="breadcrumbs"/>
                        <include-screen name="category-include"/>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>

Notice <include-screen name="category-include"/> this includes another
screen definition in the same file...

    <screen name="category-include">
        <section>
            <actions>
                <script location="component://order/webapp/ordermgr/WEB-
INF/actions/entry/catalog/category.bsh"/>
            </actions>
            <widgets>
                <section>
                    <condition>
                        <not><if-empty field-
name="productCategory"/></not>
                    </condition>
                    <widgets>
                        <include-screen name="${detailScreen}"/>
                    </widgets>
                    <fail-widgets>
                        <label
style="head2">${uiLabelMap.ProductCategoryNotFoundforCategoryID}
${productCategoryId}!</label>
                    </fail-widgets>
                </section>
            </widgets>
        </section>
    </screen>

${detailScreen} defaults to "categorydetail", so this definition
includes the following definition (again from the same file).

    <screen name="categorydetail">
        <section>
            <actions>
                <set field="productsummaryScreen"
value="component://ecommerce/widget/CatalogScreens.xml#productsummary"/>

                <script location="component://order/webapp/ordermgr/WEB-
INF/actions/entry/catalog/categorydetail.bsh"/>
            </actions>
            <widgets>
                <platform-specific><html><html-template
location="component://order/webapp/ordermgr/entry/catalog/categorydetail.ftl"/></html></platform-specific>
            </widgets>
        </section>
    </screen>

Note in this definition we assign the field productsummaryScreen with
the value
"component://ecommerce/widget/CatalogScreens.xml#productsummary".
Further down that definition, we include the "categorydetail.ftl" file.
In turn this file calls ${screens.render(productsummaryScreen)}

I hope that helps a bit
--
Kind Regards
Andrew Sykes <[hidden email]>
Sykes Development Ltd
http://www.sykesdevelopment.com

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users