[ 
https://issues.apache.org/jira/browse/OFBIZ-3274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12787011#action_12787011
 ] 

Bruno Busco commented on OFBIZ-3274:
------------------------------------

Adrian,
I said "In the patch I updated all catalog application screens to use this new 
method.". I intended that all the screens in the catalog application were 
already been updated in the patch, others still need to be updated.

All the proposed change wants to do is to replace the 
leftbarScreenName/leftbarScreenLocation/MainColumnStyle mechanism with a 
simpler and more OFBiz-standard decorato-section-based one.
In the GD there is this piece of code:
{code} 
                    <container id="column-container">
                        <!-- by default will render left-bar only if 
leftbarScreen value not empty -->
                        <include-screen name="${leftbarScreenName}" 
location="${leftbarScreenLocation}"/>

                        <container id="content-main-section" 
style="${MainColumnStyle}">
                            <!-- render messages -->
                            <decorator-section-include name="body"/>
                        </container>
                        <container style="clear"></container>
                    </container>
{code} 

that already tryes to understand if there is a content to be shown as left bar. 
I do not see the problem to replace it with comething like:

{code} 
                        <section>
                            <condition>
                                <if-empty-section section-name="left-column"/>
                            </condition>
                            <widgets>
                                <container id="content-main-section">
                                    <decorator-section-include name="body"/>
                                </container>
                            </widgets>
                            <fail-widgets>
                                <container style="left">
                                    <decorator-section-include 
name="left-column"/>
                                </container>
                                <container id="content-main-section" 
style="leftonly">
                                    <decorator-section-include name="body"/>
                                </container>
                            </fail-widgets>
                        </section>
{code} 

The change would put the styles leftonly, left, etc away from the application 
and put them in the GD (that could be even moved to the theme). This is correct 
because those styles are defined and handled not at the application level but 
at the layout/theme that is global.

Sorry if I confused you.


> Using decorator sections to control the left-bar
> ------------------------------------------------
>
>                 Key: OFBIZ-3274
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3274
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Bruno Busco
>            Assignee: Bruno Busco
>         Attachments: OFBIZ-3274 DecoratorSectionLayout.patch, OFBIZ-3274 
> DecoratorSectionLayout.patch
>
>
> Hi,
> at the moment, in order to have a screen rendered with or without a left bar, 
> the variables "leftbarScreenName", "leftbarScreenLocation" and 
> "MainColumnStyle" need to be set to select a screen for the left bar and a 
> main column style.
> This must be done in the screen itself or an application decorator.
> With the attached patch, submitted for your review, a new GlobalDecorator 
> section named "left-bar" has been added. If a screen must be displayed with a 
> left bar this new decorator section needs to be filled with the selected 
> content.
> The main column style is defined in the Global decorator. In order to do this 
> a new screen condition has been added: "if-empty-decorator-section". This 
> condition allows to check if a decorator section has been added content or 
> not. (actually it only checks if the decorator section has been defined).
> In the patch I updated all catalog application screens to use this new method.
> If there are no problems with you with this, I will commit in the next days.
> Thank you for sharing your thoughts about.
> -Bruno

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to