commonscreens.xml/main-decorator

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

commonscreens.xml/main-decorator

Ritesh Trivedi
Hi All,

Have been looking in the documentation wiki, forum postings etc - but am not able to find the answer, so will appreciate any pointers

1. Whats the purpose of CommonScreens.xml - most if not all applications/components in Ofbiz seem to have it
2. Also almost always commonscreens.xml file seems to have main-application-decorator or main-decorator or probably main-section-decorator - not sure how its linked in the application model - seems like the names have some special meaning and purpose - but find no reference to those names in the code.

Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: commonscreens.xml/main-decorator

Adrian Crum
An application's CommonScreens.xml contains screens and screen decorators that are used by more than
one screen. There is also a "global" CommonScreens.xml file in the Common component that is shared
by all components.

Each screen decorator "decorates" or "wraps" screen content. There is no limit to how many
decorators you can use.

The general idea is to build from the inside out. Create a screen for specific content, decorate it
with component content, then decorate it again with OFBiz-wide or "global" content.

-Adrian

Ritz123 wrote:

> Hi All,
>
> Have been looking in the documentation wiki, forum postings etc - but am not
> able to find the answer, so will appreciate any pointers
>
> 1. Whats the purpose of CommonScreens.xml - most if not all
> applications/components in Ofbiz seem to have it
> 2. Also almost always commonscreens.xml file seems to have
> main-application-decorator or main-decorator or probably
> main-section-decorator - not sure how its linked in the application model -
> seems like the names have some special meaning and purpose - but find no
> reference to those names in the code.
>
> Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: commonscreens.xml/main-decorator

Adrian Crum
One more tip, set widget.verbose=true in the widget.properties file, then look at the HTML markup -
you'll see how the screens and decorators are nested.

-Adrian

Adrian Crum wrote:

> An application's CommonScreens.xml contains screens and screen
> decorators that are used by more than one screen. There is also a
> "global" CommonScreens.xml file in the Common component that is shared
> by all components.
>
> Each screen decorator "decorates" or "wraps" screen content. There is no
> limit to how many decorators you can use.
>
> The general idea is to build from the inside out. Create a screen for
> specific content, decorate it with component content, then decorate it
> again with OFBiz-wide or "global" content.
>
> -Adrian
>
> Ritz123 wrote:
>
>> Hi All,
>>
>> Have been looking in the documentation wiki, forum postings etc - but
>> am not
>> able to find the answer, so will appreciate any pointers
>>
>> 1. Whats the purpose of CommonScreens.xml - most if not all
>> applications/components in Ofbiz seem to have it
>> 2. Also almost always commonscreens.xml file seems to have
>> main-application-decorator or main-decorator or probably
>> main-section-decorator - not sure how its linked in the application
>> model -
>> seems like the names have some special meaning and purpose - but find no
>> reference to those names in the code.
>> Thanks in advance.
>
>