Web / Apache OFBiz Interview questions
What is the difference between a screen decorator and a plain screen definition?
A plain screen renders one piece of page content - a form, a report, a fragment. A decorator is a special screen that defines the surrounding page shell: header, navigation, footer, and a named placeholder (a body section) where the content screen gets inserted.
A content screen references its decorator with a decorator-screen element and supplies its own content into the body section, instead of repeating header/footer markup on every page:
<decorator-screen name="main-decorator" location="component://common-theme/widget/CommonScreens.xml"> <decorator-section name="body"> <include-form name="ExampleForm" location="..."/> </decorator-section> </decorator-screen>
This mirrors a classic templating "master page" pattern, so a single change to the decorator, like adding a new nav item, applies to every screen that uses it.
More Related questions...